Skip to content

armgit / ARES

Public Imported from GitHub
0

ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.

chore: remove batch audit reports from tracking, add to gitignore

Mafifrizia4c3d5e914c4
diff --git a/.gitignore b/.gitignore
index 255369a..b3672f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -67,3 +67,4 @@ docs/assets/*.mp4
docs/assets/*.gif
tools/
test*.png
+batch*_audit_report.md
diff --git a/batch10_audit_report.md b/batch10_audit_report.md
deleted file mode 100644
index ffe4352..0000000
--- a/batch10_audit_report.md
+++ /dev/null
@@ -1,129 +0,0 @@
-# Laporan Audit Batch 10: Network Reconnaissance & Service Fingerprinting
-
-> **Tanggal Audit**: 26 September 2026
-> **Ruang Lingkup**: 5 File di `ares/modules/recon/` dan `ares/modules/network/`
-> **Status Batch**: SELESAI (AUDITED)
-> **Temuan**: 5 Temuan Terkonfirmasi (`MOD-058` s/d `MOD-062`) — 0 Critical, 2 High, 3 Medium
-
----
-
-## Modul yang Diaudit
-
-1. [`ares/modules/recon/fingerprint.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/recon/fingerprint.py) — `FingerprintModule` (`recon.fingerprint`) — 304 baris
-2. [`ares/modules/network/dns_enum.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/network/dns_enum.py) — `DnsEnumModule` (`network.dns_enum`) — 366 baris
-3. [`ares/modules/network/http_fingerprint.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/network/http_fingerprint.py) — `HttpFingerprintModule` (`network.http_fingerprint`) — 361 baris
-4. [`ares/modules/network/service_detect.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/network/service_detect.py) — `ServiceDetectModule` (`network.service_detect`) — 399 baris
-5. [`ares/modules/network/snmp_enum.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/network/snmp_enum.py) — `SnmpEnumModule` (`network.snmp_enum`) — 415 baris
-
----
-
-## Analisis Per Modul & Hasil Checklist B1–B6
-
-### 1. `recon.fingerprint` (`fingerprint.py`)
-- **B1 (Scope Guard & Parameter Validation)**: ✅ **LULUS**. Target divalidasi tidak boleh kosong di `validate()`. Memanggil `await self.before_request(target, "default")` (baris 209) sebelum memanggil `EnvironmentFingerprinter`.
-- **B2 (Teardown & Cleanup)**: ✅ **LULUS**. Modul tidak menyisakan background process atau temporary socket. Eksekusi dibungkus dalam `asyncio.wait_for(..., timeout=timeout * 4 + 10)`.
-- **B3 (Cryptography & Secrets Exposure)**: ✅ **LULUS**. Tidak ada rahasia atau kredensial yang diekspos di evidence. Modul read-only pasif.
-- **B4 (Technical Honesty & Claims - Rule 1)**: ✅ **LULUS**. Thin-wrapper yang mendelegasikan tugas ke `ares/fingerprint/engine.py`. Klasifikasi EDR vendor (`crowdstrike`, `sentinelone`, `defender_atp`) dan rekomendasi stealth profile akurat secara teknis.
-- **B5 (Normalizer Evaporation & Contract Alignment)**: ⚠️ **TERCATAT (MOD-062)**. Modul mendeklarasikan `OUTPUTS = ["fingerprint_result"]`. Modul menyimpan hasil secara direct-call ke `artifact_store.store_fingerprint(result)` jika method tersebut ada, namun pada pipeline engine resmi `ArtifactNormalizer.normalize()` tidak memiliki handler untuk `fingerprint_result`.
-- **B6 (Resiliency & OpSec)**: ✅ **LULUS**. Circuit breaker `failure_threshold=5` aktif.
-
----
-
-### 2. `network.dns_enum` (`dns_enum.py`)
-- **B1 (Scope Guard & Parameter Validation)**: ❌ **TERBUKTI MELANGGAR (MOD-058)**.
- Pada baris 260–272:
- ```python
- ns_servers: list[str] = dns_records.get("NS", [])
- def _try_axfr(ns_host: str) -> list[str]:
- zone = dns.zone.from_xfr(dns.query.xfr(ns_host, domain, timeout=5))
- ...
- for ns in ns_servers[:3]:
- ns_clean = ns.rstrip(".")
- records = await loop.run_in_executor(None, _try_axfr, ns_clean)
- ```
- Modul memanggil `await self.before_request(target, "dns")` di awal baris 221 untuk `target` domain primer. Namun ketika mencoba zone transfer (AXFR), modul melakukan koneksi TCP port 53 ke nameserver hasil enumerasi (`ns_clean`) **tanpa memanggil `before_request(ns_clean, "dns")`**. Jika domain target mendelegasikan DNS ke third-party (Cloudflare, AWS Route53, Akamai, ISP), workstation operator akan mengirim probe zone transfer AXFR ke host publik di luar scope campaign (melanggar Rule 1 dan Rule 4, pola MOD-004/009).
-- **B2 (Teardown & Cleanup)**: ✅ **LULUS**. Socket DNS dikelola oleh dnspython dan ditutup setelah query selesai. Timeout resolver diset defensif (`timeout=3`, `lifetime=5`).
-- **B3 (Cryptography & Secrets Exposure)**: ✅ **LULUS**. Deteksi TXT record sensitif (password/secret) diterbitkan sebagai finding dengan cuplikan terpotong (`txt[:200]`).
-- **B4 (Technical Honesty & Claims - Rule 1)**: ✅ **LULUS**. Query AXFR, query standard DNS record, dan subdomain bruteforce menggunakan dnspython murni tanpa klaim berlebihan.
-- **B5 (Normalizer Evaporation & Contract Alignment)**: ⚠️ **TERCATAT (MOD-062)**. Modul mendeklarasikan `OUTPUTS = ["dns_records", "subdomains"]`. Keduanya tidak memiliki handler di `ArtifactNormalizer`. Subdomain yang ditemukan tidak dikonversi ke `HostArtifact`.
-- **B6 (Resiliency & OpSec)**: ✅ **LULUS**. Menggunakan `asyncio.Semaphore(20)` dan jitter sleep untuk pembatasan laju brute force subdomain.
-
----
-
-### 3. `network.http_fingerprint` (`http_fingerprint.py`)
-- **B1 (Scope Guard & Parameter Validation)**: ⚠️ **TERBUKTI MELANGGAR (MOD-059)**.
- Pada baris 252–255:
- ```python
- async with httpx.AsyncClient(
- timeout=6.0, verify=False,
- follow_redirects=True,
- headers={"User-Agent": ...},
- ) as client:
- r = await client.get(f"{base_url}/")
- ```
- `httpx.AsyncClient` diinisialisasi dengan `follow_redirects=True`. Jika web server target mengembalikan HTTP 301/302 redirect ke domain atau host eksternal (misal landing page IdP Microsoft/Google, CDN, atau cloud hosting luar scope), httpx akan otomatis mengikuti redirect tersebut dan melakukan HTTP request ke domain eksternal tanpa melewati `campaign.is_in_scope()` atau `self.before_request()`.
-- **B2 (Teardown & Cleanup)**: ✅ **LULUS**. Client HTTP menggunakan context manager `async with httpx.AsyncClient(...)` sehingga resource HTTP connection pool ditutup deterministik.
-- **B3 (Cryptography & Secrets Exposure)**: ✅ **LULUS**. Tidak ada rahasia yang diekspos di evidence.
-- **B4 (Technical Honesty & Claims - Rule 1)**: ✅ **LULUS**. Banner header parsing dan body regex matching untuk tech stack (WordPress, Django, Laravel, dll.) akurat.
-- **B5 (Normalizer Evaporation & Contract Alignment)**: ⚠️ **TERCATAT (MOD-062)**. Modul mendeklarasikan `OUTPUTS = ["web_fingerprint", "admin_interfaces"]`. Keduanya tidak memiliki handler di `ArtifactNormalizer`.
-- **B6 (Resiliency & OpSec)**: ✅ **LULUS**. Menggunakan rate limiter `network_scan`, batasan probe admin hanya 8 path teratas per port, dan jitter sleep.
-
----
-
-### 4. `network.service_detect` (`service_detect.py`)
-- **B1 (Scope Guard & Parameter Validation)**: ✅ **LULUS**. Parameter `target` dan `ports` divalidasi pre-flight di `validate()`. Memanggil `await self.before_request(target, "tcp")` pada baris 296.
-- **B2 (Teardown & Cleanup / Socket Leak)**: ⚠️ **TERBUKTI MELANGGAR (MOD-060)**.
- Pada helper `_grab_banner` (baris 103–128):
- ```python
- reader, writer = await asyncio.wait_for(
- asyncio.open_connection(host, port, ssl=ctx), timeout=timeout
- )
- ...
- data = await asyncio.wait_for(reader.read(2048), timeout=timeout)
- writer.close()
- try:
- await writer.wait_closed()
- except Exception:
- pass
- return data.decode(...).strip()[:1000]
- ```
- Pemanggilan `await asyncio.wait_for(reader.read(2048), timeout=timeout)` **TIDAK dibungkus dalam blok `try ... finally`**. Bila pembacaan data banner mengalami timeout atau host mereset koneksi di tengah read, alur eksekusi langsung melompat ke `except Exception:` di baris 129, membypass pemanggilan `writer.close()` dan `writer.wait_closed()`. Pada pemindaian ribuan port, hal ini memicu socket descriptor leak pada event loop operator.
-- **B3 (Cryptography & Secrets Exposure)**: ✅ **LULUS**. Banner dan version string diekspos secara aman di evidence.
-- **B4 (Technical Honesty & Claims - Rule 1)**: ✅ **LULUS**. Deteksi banner menggunakan probe terarah per port (HTTP, FTP, SMTP, SSH, Redis, MongoDB) dan pola regex CVE hint realistis tanpa klaim exploit fiktif.
-- **B5 (Normalizer Evaporation & Contract Alignment)**: ⚠️ **TERCATAT (MOD-062)**. Modul mendeklarasikan `OUTPUTS = ["service_versions", "vulnerable_services"]`. Keduanya tidak memiliki handler di `ArtifactNormalizer`. Data service & port tidak memperbarui `HostArtifact`.
-- **B6 (Resiliency & OpSec)**: ✅ **LULUS**. Concurrency dibatasi dengan `asyncio.Semaphore(10)`, rate limiter `network_scan`, dan jitter sleep.
-
----
-
-### 5. `network.snmp_enum` (`snmp_enum.py`)
-- **B1 (Scope Guard & Parameter Validation)**: ✅ **LULUS**. Parameter `target` divalidasi pre-flight di `validate()`. Memanggil `await self.before_request(target, "snmp")` pada baris 296 sebelum pengiriman paket UDP SNMP.
-- **B2 (Teardown & Cleanup)**: ✅ **LULUS**. Menggunakan sync pysnmp calls (`getCmd`, `nextCmd`) yang dibungkus dalam `run_in_executor`. Tidak ada background listener atau socket persisten.
-- **B3 (Cryptography, Secrets & Vault Storage)**: ❌ **TERBUKTI MELANGGAR (MOD-061)**.
- - Modul berhasil menemukan community string SNMP (seperti `public`, `private`, `admin`, dll.) yang merupakan kredensial otentikasi plain text untuk membaca/mengubah konfigurasi perangkat jaringan.
- - Namun, **modul TIDAK menyimpan community string yang ditemukan ke `AresVault`**!
- - Modul juga **TIDAK menuliskan kredensial ini ke `raw["valid_credentials"]`** (kontrak standar kredensial MOD-033).
- - Akibatnya, kredensial SNMP yang valid menguap dari pipeline serangan downstream (misal lateral movement atau privilege escalation).
- - Selain itu, pada baris 413, modul mengisi `raw["snmp_findings"] = self._findings` yang berisi list objek Pydantic `Finding`, bukan serializable dicts.
-- **B4 (Technical Honesty & Claims - Rule 1)**: ✅ **LULUS**. MIB walk standar (`sysDescr`, `sysName`, `ifTable`, `hrSWRunTable`) diimplementasikan dengan benar via pysnmp.
-- **B5 (Normalizer Evaporation & Contract Alignment)**: ⚠️ **TERCATAT (MOD-062)**. Modul mendeklarasikan `OUTPUTS = ["snmp_findings", "system_info"]`. Keduanya tidak memiliki handler di `ArtifactNormalizer`.
-- **B6 (Resiliency & OpSec)**: ✅ **LULUS**. Modul segera menghentikan brute-force community strings begitu 1 community valid ditemukan (`break` pada baris 382) untuk menjaga noise level tetap rendah di perangkat target.
-
----
-
-## Ringkasan Temuan Batch 10
-
-| ID | Modul | Judul | Severity | Kategori Master Fix Plan | Deskripsi Ringkas |
-|---|---|---|---|:---:|---|
-| **MOD-058** | `network.dns_enum` | Out-of-Scope AXFR Zone Transfer Probing on Discovered Nameservers | **HIGH** | **Grup D (Scope Bypass)** | `_try_axfr(ns_clean)` menghubungi nameserver eksternal hasil enumerasi NS via TCP 53 tanpa memanggil `await self.before_request(ns_clean, "dns")`. Berisiko mengirim paket eksploitasi zone transfer ke third-party DNS provider di luar izin campaign. |
-| **MOD-059** | `network.http_fingerprint` | Unbounded HTTP Redirect Traversal on External Hosts via `follow_redirects=True` | **MEDIUM** | **Grup D (Scope Bypass)** | `httpx.AsyncClient` dengan `follow_redirects=True` otomatis mengikuti HTTP 301/302 redirects ke domain/host eksternal tanpa validasi batasan scope campaign (`campaign.is_in_scope()`). |
-| **MOD-060** | `network.service_detect` | Asyncio TCP Writer Handle Leak on Read Timeout in `_grab_banner` | **MEDIUM** | **Grup C (Teardown & Cleanup)** | Pembacaan `reader.read()` tidak dibungkus dalam blok `try ... finally: writer.close()`. Kegagalan read atau timeout memicu kebocoran file descriptor socket TCP pada event loop operator. |
-| **MOD-061** | `network.snmp_enum` | Discovered SNMP Community Strings Evaporation from Vault and Standard Pipeline | **HIGH** | **Grup A (Normalizer) & Grup E (Integration)** | Community string SNMP yang valid (kredensial perangkat jaringan) tidak disimpan ke `AresVault` dan tidak diformat ke kontrak standar `valid_credentials` (MOD-033). `raw["snmp_findings"]` juga menyimpan list object `Finding` mentah. |
-| **MOD-062** | `recon.fingerprint`, `network.*` | 100% Unhandled Reconnaissance Capabilities in `ArtifactNormalizer` | **MEDIUM** | **Grup A (Normalizer Handlers Missing)** | Seluruh 5 modul Batch 10 mendeklarasikan 9 output capability (`fingerprint_result`, `dns_records`, `subdomains`, `web_fingerprint`, `admin_interfaces`, `service_versions`, `vulnerable_services`, `snmp_findings`, `system_info`), namun tidak satu pun memiliki handler di `ArtifactNormalizer`. Data recon host gagal memperbarui `HostArtifact` dan `ArtifactStore`. |
-
----
-
-## Rekomendasi Tindakan Pasca-Audit Batch 10
-
-1. Seluruh temuan Batch 10 (`MOD-058` s/d `MOD-062`) dicatat sebagai **DEFERRED** dan dikonsolidasikan langsung ke [`MASTER_FIX_PLAN.md`](file:///c:/Users/ASUS/Desktop/ARES/MASTER_FIX_PLAN.md).
-2. Perbarui [`MODULE_AUDIT_INVENTORY.md`](file:///c:/Users/ASUS/Desktop/ARES/MODULE_AUDIT_INVENTORY.md) dan [`AUDIT_PROGRESS.md`](file:///c:/Users/ASUS/Desktop/ARES/AUDIT_PROGRESS.md).
-3. Lanjutkan audit ke **Batch 11: Cloud Asset & Infrastructure Discovery** (`cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp`).
diff --git a/batch11_audit_report.md b/batch11_audit_report.md
deleted file mode 100644
index 51f32b2..0000000
--- a/batch11_audit_report.md
+++ /dev/null
@@ -1,242 +0,0 @@
-# ARES Security Audit Report: Batch 11 — Cloud Asset & Infrastructure Discovery
-
-> **Audit Date**: 26 September 2026
-> **Auditor**: Antigravity Autonomous Security Engineer
-> **Scope**: 4 Tier-2 Cloud Discovery Modules
-> - [`ares/modules/cloud/aws.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/cloud/aws.py) (`cloud.aws`)
-> - [`ares/modules/cloud/azure.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/cloud/azure.py) (`cloud.azure`)
-> - [`ares/modules/cloud/azure_ad.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/cloud/azure_ad.py) (`cloud.azure_ad`)
-> - [`ares/modules/cloud/gcp.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/cloud/gcp.py) (`cloud.gcp`)
-> **Governing Standards**: `AGENTS.md` (Rules 1–5), Gate 6 (Vault Protection), Anti-Hype Policy
-
----
-
-## 1. Executive Summary & Batch Metrics
-
-Batch 11 inspects the read-only discovery and attack surface enumeration modules for the three primary public cloud providers (Amazon Web Services, Microsoft Azure / Entra ID, and Google Cloud Platform).
-
-All four modules rely on cloud provider SDKs or REST APIs (`boto3`, `azure-identity`, `azure-mgmt-*`, `msal`, `google-auth`, `google.cloud.resourcemanager`, and `httpx`/`requests`). While none of the modules violate Gate 6 (no unauthorized writes to `AresVault._store`), the audit identified **6 significant architectural, operational, and pipeline defects** (`MOD-063` through `MOD-068`), including a **CRITICAL control-flow bug with `UnboundLocalError` that renders Microsoft Graph enumeration 100% unreachable dead code** (`MOD-067`), **SSRF probing of the operator workstation's own link-local metadata service** (`MOD-064`), **unscoped cloud tenant/account execution** (`MOD-063`), and **100% normalizer telemetry data loss** (`MOD-066`, `MOD-068`).
-
-### Summary of Batch 11 Audit Findings
-
-| Finding ID | Module(s) Affected | Severity | Audit Category | Description |
-|---|---|:---:|---|---|
-| **MOD-063** | `cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp` | **HIGH** | Grup D: Scope Bypass | Unscoped cloud account/subscription/project execution via ambient credentials |
-| **MOD-064** | `cloud.aws`, `cloud.gcp` | **HIGH** | Grup D / E: Operator Egress | Operator workstation link-local metadata probe (`169.254.169.254` / `metadata.google.internal`) leaking operator credentials |
-| **MOD-065** | `cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp` | **MEDIUM** | Grup E: Robustness | Missing pre-flight SDK dependency validation in `validate()` |
-| **MOD-066** | `cloud.azure`, `cloud.azure_ad` | **HIGH** | Grup A: Normalizer Data Loss | 100% telemetry data loss on `azure_findings`, `azure_ad_findings`, and `access_tokens` |
-| **MOD-067** | `cloud.azure_ad` | **CRITICAL** | Grup E: Flow / Dead Code | Indentation defect causing `UnboundLocalError` on default technique and 100% unreachable Graph API code |
-| **MOD-068** | `cloud.gcp` | **HIGH** | Grup A: Normalizer Data Loss | 100% telemetry data loss on `gcp_findings` into `ArtifactStore` |
-
----
-
-## 2. Detailed Module-by-Module Audit (Checklists B1–B6)
-
-### 2.1. `cloud.aws` (`ares/modules/cloud/aws.py`)
-
-#### B1: Scope Enforcement & Target Isolation
-- **Scope Bypass on Cloud Account ID (`MOD-063`)**:
- Lines 190–192 contain the comment:
- ```python
- # Note: before_request() intentionally not called - cloud modules use
- # API credentials, not host IPs. Scope check (CIDR) does not apply to
- # cloud API endpoints. Rate limiting and jitter are handled at the API call level.
- ```
- While CIDR checking does not apply to AWS global endpoints, STS caller identity (`get_caller_identity()["Account"]`) is queried without checking whether the resulting account ID matches the authorized campaign scope. If the operator runs ARES with ambient `~/.aws/credentials` or default AWS profile, ARES can enumerate an unauthorized AWS production account.
-- **Operator Host Link-Local IMDSv1 SSRF Probe (`MOD-064`)**:
- Lines 302–310 implement `_check_imds`:
- ```python
- def _check_imds(self) -> dict:
- import urllib.request, urllib.error
- r: dict = {"imdsv1_available": False}
- try:
- req = urllib.request.Request("http://169.254.169.254/latest/meta-data/iam/security-credentials/")
- with urllib.request.urlopen(req, timeout=3) as resp:
- r["imdsv1_available"] = True; r["credential_roles"] = resp.read().decode().strip().splitlines()
- except Exception: pass
- return r
- ```
- This is executed from the **operator machine**. If ARES is running inside an EC2 instance, ECS container, or bastion host, this probe reaches the **operator's own metadata service**, extracts the operator's IAM roles, and issues a HIGH finding attributing this vulnerability to the remote engagement target!
-
-#### B2: Teardown & Guaranteed Cleanup
-- Clean. The module is purely read-only (IAM account summary, S3 bucket ACLs, Security Group ingress rules). No resources or persistence artifacts are created.
-
-#### B3: Cryptographic & Vault Integrity
-- The module does not attempt direct vault writes (`_vault.store` is not called). Gate 6 is satisfied.
-- No raw credential hashes or unmasked access keys are emitted in findings.
-
-#### B4: Technical Honesty & Real vs Mock
-- Real API calls are used via `boto3`.
-- **Pre-flight SDK check omitted (`MOD-065`)**: `validate()` checks for parameter existence but does not verify `import boto3`. If `boto3` is not installed, the module fails during `execute()` rather than pre-flight admission.
-
-#### B5: Contract & Normalizer Alignment
-- `OUTPUTS = ["aws_findings"]`.
-- `ArtifactNormalizer.handlers["aws_findings"]` calls `_normalize_cloud`.
-- `_normalize_cloud` only extracts `s3` public buckets into `CloudResourceArtifact`. It completely drops IAM findings (root MFA disabled, users without MFA, stale access keys) and Security Group findings (open ports to internet).
-
----
-
-### 2.2. `cloud.azure` (`ares/modules/cloud/azure.py`)
-
-#### B1: Scope Enforcement & Target Isolation
-- **Unscoped Subscription Execution (`MOD-063`)**:
- `subscription_id` is passed as a string parameter, but `validate()` does not verify whether `subscription_id` or `tenant_id` belongs to the campaign's authorized scope.
- In `_get_credential()`, if `client_id` is not passed, it instantiates `DefaultAzureCredential()`, which can pick up ambient developer tokens (`az login`, Azure CLI token, VS Code Azure credentials).
-
-#### B2: Teardown & Guaranteed Cleanup
-- Read-only queries against Azure Resource Graph, Azure Storage, and Azure RBAC. No persistent infrastructure or role assignments are generated.
-
-#### B3: Cryptographic & Vault Integrity
-- Complies with Gate 6: no direct vault injection.
-- Detection rule synthesis generates KQL and Sigma rules in `raw["loot"]`.
-
-#### B4: Technical Honesty & Real vs Mock
-- Real API calls via `azure.mgmt.*` and Microsoft Graph.
-- `validate()` does not perform pre-flight verification of Azure SDK imports (`azure.identity`, `azure.mgmt.storage`, `azure.mgmt.authorization`, `azure.mgmt.network`).
-
-#### B5: Contract & Normalizer Alignment
-- **100% Data Loss (`MOD-066`)**:
- `OUTPUTS = ["azure_findings"]`.
- `ArtifactNormalizer` has NO handler for `"azure_findings"`!
- All discovered blob containers, Global Admins, RBAC Owner/Contributor roles, and internet-exposed NSG rules evaporate completely from `ArtifactStore`.
-
----
-
-### 2.3. `cloud.azure_ad` (`ares/modules/cloud/azure_ad.py`)
-
-#### B1: Scope Enforcement & Target Isolation
-- `tenant_id` is unvalidated against campaign scope (`MOD-063`).
-
-#### B2: Teardown & Guaranteed Cleanup
-- Read-only enumeration. The device code flow generates a verification URI and code, but does not alter cloud state.
-
-#### B3: Cryptographic & Vault Integrity
-- No direct vault writes. `raw["access_tokens"]` stores acquired tokens.
-
-#### B4: Technical Honesty & Control-Flow Flaw (`MOD-067`)
-- **CRITICAL Control Flow Defect & UnboundLocalError**:
- In `run()` (lines 282–285):
- ```python
- 280: )
- 281: await self.noise.jitter.sleep()
- 282: raw["access_tokens"] = raw.get("access_token", "") # OUTPUTS key
- 283: raw["azure_ad_findings"] = self._findings # OUTPUTS key
- 284: return self._findings[:], raw
- 285:
- 286: # Enumeration with Graph API
- 287: if not token:
- 288: return [], {
- ...
- 296: lambda: self._enumerate_tenant(token, tenant_id),
- ```
- Lines 283–284 are unindented!
- 1. When running with the default `technique="enumerate"`, `raw` was never assigned inside `if technique == "device_code":`. Executing line 283 throws `UnboundLocalError: local variable 'raw' referenced before assignment`.
- 2. Because line 284 returns unconditionally, lines 286–363 (the entire Microsoft Graph tenant enumeration logic for guest users, users without MFA, and high-privilege service principals) are **100% unreachable dead code**!
-- `msal` is imported dynamically inside `_request_device_code` and `_get_token_client_credentials` without pre-flight validation in `validate()` (`MOD-065`).
-
-#### B5: Contract & Normalizer Alignment
-- **100% Data Loss (`MOD-066`)**:
- `OUTPUTS = ["azure_ad_findings", "access_tokens"]`.
- Neither capability has a handler in `ArtifactNormalizer`. Discovered Entra ID users and tokens are not ingested into `ArtifactStore`.
-
----
-
-### 2.4. `cloud.gcp` (`ares/modules/cloud/gcp.py`)
-
-#### B1: Scope Enforcement & Target Isolation
-- **Unscoped Project Execution (`MOD-063`)**:
- `project_id` is not validated against authorized campaign scope.
-- **Operator Host GCE Metadata Probe (`MOD-064`)**:
- Lines 590–648 (`_check_metadata_server`):
- Sends an HTTP request with `{"Metadata-Flavor": "Google"}` to `http://metadata.google.internal/computeMetadata/v1/instance/`. If ARES is running inside a GCP VM or Cloud Shell, this probes the operator workstation's own service account, stealing tokens and reporting a false finding on the engagement target.
-
-#### B2: Teardown & Guaranteed Cleanup
-- Read-only queries against Google Cloud Resource Manager, IAM, and GCS. Clean teardown.
-
-#### B3: Cryptographic & Vault Integrity
-- Complies with Gate 6: no direct vault bypass.
-
-#### B4: Technical Honesty & Real vs Mock
-- Real API calls via Google Cloud Client Libraries and REST endpoints.
-- `validate()` checks `project_id` parameter or `GOOGLE_APPLICATION_CREDENTIALS` existence, but does not check SDK imports (`MOD-065`).
-
-#### B5: Contract & Normalizer Alignment
-- **100% Data Loss (`MOD-068`)**:
- `OUTPUTS = ["gcp_findings"]`.
- `ArtifactNormalizer` has NO handler for `"gcp_findings"`. All discovered GCP findings evaporate completely from `ArtifactStore`.
-
----
-
-## 3. Findings Catalog: `MOD-063` through `MOD-068`
-
-### [MOD-063] Unscoped Cloud Account/Tenant Execution across Cloud Discovery Modules
-- **Severity**: **HIGH**
-- **Affected Modules**: `cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp`
-- **Category**: **Grup D (Scope Bypass / Unscoped Target)**
-- **Technical Description**:
- All four cloud discovery modules explicitly bypass `before_request()` because "cloud modules use API credentials, not host IPs". However, none of the modules validate resolved cloud scope identifiers (`Account` from STS `get_caller_identity()`, `subscription_id`, `tenant_id`, `project_id`) against `campaign.scope`. If an operator runs ARES with ambient developer credentials, ARES will enumerate unauthorized personal or non-target cloud subscriptions without any boundary protection.
-- **Remediation Plan**:
- Introduce a `validate_cloud_scope(target_identifier, provider)` check against `campaign.scope` in `validate()` / `run()`.
-
----
-
-### [MOD-064] Operator Workstation Link-Local Metadata Server SSRF Probing & Token Leak
-- **Severity**: **HIGH**
-- **Affected Modules**: `cloud.aws` (`_check_imds`), `cloud.gcp` (`_check_metadata_server`)
-- **Category**: **Grup D / E (Operator Egress & Attribution Risk)**
-- **Technical Description**:
- Both modules initiate direct HTTP requests from the operator machine to link-local metadata endpoints (`http://169.254.169.254` and `http://metadata.google.internal`). When ARES is hosted in an EC2 instance, GCP VM, or cloud runner, it probes and leaks the operator's own instance profile and service account tokens, falsely generating findings attributed to the target.
-- **Remediation Plan**:
- Remove local IMDS probes from remote discovery modules. IMDS probing belongs strictly to post-exploitation privilege escalation modules executed *on target* via remote command runners.
-
----
-
-### [MOD-065] Missing Pre-Flight SDK Dependency Validation in `validate()`
-- **Severity**: **MEDIUM**
-- **Affected Modules**: `cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp`
-- **Category**: **Grup E (Robustness & Fail-Fast Pre-Flight)**
-- **Technical Description**:
- Modules fail at runtime inside `execute()` or `run()` if required SDKs (`boto3`, `azure-identity`, `azure-mgmt-*`, `msal`, `google-cloud-resourcemanager`) are not installed, rather than failing fast in `validate()` during campaign planning.
-- **Remediation Plan**:
- Add structured `importlib.util.find_spec` verification in `validate()` raising `ModuleValidationError` with clear installation hints (`pip install ares-redteam[cloud]`).
-
----
-
-### [MOD-066] 100% Normalizer Data Loss on `azure_findings`, `azure_ad_findings`, and `access_tokens`
-- **Severity**: **HIGH**
-- **Affected Modules**: `cloud.azure`, `cloud.azure_ad`
-- **Category**: **Grup A (Normalizer Handlers Missing)**
-- **Technical Description**:
- `ArtifactNormalizer` has no handlers for `azure_findings`, `azure_ad_findings`, or `access_tokens`. Discovered storage accounts, RBAC owner bindings, NSG security rules, and Entra ID guest users evaporate upon module completion.
-- **Remediation Plan**:
- Implement `_normalize_azure` and `_normalize_azure_ad` handlers in `ares/normalize/artifacts.py` producing `CloudResourceArtifact` and `PermissionArtifact`.
-
----
-
-### [MOD-067] Indentation Defect Causing `UnboundLocalError` & 100% Unreachable Graph API Dead Code
-- **Severity**: **CRITICAL**
-- **Affected Modules**: `cloud.azure_ad` (`ares/modules/cloud/azure_ad.py:283-294`)
-- **Category**: **Grup E (Control Flow & Dead Code)**
-- **Technical Description**:
- Lines 283–284 in `cloud.azure_ad.py` are indented at the method root immediately following `if technique == "device_code":`. When `technique="enumerate"` (the default!), `raw` is referenced before assignment, crashing with `UnboundLocalError`. Furthermore, line 284 returns unconditionally, making lines 286–363 (the entire Microsoft Graph user, guest, and service principal enumeration) completely unreachable dead code.
-- **Remediation Plan**:
- Correct indentation of lines 282–284 so they are contained within `if technique == "device_code":`, initialize `raw = {"tenant_id": tenant_id}` at the beginning of `run()`, and allow enumeration execution to proceed when `technique != "device_code"`.
-
----
-
-### [MOD-068] 100% Normalizer Data Loss on `gcp_findings`
-- **Severity**: **HIGH**
-- **Affected Modules**: `cloud.gcp` (`ares/modules/cloud/gcp.py`)
-- **Category**: **Grup A (Normalizer Handlers Missing)**
-- **Technical Description**:
- `cloud.gcp` declares `OUTPUTS = ["gcp_findings"]`. `ArtifactNormalizer.handlers` does not have an entry for `gcp_findings`. All public GCS buckets, project IAM owner bindings, and service account keys are dropped from `ArtifactStore`.
-- **Remediation Plan**:
- Implement `_normalize_gcp` handler in `ares/normalize/artifacts.py` generating `CloudResourceArtifact` and `PermissionArtifact`.
-
----
-
-## 4. Verification & Status Recommendation
-
-In accordance with user instructions:
-- **Zero code changes were applied to cloud modules** during this audit turn.
-- Findings `MOD-063` through `MOD-068` are marked **DEFERRED** and consolidated into `MASTER_FIX_PLAN.md` for the unified batch remediation phase.
diff --git a/batch12_audit_report.md b/batch12_audit_report.md
deleted file mode 100644
index c177f2c..0000000
--- a/batch12_audit_report.md
+++ /dev/null
@@ -1,196 +0,0 @@
-# ARES Security Audit Report: Batch 12 — Host Configuration, Binary Parsing & Secrets Reconnaissance (FINAL BATCH)
-
-> **Audit Date**: 26 September 2026
-> **Auditor**: Antigravity Autonomous Security Engineer
-> **Scope**: 6 Final Tier-2 Modules & Binary Parsing Engines
-> - [`ares/modules/windows/registry_enum.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/windows/registry_enum.py) (`windows.registry_enum`)
-> - [`ares/modules/windows/scheduled_tasks_enum.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/windows/scheduled_tasks_enum.py) (`windows.scheduled_tasks_enum`)
-> - [`ares/modules/linux/kernel_suggester.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/linux/kernel_suggester.py) (`linux.kernel_suggester`)
-> - [`ares/modules/linux/_parsers.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/linux/_parsers.py) (Binary parsing library: ccache, keytab, kirbi, TDB)
-> - [`ares/modules/exfil/secrets_scan.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/exfil/secrets_scan.py) (`exfil.secrets_scan`)
-> - [`ares/modules/exfil/smb_shares.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/exfil/smb_shares.py) (`exfil.smb_shares`)
-> **Governing Standards**: `AGENTS.md` (Rules 1–5), Gate 6 (Vault Protection), Anti-Hype Policy, B1–B7 Checklist Framework
-
----
-
-## 1. Executive Summary & Batch Metrics
-
-Batch 12 concludes the 12-batch offensive module security audit across the entire ARES codebase. This batch covers host configuration inspection (Windows Registry and Scheduled Tasks via SMB/RPC), Linux kernel vulnerability estimation, low-level binary Kerberos/TDB parser engines, and credential/sensitive file reconnaissance (secrets scanner and SMB share traversal).
-
-The audit identified **6 new security, architectural, and data loss findings** (`MOD-069` through `MOD-074`):
-1. **Input Validation Asymmetry (`MOD-069`)**: `validate()` checks only `target`, ignoring required credentials (`username`), leading to silent execution aborts instead of pre-flight admission errors.
-2. **Raw Output Normalizer Gap & Domain Object Bleed (`MOD-070`)**: Raw output keys (`cleartext_credentials`, `credential_hints`, `scheduled_tasks`, `privesc_vectors`) receive un-serialized `Finding` objects that have zero handlers in `ArtifactNormalizerPipeline`.
-3. **Flawed Heuristic & Userspace CVE False Positives (`MOD-071`)**: Linux kernel suggester matches userspace CVEs (PwnKit CVE-2021-4034, Baron Samedit CVE-2021-3156) against generic kernel regexes (`[345]\.[0-9]+`), yielding 100% false positive findings across modern Linux distributions.
-4. **Pseudo-Parser in `KirbiASN1Codec.decode_kirbi()` (`MOD-072`)**: Does not parse ASN.1 KRB-CRED structures, hardcodes session keys to 32 zero bytes (`"00" * 32`), and naively guesses client principal names, corrupting all converted tickets.
-5. **Scope Guard Protocol Defaulting and Incomplete Pre-Flight Validation (`MOD-073`)**: `exfil.secrets_scan` and `exfil.smb_shares` pass protocol string `"default"` to `before_request()`, bypassing protocol-specific port and noise profiles, while omitting username validation in `validate()`.
-6. **Exfil Raw Output Keys Missing from Normalizer Contract (`MOD-074`)**: Telemetry keys `credential_list`, `discovered_secrets`, `sensitive_data_found`, `file_share_list`, and `sensitive_file_paths` are completely dropped by `ArtifactNormalizerPipeline`.
-
-### Summary of Batch 12 Audit Findings
-
-| Finding ID | Module(s) Affected | Severity | Audit Category | Description |
-|---|---|:---:|---|---|
-| **MOD-069** | `windows.registry_enum`, `windows.scheduled_tasks_enum` | **MEDIUM** | Grup E: Validation & Schema | Pre-flight validation asymmetry: `validate()` passes without required `username`, causing silent aborts in `run()` |
-| **MOD-070** | `windows.registry_enum`, `windows.scheduled_tasks_enum`, `linux.kernel_suggester` | **MEDIUM** | Grup A: Normalizer Data Loss | Domain `Finding` object bleed into raw output keys (`cleartext_credentials`, `credential_hints`, `scheduled_tasks`, `privesc_vectors`) with zero normalizer handlers |
-| **MOD-071** | `linux.kernel_suggester` | **MEDIUM** | Grup E: Heuristic Precision | Userspace CVEs (Polkit PwnKit, Sudo Baron Samedit) attributed to kernel versions via overbroad regexes `r"[345]\.[0-9]+"` |
-| **MOD-072** | `linux._parsers.py` | **HIGH** | Grup E: Cryptographic Robustness | Pseudo-parser in `KirbiASN1Codec.decode_kirbi()` returns zeroed session keys (`0000...`) and synthetic principals, corrupting tickets |
-| **MOD-073** | `exfil.secrets_scan`, `exfil.smb_shares` | **LOW** | Grup E: Validation & Schema | Protocol defaulting to `"default"` in `before_request()` and missing `username` validation in `validate()` |
-| **MOD-074** | `exfil.secrets_scan`, `exfil.smb_shares` | **MEDIUM** | Grup A: Normalizer Data Loss | 100% data loss on exfiltration findings (`credential_list`, `discovered_secrets`, `file_share_list`, `sensitive_file_paths`) in `ArtifactNormalizer` |
-
----
-
-## 2. Detailed Module-by-Module Audit (Checklists B1–B6 + B7)
-
-### 2.1. `windows.registry_enum` (`ares/modules/windows/registry_enum.py`)
-
-- **B1: Scope Enforcement & Boundary**:
- Calls `await self.before_request(target, "smb")` (line 383). Target host is properly validated against campaign scope before opening named pipe `\pipe\winreg`.
-- **B2: Input Validation, Schema & Sanitization (`MOD-069`)**:
- In `validate()` (lines 220–242), `target` is checked, but `username` is not validated if `ctx.best_credential()` returns `None`. In `run()` (line 362), `if not target or not username:` returns `[], {"error": "target and username required"}`. This creates an validation asymmetry where invalid execution context passes pre-flight validation but silently aborts in execution.
-- **B3: Execution Safety & Failure Modes**:
- All Impacket DCE/RPC calls are wrapped in `_read_registry()` and run on a thread executor with clean disconnect handlers in `finally: dce.disconnect(); smb.logoff()`. Handled properly.
-- **B4: Normalizer Pipeline Compatibility (`MOD-070`)**:
- Lines 735–736 assign `raw["cleartext_credentials"] = self._findings` and `raw["credential_hints"] = self._findings`.
- 1. It passes internal domain `Finding` model objects into the raw dictionary.
- 2. `cleartext_credentials` and `credential_hints` have NO handlers in `ArtifactNormalizerPipeline`. All registry credential discoveries evaporate from the campaign artifact store.
-- **B5: Logging, Telemetry & Operator Safety**:
- Audit logging is clean: `audit("registry_enum", technique="T1552.002")`. Synthesizes Microsoft Sentinel KQL and Sigma rules in `raw["loot"]`.
-- **B6: Anti-Mock Code Smells & Test Coverage**:
- Covered by `test_windows_resilience.py` and adapter tests.
-- **B7: Completeness Check**:
- Shares the exact `self._findings` assignment pattern seen in `windows.services_enum` and `windows.user_hunter`.
-
----
-
-### 2.2. `windows.scheduled_tasks_enum` (`ares/modules/windows/scheduled_tasks_enum.py`)
-
-- **B1: Scope Enforcement & Boundary**:
- Calls `await self.before_request(target, "smb")` (line 333). Target host is strictly scope-checked before binding to `\pipe\atsvc`.
-- **B2: Input Validation, Schema & Sanitization (`MOD-069`)**:
- Same asymmetry as `registry_enum`: `validate()` (lines 180–202) enforces `target` but fails to enforce `username`, whereas `run()` (line 315) fails if `username` is empty.
-- **B3: Execution Safety & Failure Modes**:
- DCE/RPC task enumeration is wrapped in `_enum_tasks()` and executed via `run_in_executor()`. Task XML parsing uses `defusedxml` with fallback to `xml.etree.ElementTree` with stripped namespaces.
-- **B4: Normalizer Pipeline Compatibility (`MOD-070`)**:
- Lines 521–522 assign `raw["scheduled_tasks"] = self._findings` and `raw["privesc_vectors"] = self._findings`.
- `ArtifactNormalizerPipeline` has zero handlers for `scheduled_tasks` or `privesc_vectors`. All writable binary paths and high-privilege scheduled tasks are dropped from the unified graph.
-- **B5: Logging, Telemetry & Operator Safety**:
- Synthesizes Sentinel KQL and Sigma rules for Event ID 4698/4702 and `schtasks.exe` process creation.
-- **B6: Anti-Mock Code Smells & Test Coverage**:
- Verified in `test_module_execute_adapters.py`.
-- **B7: Completeness Check**:
- Identical normalizer gap pattern to `windows.registry_enum`.
-
----
-
-### 2.3. `linux.kernel_suggester` (`ares/modules/linux/kernel_suggester.py`)
-
-- **B1: Scope Enforcement & Boundary**:
- Calls `await self.before_request(target, "ssh")` (line 223) and applies rate limiting/jitter.
-- **B2: Input Validation, Schema & Sanitization**:
- `validate()` enforces both `target` and `username`.
-- **B3: Execution Safety & Failure Modes**:
- Paramiko SSH connection handles missing host key policy warnings, runs `uname -r`, and gracefully closes.
-- **B4: Normalizer Pipeline Compatibility (`MOD-070`)**:
- Line 306 sets `raw["privesc_vectors"] = self._findings`. `privesc_vectors` has no handler in `ArtifactNormalizerPipeline`.
-- **B5: Logging, Telemetry & Heuristic Precision (`MOD-071`)**:
- Lines 33–42 define `_KERNEL_CVES`:
- - `(r"[345]\.[0-9]+", "CVE-2021-4034", "Polkit pkexec LPE (PwnKit)", "CRITICAL", "< 0.120-3")`
- - `(r"[345]\.[0-9]+", "CVE-2021-3156", "Sudo heap-overflow LPE (Baron Samedit)", "CRITICAL", "< 1.9.5p2")`
- PwnKit and Baron Samedit are userspace package vulnerabilities (polkit and sudo), not kernel vulnerabilities. Matching regex `r"[345]\.[0-9]+"` against kernel version generates CRITICAL false positive findings on 99% of Linux kernels regardless of package patch level.
-- **B6: Anti-Mock Code Smells & Test Coverage**:
- Tested in `test_module_execute_adapters.py` and `test_module_coverage.py`.
-- **B7: Completeness Check**:
- Presents identical over-claiming pattern to `linux.container` (MOD-039).
-
----
-
-### 2.4. `linux._parsers.py` (`ares/modules/linux/_parsers.py`)
-
-- **B1: Scope Enforcement & Boundary**:
- Not a network module. Pure Python binary parser engine used by `sssd_harvest`, `samba_secrets`, `keytab_abuse`, `ccache_hunt`, and `ticket_converter`.
-- **B2: Input Validation, Schema & Parsing Safety**:
- Bounds checks on buffer lengths before unpacking structs across `TDBParser`, `CcacheParser`, and `KeytabParser`.
-- **B3: Execution Safety & Anti-Hype Compliance (`MOD-072`)**:
- `KirbiASN1Codec.decode_kirbi()` (lines 660–695) claims to be a:
- *"Pure Python ASN.1 DER serializer & deserializer for Kerberos KRB-CRED (RFC 4120). Enables lossless in-memory conversion between Linux ccache v4 and Windows .kirbi."*
- However, `decode_kirbi()` does NOT deserialize the ASN.1 tree:
- ```python
- ticket_info: dict[str, Any] = {
- "client": "[email protected]",
- "server": "krbtgt/[email protected]",
- "keytype": 18,
- "keydata": "00" * 32, # HARDCODED ALL-ZERO SESSION KEY
- ...
- }
- ```
- It hardcodes the session key to 32 zero bytes and naively searches for `@` in raw bytes to guess the domain. When `credential.ticket_converter` converts `.kirbi` into `ccache`, the resulting ticket has a corrupt session key (`00000000...`), making it completely unusable for authentication (breaking downstream Golden/Silver ticket tradecraft).
-- **B4: Normalizer Pipeline Compatibility**:
- N/A (library module).
-- **B5: Logging, Telemetry & Operator Safety**:
- Subprocess-free and C-extension free; clean pure-Python implementation of MD4 (`pure_md4`) for OpenSSL 3.0+ environments.
-- **B6: Anti-Mock Code Smells & Test Coverage**:
- Tested in `test_linux_ad_tradecraft.py`. Unit tests previously passed because they only asserted `assert principal` without verifying the decrypted session key value.
-- **B7: Completeness Check**:
- Directly affects `credential.ticket_converter` (MOD-036).
-
----
-
-### 2.5. `exfil.secrets_scan` (`ares/modules/exfil/secrets_scan.py`)
-
-- **B1: Scope Enforcement & Boundary (`MOD-073`)**:
- Line 608 calls `await self.before_request(target, "default")` with `"default"` protocol instead of `"ssh"` or `"wmi"`, bypassing protocol-specific rate limits and port tagging.
-- **B2: Input Validation, Schema & Sanitization (`MOD-073`)**:
- `validate()` (lines 406–419) only verifies `target`. In live runs (line 605), `if not username:` returns `[], {"error": "no_credential_username"}`.
-- **B3: Execution Safety & Failure Modes**:
- Calculates real Shannon entropy (`calculate_shannon_entropy()`) and evaluates placeholder heuristics (`_is_placeholder_token()`).
-- **B4: Normalizer Pipeline Compatibility (`MOD-074`)**:
- Outputs `OUTPUTS = ["credential_list", "sensitive_data_found"]`.
- Raw returns `credential_list`, `discovered_secrets`, `sensitive_data_found`, `hit_count`.
- `ArtifactNormalizerPipeline` does not define any handler for `credential_list` or `discovered_secrets`. All discovered API keys, passwords, and connection strings fail to enter `ArtifactStore`.
-- **B5: Logging, Telemetry & Operator Safety**:
- Synthesizes Sentinel KQL and Sigma rules for file content searching (`Select-String`, `findstr`, `grep -r`).
-- **B6: Anti-Mock Code Smells & Test Coverage**:
- Thoroughly tested in `tests/unit/modules/test_secrets_scan.py` with mock SSH execution and entropy math tests.
-- **B7: Completeness Check**:
- Similar normalizer gap to `ad.sccm` and `windows.lsa_secrets`.
-
----
-
-### 2.6. `exfil.smb_shares` (`ares/modules/exfil/smb_shares.py`)
-
-- **B1: Scope Enforcement & Boundary (`MOD-073`)**:
- Line 256 calls `await self.before_request(target, "default")` with `"default"` protocol string instead of `"smb"`.
-- **B2: Input Validation, Schema & Sanitization (`MOD-073`)**:
- `validate()` verifies `target` but omits `username`.
-- **B3: Execution Safety & Failure Modes**:
- Wraps all synchronous Impacket SMB operations in `_smb_enum_sync()` executed via `loop.run_in_executor(None, _smb_enum_sync)`. Clean `conn.logoff()` in `finally`.
-- **B4: Normalizer Pipeline Compatibility (`MOD-074`)**:
- Outputs `OUTPUTS = ["file_share_list", "sensitive_file_paths"]`.
- Raw returns `file_share_list`, `sensitive_file_paths`, `sensitive_data_found`, `shares_scanned`, `files_found`.
- None of these keys have handlers in `ArtifactNormalizerPipeline`. All enumerated shares and sensitive file paths evaporate from the pipeline.
-- **B5: Logging, Telemetry & Operator Safety**:
- Synthesizes Sentinel KQL and Sigma rules for Event ID 5140/5145 network share access.
-- **B6: Anti-Mock Code Smells & Test Coverage**:
- Missing dedicated unit test suite (only tested via adapters).
-- **B7: Completeness Check**:
- Identical exfil output evaporation pattern to `exfil.secrets_scan`.
-
----
-
-## 3. Completeness & Cross-Batch Synthesis (Checklist B7)
-
-1. **Sibling Pattern Analysis**:
- - The validation asymmetry (`validate()` checks target but misses username) is present across `windows.registry_enum`, `windows.scheduled_tasks_enum`, `exfil.secrets_scan`, and `exfil.smb_shares`.
- - The raw output domain object bleed (`raw["key"] = self._findings`) observed in `windows.registry_enum`, `windows.scheduled_tasks_enum`, and `linux.kernel_suggester` exactly matches the pattern fixed in `cloud.aws_privesc` (MOD-052) and `network.snmp_enum` (MOD-061).
-2. **Normalizer Gaps**:
- - 9 new unhandled output keys identified in Batch 12: `cleartext_credentials`, `credential_hints`, `scheduled_tasks`, `privesc_vectors`, `credential_list`, `discovered_secrets`, `sensitive_data_found`, `file_share_list`, and `sensitive_file_paths`.
-3. **Dependency Integrity**:
- - No Batch 12 modules depend on disabled modules (`ad.ghost_forge`, `windows.dpapi`, `windows.token_impersonation`, `cloud.phantom_token`).
- - `_parsers.py` is safely isolated from disabled modules, but requires real ASN.1 decoding to support `ticket_converter`.
-
----
-
-## 4. Remediation Plan & Group Assignment
-
-All Batch 12 findings are recorded as **DEFERRED** for the consolidated simultaneous remediation phase:
-- **MOD-070, MOD-074** $\rightarrow$ **Grup A** (Normalizer Handlers Missing in `ares/normalize/artifacts.py`).
-- **MOD-069, MOD-071, MOD-072, MOD-073** $\rightarrow$ **Grup E** (Technical Honesty, Validation Schema & Parsing Robustness).