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.

docs: update MASTER_FIX_PLAN and NORMALIZER_CONTRACT_AUDIT for Batch 11 findings (MOD-063 to MOD-068)

Mafifrizie7c9d870c589
diff --git a/AUDIT_PROGRESS.md b/AUDIT_PROGRESS.md
index 0907aec..b9bfd67 100644
--- a/AUDIT_PROGRESS.md
+++ b/AUDIT_PROGRESS.md
@@ -68,8 +68,14 @@ Tracking file for verified findings, reproduction tests, applied fixes, test sui
| MOD-058 | network.dns_enum out-of-scope AXFR zone transfer probing on discovered nameservers | DEFERRED | Audit verified (`dns_enum.py:269-272`) | Menunggu remedi (Batch Fix Serentak - Grup D) | `_try_axfr` menghubungi nameserver eksternal hasil enumerasi NS tanpa validasi `before_request(ns_clean)`. |
| MOD-059 | network.http_fingerprint unbounded HTTP redirect traversal on external hosts via follow_redirects=True | DEFERRED | Audit verified (`http_fingerprint.py:252-255`) | Menunggu remedi (Batch Fix Serentak - Grup D) | `httpx.AsyncClient` otomatis mengikuti redirect 301/302 ke host eksternal di luar scope campaign. |
| MOD-060 | network.service_detect asyncio TCP writer handle leak on read timeout in _grab_banner | DEFERRED | Audit verified (`service_detect.py:108-129`) | Menunggu remedi (Batch Fix Serentak - Grup C) | `reader.read()` tidak dibungkus `try ... finally: writer.close()`, memicu socket leak saat timeout. |
-| MOD-061 | network.snmp_enum discovered SNMP community strings evaporation from vault & standard pipeline | DEFERRED | Audit verified (`snmp_enum.py:342, 406-413`) | Menunggu remedi (Batch Fix Serentak - Grup A/E) | Community strings valid tidak disimpan ke `AresVault` dan tidak diformat ke `valid_credentials` MOD-033. `raw["snmp_findings"]` menyimpan list objek `Finding` mentah. |
+| MOD-061 | network.snmp_enum discovered SNMP community strings evaporation from vault & standard pipeline | FIXED | PASSED (Unit tests & vault integration) | `ares/modules/network/snmp_enum.py` | Direct vault writing added for valid community strings (CredentialType.CLEARTEXT, Gate 6 compliant), valid_credentials standardized to list[dict], raw snmp_findings serialized to dicts (commit `5635362`). |
| MOD-062 | network.* & recon.fingerprint 100% unhandled reconnaissance capabilities in ArtifactNormalizer | DEFERRED | Audit verified (`fingerprint.py:72`, `dns_enum.py:82`, `http_fingerprint.py:99`, `service_detect.py:159`, `snmp_enum.py:165`) | Menunggu remedi (Batch Fix Serentak - Grup A) | 9 capability recon tidak memiliki handler di `ArtifactNormalizer`. Data host, subdomain, service, dan web target gagal memperbarui `HostArtifact`. |
+| MOD-063 | cloud.* unscoped cloud account/tenant execution via ambient credentials | DEFERRED | Audit verified (`aws.py:190`, `azure.py:211`, `azure_ad.py:231`, `gcp.py:134`) | Menunggu remedi (Batch Fix Serentak - Grup D) | Target cloud account/subscription/project ID tidak divalidasi terhadap scope campaign. Ambient credentials dapat mengeksekusi di luar otorisasi. |
+| MOD-064 | cloud.aws & cloud.gcp operator workstation link-local metadata SSRF probe | FIXED | PASSED (Unit tests) | `ares/modules/cloud/aws.py`, `ares/modules/cloud/gcp.py` | Probing metadata link-local dari workstation operator (169.254.169.254 & metadata.google.internal) dihapus dari modul discovery remote (commit `d86750b`). |
+| MOD-065 | cloud.* missing pre-flight SDK dependency validation in validate() | DEFERRED | Audit verified (`aws.py:91`, `azure.py:100`, `azure_ad.py:90`, `gcp.py:91`) | Menunggu remedi (Batch Fix Serentak - Grup E) | validate() tidak memverifikasi import SDK cloud (boto3, azure-identity, azure-mgmt, msal, google-auth), gagal di runtime saat dependensi belum terpasang. |
+| MOD-066 | cloud.azure & cloud.azure_ad 100% normalizer data loss on azure_findings, azure_ad_findings, access_tokens | DEFERRED | Audit verified (`azure.py:238`, `azure_ad.py:282-283`) | Menunggu remedi (Batch Fix Serentak - Grup A) | Tidak ada handler normalizer untuk azure_findings, azure_ad_findings, atau access_tokens. Seluruh hasil enumerasi Azure dan Entra ID hilang dari ArtifactStore. |
+| MOD-067 | cloud.azure_ad indentation defect causing UnboundLocalError & 100% unreachable Graph API dead code | FIXED | PASSED (Unit tests) | `ares/modules/cloud/azure_ad.py` | Indentasi blok return device_code diperbaiki, inisialisasi raw di awal run(), Graph API enumeration restored (commit `bd2c9b4`). |
+| MOD-068 | cloud.gcp 100% normalizer data loss on gcp_findings in ArtifactNormalizer | DEFERRED | Audit verified (`gcp.py:87`, `134`) | Menunggu remedi (Batch Fix Serentak - Grup A) | Output gcp_findings tidak memiliki handler di ArtifactNormalizer. Seluruh temuan GCS buckets publik, IAM project bindings, dan SA keys menguap dari ArtifactStore. |
---
@@ -227,13 +233,48 @@ Tracking file for verified findings, reproduction tests, applied fixes, test sui
### [MOD-061] Discovered SNMP Community Strings Evaporation from Vault & Standard Pipeline on `network.snmp_enum`
- **Severity**: **HIGH**
-- **Status**: **DEFERRED (Masuk batch fix serentak - Grup A & E)**
-- **Catatan**: Community string valid tidak disimpan ke `AresVault` dan tidak diformat ke kontrak `valid_credentials` (MOD-033). Output `raw["snmp_findings"]` juga berisi objek `Finding` unpickled.
+- **Status**: **FIXED** (commit `5635362`)
+- **Catatan**: Community string valid sekarang ditulis langsung ke `AresVault` (`_vault.store(cred, community)` dengan `CredentialType.CLEARTEXT` dan verifikasi Gate 6). Output `raw["valid_credentials"]` distandardisasi ke `list[dict]` (MOD-033), dan objek `Finding` di `raw["snmp_findings"]` diserialisasi ke plain dicts.
### [MOD-062] 100% Unhandled Reconnaissance Capabilities in `ArtifactNormalizer` on `network.*` & `recon.fingerprint`
- **Severity**: **MEDIUM**
+- **Status**: **PARTIALLY FIXED / DEFERRED (7 Handlers implemented in commit `5635362`)**
+- **Catatan**: 7 handler normalizer P0/P1 ditambahkan di `ares/normalize/artifacts.py` (`dns_records`, `subdomains`, `service_versions`, `vulnerable_services`, `web_fingerprint`, `admin_interfaces`, dll.). Sisa capability recon ditunda ke batch fix serentak.
+
+---
+
+## BATCH FIX SERENTAK DEFERRED NOTES (Batch 11)
+
+### [MOD-063] Unscoped Cloud Account/Tenant Execution via Ambient Credentials on `cloud.*`
+- **Severity**: **HIGH**
+- **Status**: **DEFERRED (Masuk batch fix serentak - Grup D: Scope Bypass)**
+- **Catatan**: Seluruh 4 modul cloud (`cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp`) tidak memvalidasi cloud target identifier (`Account` dari STS caller identity, `subscription_id`, `tenant_id`, `project_id`) terhadap batasan `campaign.scope`. Ambient developer credentials (`~/.aws/credentials`, `az login`, `GOOGLE_APPLICATION_CREDENTIALS`) dapat mengeksekusi scanning di luar otorisasi engagement.
+
+### [MOD-064] Operator Workstation Link-Local Metadata SSRF Probe & Token Leak on `cloud.aws` & `cloud.gcp`
+- **Severity**: **HIGH**
+- **Status**: **FIXED** (commit `d86750b`)
+- **Catatan**: Probing metadata link-local dari workstation operator (`http://169.254.169.254` dan `http://metadata.google.internal`) telah dihapus sepenuhnya dari `cloud.aws` dan `cloud.gcp`. Tidak ada lagi risiko kebocoran IAM credentials operator atau false finding atribusi target.
+
+### [MOD-065] Missing Pre-Flight SDK Dependency Validation in `validate()` on `cloud.*`
+- **Severity**: **MEDIUM**
+- **Status**: **DEFERRED (Masuk batch fix serentak - Grup E: Robustness & Pre-flight)**
+- **Catatan**: `validate()` tidak memeriksa kelengkapan modul eksternal (`boto3`, `azure-identity`, `azure-mgmt-*`, `msal`, `google-auth`), sehingga modul lulus scheduling tapi crash unhandled di runtime saat library belum terpasang. Estimasi fix: S (4 file, pola identik).
+
+### [MOD-066] 100% Normalizer Data Loss on `azure_findings`, `azure_ad_findings`, `access_tokens` on `cloud.azure` & `cloud.azure_ad`
+- **Severity**: **HIGH**
- **Status**: **DEFERRED (Masuk batch fix serentak - Grup A: Normalizer Handlers Missing)**
-- **Catatan**: Seluruh 9 capability recon (`fingerprint_result`, `dns_records`, `subdomains`, `web_fingerprint`, `admin_interfaces`, `service_versions`, `vulnerable_services`, `snmp_findings`, `system_info`) tidak memiliki handler di `ArtifactNormalizer`.
+- **Catatan**: `OUTPUTS = ["azure_findings"]` dan `OUTPUTS = ["azure_ad_findings", "access_tokens"]` tidak memiliki handler di `ArtifactNormalizer`. Seluruh telemetry storage container, RBAC assignments, NSG rules, guest users, dan OAuth access tokens hilang 100% dari `ArtifactStore`.
+
+### [MOD-067] Indentation Defect Causing `UnboundLocalError` & 100% Unreachable Graph API Dead Code on `cloud.azure_ad`
+- **Severity**: **CRITICAL**
+- **Status**: **FIXED** (commit `bd2c9b4`)
+- **Catatan**: Indentasi blok return device_code telah diperbaiki di dalam `if technique == "device_code":`, variabel `raw` diinisialisasi di awal method `run()`, dan jalur eksekusi Graph API enumeration (`_enumerate_tenant`) untuk users, guests, dan privileged service principals telah dipulihkan sepenuhnya. Output `raw["azure_ad_findings"]` dijamin selalu ada.
+
+### [MOD-068] 100% Normalizer Data Loss on `gcp_findings` in `ArtifactNormalizer` on `cloud.gcp`
+- **Severity**: **HIGH**
+- **Status**: **DEFERRED (Masuk batch fix serentak - Grup A: Normalizer Handlers Missing)**
+- **Catatan**: `OUTPUTS = ["gcp_findings"]` tidak terdaftar di `ArtifactNormalizer.handlers`. Seluruh temuan enumerasi GCS public buckets, project IAM owner roles, dan service account keys menguap dari `ArtifactStore`.
+
diff --git a/MASTER_FIX_PLAN.md b/MASTER_FIX_PLAN.md
index 8e06ceb..2e96a14 100644
--- a/MASTER_FIX_PLAN.md
+++ b/MASTER_FIX_PLAN.md
@@ -1,34 +1,34 @@
-# ARES Master Remediation Plan: Consolidated Deferred Findings (Batch 1–9)
+# ARES Master Remediation Plan: Consolidated Deferred Findings (Batch 1–11)
> **Dokumen**: `MASTER_FIX_PLAN.md`
> **Status**: Living Execution Blueprint
> **Tanggal Konsolidasi**: 26 September 2026
-> **Cakupan Audit**: Batch 1 sampai Batch 9 (45 modul offensive/core)
+> **Cakupan Audit**: Batch 1 sampai Batch 11 (49 modul offensive/core)
> **Aturan Eksekusi**: Rule 1 (Zero Over-claiming), Rule 3 (Fix at Root & Grep Before Complete), Rule 4 (Zero Collateral & Guaranteed Teardown)
---
-## 1. Status Ringkasan Temuan (Batch 1–10)
+## 1. Status Ringkasan Temuan (Batch 1–11)
| Metrik Audit | Jumlah | Keterangan |
|---|:---:|---|
-| **Total Temuan Teridentifikasi** | **62** | MOD-001 s/d MOD-062 |
-| **Sudah Diperbaiki (FIXED)** | **14** | Code fixes + regression tests lulus di main branch |
+| **Total Temuan Teridentifikasi** | **68** | MOD-001 s/d MOD-068 |
+| **Sudah Diperbaiki (FIXED)** | **17** | Code fixes + regression tests lulus di main branch (termasuk MOD-061, MOD-064, MOD-067) |
| **Mitigasi / Dinonaktifkan (DISABLED)** | **4** | `ad.ghost_forge`, `windows.dpapi`, `windows.token_impersonation`, `cloud.phantom_token` |
-| **Masih Open (DEFERRED)** | **44** | Dikonsolidasikan ke dalam Grup A–F untuk eksekusi serentak |
+| **Masih Open (DEFERRED)** | **47** | Dikonsolidasikan ke dalam Grup A–F untuk eksekusi serentak |
### Ringkasan Status per Kelompok
```
-Total Temuan: 62
-├── FIXED (14) [22.6%] ══════════════
-├── DISABLED (4) [ 6.5%] ═══
-└── DEFERRED (44) [70.9%] ═══════════════════════════════════
- ├── Grup A: Normalizer Handlers Missing (10 temuan / capability sets)
+Total Temuan: 68
+├── FIXED (17) [25.0%] ════════════════
+├── DISABLED (4) [ 5.9%] ═══
+└── DEFERRED (47) [69.1%] ══════════════════════════════════
+ ├── Grup A: Normalizer Handlers Missing (11 temuan / capability sets)
├── Grup B: Hash Masking di Finding.evidence (2 temuan)
├── Grup C: Teardown & Resource Cleanup (7 temuan)
├── Grup D: Scope Bypass Listener / Destination Parameter (11 temuan)
├── Grup E: Fake/Stub Implementation & Pipeline Disconnect (11 temuan)
- └── Grup F: Architectural Decisions Needed (4 temuan / gates)
+ └── Grup F: Architectural Decisions Needed (5 temuan / gates)
```
---
@@ -53,6 +53,9 @@ Berikut adalah daftar temuan yang telah diselesaikan dengan bukti commit pada br
| **MOD-054** | `ad.enum_spn` | Internal key mismatch sync (`spn_list` $\leftrightarrow$ `spns`) | `f0825df` |
| **MOD-055** | `ad.laps_enum` | Direct vault write + OPSEC-safe raw output (`has_password: True`) | `4bbf61d` |
| **MOD-056 (P)** | `ad.enum_users` | Dual-write standard `users` key (`user_list` & `users`) | `bc8c830` |
+| **MOD-061** | `network.snmp_enum` | Direct vault write (Gate 6) + standard `valid_credentials` contract | `5635362` |
+| **MOD-064** | `cloud.aws`, `cloud.gcp` | Removal of operator-host link-local metadata probe (`169.254.169.254` / `metadata.google.internal`) | `d86750b` |
+| **MOD-067** | `cloud.azure_ad` | Indentation defect fix: resolved UnboundLocalError & restored Microsoft Graph API enumeration | `bd2c9b4` |
*Catatan: Modul yang dinonaktifkan demi keamanan operator (`ad.ghost_forge` [MOD-005], `windows.dpapi` [MOD-029], `windows.token_impersonation` [MOD-030], `cloud.phantom_token` [MOD-049]) dilindungi fail-fast guard dan tidak diizinkan masuk active catalog.*
@@ -66,18 +69,22 @@ Berikut adalah daftar temuan yang telah diselesaikan dengan bukti commit pada br
Seluruh temuan berikut mengalami fenomena **data evaporation (100% data loss)** di mana modul offensive berhasil mengambil telemetry bernilai tinggi, namun `ArtifactNormalizer.normalize()` mengabaikannya karena belum memiliki handler routing.
+*(Catatan: 7 handler normalizer untuk MOD-036, MOD-041, MOD-044, MOD-052, dan MOD-062 telah diimplementasikan pada commit `5635362` di `ares/normalize/artifacts.py`)*
+
| ID | Modul | Capability / Output Key | Tipe Artifact yang Dibutuhkan | Rencana Solusi di `artifacts.py` |
|---|---|---|---|---|
| **MOD-016** | `ad.sccm` | `cleartext_credentials` (DPAPI NAA blobs) | `CredentialArtifact(cred_type="dpapi_blob")` | Tambah handler `_normalize_sccm_credentials` atau perbaiki extractor agar tidak melabeli ciphertext sebagai cleartext. |
-| **MOD-036** | `credential.ticket_converter` | `converted_ticket` / `converted_ticket_b64` | `CredentialArtifact(cred_type="kerberos_ticket")` | Mapping capability `converted_ticket` $\rightarrow$ `_normalize_kerberos_tickets` dengan decoder base64 otomatis. |
+| **MOD-036** | `credential.ticket_converter` | `converted_ticket` / `converted_ticket_b64` | `CredentialArtifact(cred_type="kerberos_ticket")` | *(Handler normalizer diimplementasikan di `5635362`)*. Routing `_normalize_converted_ticket`. |
| **MOD-040** | `linux.container` | `container_escape_vectors`, `k8s_rbac_findings` | `HostVulnArtifact` & `PermissionArtifact` | Buat handler `_normalize_container_vectors` & `_normalize_k8s_rbac`. |
-| **MOD-041** | `linux.samba_secrets` | `machine_account_hash`, `samba_secrets` | `HashArtifact(hash_type="ntlm")`, `CredentialArtifact` | Routing ke `_normalize_ntlm_hashes` dan handler baru `_normalize_samba_secrets`. |
-| **MOD-044** | `linux.keytab_abuse` | `machine_credentials`, `kerberos_keys` | `CredentialArtifact(cred_type="keytab_key")` | Handler `_normalize_keytab_keys` memparsing entri keytab (KVNO, encryption type, key bytes). |
+| **MOD-041** | `linux.samba_secrets` | `machine_account_hash`, `samba_secrets` | `HashArtifact(hash_type="ntlm")`, `CredentialArtifact` | *(Handler normalizer diimplementasikan di `5635362`)*. Routing `_normalize_samba_secrets`. |
+| **MOD-044** | `linux.keytab_abuse` | `machine_credentials`, `kerberos_keys` | `CredentialArtifact(cred_type="keytab_key")` | *(Handler normalizer diimplementasikan di `5635362`)*. Routing `_normalize_keytab_keys`. |
| **MOD-051** | `cloud.identity_federation_abuse` | `federation_trusts`, `golden_saml_paths`, `oauth_tokens`, `pivot_paths` | `CloudResourceArtifact` & `CredentialArtifact` | Handler modular untuk token OAuth dan topologi trust federasi cloud. |
-| **MOD-052** | `cloud.aws_privesc` | `aws_privesc_paths`, `iam_privesc_paths` | `PermissionArtifact(privilege="privesc_vector")` | Handler `_normalize_iam_privesc` mengonversi daftar path eksploitasi IAM ke permission finding terstruktur. |
+| **MOD-052** | `cloud.aws_privesc` | `aws_privesc_paths`, `iam_privesc_paths` | `PermissionArtifact(privilege="privesc_vector")` | *(Handler normalizer diimplementasikan di `5635362`)*. Routing `_normalize_iam_privesc`. |
| **MOD-056** | `ad.enum_users` | `password_policy` | `DomainPolicyArtifact` (atau `HostArtifact` metadata) | Buat handler `_normalize_password_policy` untuk mencatat panjang password, threshold lockout, dan durasi audit. |
-| **MOD-061** | `network.snmp_enum` | `snmp_findings`, `valid_credentials` (SNMP) | `CredentialArtifact(cred_type="snmp_community")` | Simpan community string ke vault dan tambahkan handler normalizer untuk SNMP community strings. |
-| **MOD-062** | `recon.fingerprint`, `network.*` | `fingerprint_result`, `dns_records`, `subdomains`, `web_fingerprint`, `admin_interfaces`, `service_versions`, `vulnerable_services` | `HostArtifact` & `HostVulnArtifact` | Tambahkan handler normalizer recon untuk mengekstrak hostname, subdomain, web attack surface, dan banner service ke `HostArtifact`. |
+| **MOD-061** | `network.snmp_enum` | `snmp_findings`, `valid_credentials` (SNMP) | `CredentialArtifact(cred_type="snmp_community")` | **FIXED** (commit `5635362`). Vault write Gate 6 + standard `valid_credentials` contract. |
+| **MOD-062** | `recon.fingerprint`, `network.*` | `fingerprint_result`, `dns_records`, `subdomains`, `web_fingerprint`, `admin_interfaces`, `service_versions`, `vulnerable_services` | `HostArtifact` & `HostVulnArtifact` | *(7 Handler normalizer diimplementasikan di `5635362`)* (`dns_records`, `subdomains`, `service_versions`, `vulnerable_services`, `web_fingerprint`, `admin_interfaces`). Sisa recon capability ditunda ke batch fix serentak. |
+| **MOD-066** | `cloud.azure`, `cloud.azure_ad` | `azure_findings`, `azure_ad_findings`, `access_tokens` | `CloudResourceArtifact` & `CredentialArtifact` | Tambah handler `_normalize_azure` & `_normalize_azure_ad` untuk mengekstrak storage accounts, RBAC bindings, NSG rules, guest users, dan token akses. |
+| **MOD-068** | `cloud.gcp` | `gcp_findings` | `CloudResourceArtifact` & `PermissionArtifact` | Tambah handler `_normalize_gcp` untuk mengekstrak GCS public buckets, project IAM bindings, dan service account keys. |
**Estimasi Pengerjaan**: 1 commit per sub-kategori capability (AD, Linux, Cloud). Semua perubahan terlokalisasi di `ares/normalize/artifacts.py` dan unit test di `tests/unit/test_artifact_normalizer_pipeline.py`.
@@ -136,6 +143,7 @@ Engine `_extract_all_targets` hanya mengekstrak parameter target primer (`target
| **MOD-032** | `credential.reuse` | `login.microsoftonline.com` | HTTPS (443) | Cegah auto-probing endpoint publik jika target bertipe RFC1918 internal. |
| **MOD-058** | `network.dns_enum` | `ns_host` / `ns_clean` (AXFR zone transfer) | TCP (53) | Tambah `await self.before_request(ns_clean, "dns")` sebelum query zone transfer AXFR. |
| **MOD-059** | `network.http_fingerprint` | External redirect URLs via `follow_redirects=True` | HTTP / HTTPS | Custom redirect hook untuk memvalidasi `campaign.is_in_scope()` sebelum mengikuti redirect ke host luar. |
+| **MOD-064** | `cloud.aws`, `cloud.gcp` | `http://169.254.169.254`, `http://metadata.google.internal` | HTTP (80) | **FIXED** (commit `d86750b`). Probing metadata lokal workstation operator telah dihapus dari `cloud.aws` dan `cloud.gcp`. |
**Fix Pattern**:
```python
@@ -146,7 +154,7 @@ if listener_ip:
---
-### Grup E: Fake/Stub Implementation (Masih Aktif)
+### Grup E: Fake/Stub Implementation & Pipeline Disconnect (Masih Aktif)
Modul-modul ini masih aktif di katalog, namun memiliki klaim kemampuan fiktif, parsing hardcoded kosong, atau heuristik lemah yang memicu false positive. Melanggar **Rule 1 ARES (Anti-Hype Policy & Zero Over-claiming)**.
@@ -163,7 +171,9 @@ Modul-modul ini masih aktif di katalog, namun memiliki klaim kemampuan fiktif, p
| **MOD-043** | `linux.ccache_hunt` | Scan `/proc/keys` dan socket KCM menyuntikkan string kosong `""` ke `AresVault`. | Blokir penyimpanan vault jika byte tiket kosong (sejalan dengan Gate 6). |
| **MOD-047** | `persistence.scheduled_task` | Inverted default `dry_run=True` pada `RegistryRunKeyPersistence`. | Set default `dry_run=False` (mengikuti setting context eksekusi). |
| **MOD-057** | `ad.enum_acl`, `ad.laps_enum` | Raw string concatenation `user=f"{domain}\\{username}"` membypass `build_ad_bind_plan()`. | Migrasi ke `build_ad_bind_plan()` untuk standardisasi UPN/NTLM domain binding. |
-| **MOD-061** | `network.snmp_enum` | Menyimpan list `Finding` objek mentah di `raw["snmp_findings"]` dan tidak memformat ke kontrak standar `valid_credentials` (MOD-033). | Serialisasi findings ke dicts dan tuliskan community string yang valid ke vault / `valid_credentials`. |
+| **MOD-061** | `network.snmp_enum` | Menyimpan list `Finding` objek mentah di `raw["snmp_findings"]` dan tidak memformat ke kontrak standar `valid_credentials` (MOD-033). | **FIXED** (commit `5635362`). Serialisasi findings ke dicts dan tuliskan community string yang valid ke vault / `valid_credentials`. |
+| **MOD-065** | `cloud.*` | `validate()` tidak memverifikasi import SDK cloud (`boto3`, `azure-identity`, `azure-mgmt-*`, `msal`, `google-auth`). | Tambahkan import pre-flight check dengan `find_spec()` dan raise `ModuleValidationError` informatif (Estimasi Fix: S - 4 file, pola identik). |
+| **MOD-067** | `cloud.azure_ad` | Indentasi return statement salah pada `run()`, memicu `UnboundLocalError` pada default `technique="enumerate"` dan memutus 100% eksekusi Microsoft Graph API (dead code). | **FIXED** (commit `bd2c9b4`). Indentasi return blok `device_code` diperbaiki, inisialisasi `raw` di awal method, enumerasi Graph API dipulihkan. |
---
@@ -171,12 +181,12 @@ Modul-modul ini masih aktif di katalog, namun memiliki klaim kemampuan fiktif, p
Temuan arsitektural yang membutuhkan keputusan desain dan persetujuan lead engineer sebelum dieksekusi:
-1. **MOD-053: Cloud Scope Gap (Architectural Gap)**
- - **Masalah**: `ScopeGuard` hanya mengevaluasi IP/CIDR/DNS. Modul cloud (`aws_privesc`, `identity_federation_abuse`) menggunakan identifier cloud seperti `aws_account_id`, `tenant_id`, `subscription_id`, `arn:aws:iam::*`.
+1. **MOD-053 & MOD-063: Cloud Scope Gap (Architectural Gap)**
+ - **Masalah**: `ScopeGuard` hanya mengevaluasi IP/CIDR/DNS. Modul cloud (`aws_privesc`, `identity_federation_abuse`, `cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp`) menggunakan identifier cloud seperti `aws_account_id` (STS), `tenant_id`, `subscription_id`, `project_id`, `arn:aws:iam::*` yang saat ini lolos tanpa validasi scope campaign.
- **Opsi Solusi**:
- - *Opsi 1*: Tambahkan dataclass `CloudScope` ke dalam `Campaign` (`allowed_aws_accounts`, `allowed_azure_tenants`).
+ - *Opsi 1*: Tambahkan dataclass `CloudScope` ke dalam `Campaign` (`allowed_aws_accounts`, `allowed_azure_tenants`, `allowed_gcp_projects`).
- *Opsi 2*: Buat `CloudScopeGuard` terpisah yang diinjeksi via `ExecutionContext`.
- - **Rekomendasi**: Opsi 1 (ekstensi deklaratif pada `CampaignScope`).
+ - **Rekomendasi**: Opsi 1 (ekstensi deklaratif pada `CampaignScope`) + helper `validate_cloud_scope`.
2. **Gate 1: Parameter & Boundary Integrity Guard**
- Penegakan validasi schema Pydantic sebelum modul diizinkan memasuki tahap scheduling.
diff --git a/MODULE_AUDIT_INVENTORY.md b/MODULE_AUDIT_INVENTORY.md
index e2ba474..c089152 100644
--- a/MODULE_AUDIT_INVENTORY.md
+++ b/MODULE_AUDIT_INVENTORY.md
@@ -409,9 +409,17 @@ Seluruh modul **TIER 1 (Critical)** dan **TIER 2 (High)** telah dikelompokkan ke
- [`ares/modules/network/service_detect.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/network/service_detect.py) — *Service Detection (`network.service_detect`)* (399 baris)
- [`ares/modules/network/snmp_enum.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/network/snmp_enum.py) — *SNMP Enumeration (`network.snmp_enum`)* (415 baris)
-### Batch 11: Cloud Asset & Infrastructure Discovery (TIER 2 - HIGH)
+### Batch 11: Cloud Asset & Infrastructure Discovery (TIER 2 - HIGH) - [STATUS: AUDITED]
- **Deskripsi**: Modul enumerasi read-only aset infrastruktur cloud publik (AWS EC2/S3/IAM, Azure VMs/Subscriptions, Entra ID / Azure AD, GCP Projects & Compute).
-- **Fokus Risiko Audit**: Penanganan rate limiting / throttling API cloud, parsing response JSON API tak terduga, isolasi credential cloud antar target tenant.
+- **Fokus Risiko Audit**: Penanganan rate limiting / throttling API cloud, parsing response JSON API tak terduga, isolasi credential cloud antar target tenant, validasi SDK dependency, proteksi SSRF link-local metadata operator.
+- **Status Audit**: **SELESAI (AUDITED)**
+- **Hasil Temuan**: **6 Temuan Terkonfirmasi** (1 Critical, 4 High, 1 Medium)
+ - `MOD-063` (High): Unscoped Cloud Account/Tenant Execution via Ambient Credentials pada `cloud.aws`, `cloud.azure`, `cloud.azure_ad`, `cloud.gcp` (ketiadaan validasi target cloud ID terhadap `campaign.scope`).
+ - `MOD-064` (High): Operator Workstation Link-Local Metadata SSRF Probe & Token Leak pada `cloud.aws` (`169.254.169.254`) dan `cloud.gcp` (`metadata.google.internal`).
+ - `MOD-065` (Medium): Missing Pre-Flight SDK Dependency Validation in `validate()` pada seluruh 4 modul cloud (`boto3`, `azure-identity`, `azure-mgmt-*`, `msal`, `google-auth`).
+ - `MOD-066` (High): 100% Normalizer Data Loss on `azure_findings`, `azure_ad_findings`, dan `access_tokens` pada `cloud.azure` dan `cloud.azure_ad`.
+ - `MOD-067` (Critical): Indentation Defect Causing `UnboundLocalError` & 100% Unreachable Graph API Dead Code pada `cloud.azure_ad` (`technique="enumerate"` crash dan blok Graph API terpotong).
+ - `MOD-068` (High): 100% Normalizer Data Loss on `gcp_findings` in `ArtifactNormalizer` pada `cloud.gcp`.
- **Jumlah File**: 4 file
- **Daftar File**:
- [`ares/modules/cloud/aws.py`](file:///c:/Users/ASUS/Desktop/ARES/ares/modules/cloud/aws.py) — *AWS Recon & Attack (`cloud.aws`)* (347 baris)
diff --git a/NORMALIZER_CONTRACT_AUDIT.md b/NORMALIZER_CONTRACT_AUDIT.md
index 496c802..d702b0c 100644
--- a/NORMALIZER_CONTRACT_AUDIT.md
+++ b/NORMALIZER_CONTRACT_AUDIT.md
@@ -31,8 +31,8 @@ normalized = ArtifactNormalizer().normalize(
| ✅ **MATCH (Selaras Penuh)** | 6 pasangan modul | 30.0% | Data mengalir sempurna ke `ArtifactStore` |
| 🔧 **FIXED (Dual-Read Fallback Diterapkan)** | 14 pasangan modul | 70.0% | **Data dipulihkan via Dual-Read Fallback** |
| ⚠️ **ORPHANED HANDLER** | 0 handler | 0.0% | Semua handler memiliki minimal 1 modul deklarator |
-| 🆕 **HANDLER BARU DITAMBAHKAN** | 8 capability | - | `lsa_secrets`, `cached_credentials`, `valid_credentials`, `cleartext_credentials`, `cracked_credentials`, `laps_passwords`, `kerberos_tickets`, `open_ports` |
-| 🚫 **UNHANDLED OUTPUTS** | **78 capability** | - | Output modul diabaikan sepenuhnya oleh normalizer (berkurang dari 86) |
+| 🆕 **HANDLER BARU DITAMBAHKAN** | 15 capability | - | `lsa_secrets`, `cached_credentials`, `valid_credentials`, `cleartext_credentials`, `cracked_credentials`, `laps_passwords`, `kerberos_tickets`, `open_ports`, `converted_ticket`, `samba_secrets`, `keytab_keys`, `iam_privesc`, `dns_records`, `service_versions`, `web_fingerprint` |
+| 🚫 **UNHANDLED OUTPUTS** | **71 capability** | - | Output modul diabaikan sepenuhnya oleh normalizer (berkurang dari 78 pasca 7 Group A handlers) |
---
@@ -84,8 +84,12 @@ Tabel di bawah ini memetakan seluruh 9 capability yang memiliki handler di `ares
| `valid_credentials` | `ad.laps_enum` | `laps_passwords` / `valid_credentials` | direct vault write + OPSEC raw (`has_password: True`) | ✅ **FIXED** (MOD-055) | Passwords stored directly to vault (Gate 6 validated); raw output OPSEC-safe with `has_password: True`. |
| `user_list` / `users` | `ad.enum_users` | `users` OR `user_list` | `users`, `user_list` | ✅ **FIXED** (MOD-056 partial) | Dual-write `raw["users"]` and `raw["user_list"]` implemented. |
| `password_policy` | `ad.enum_users` | — | `password_policy` | ❌ **MISMATCH, no handler, DEFERRED** | Unhandled output telemetry (`no handler`). Ditunda ke batch fix serentak. |
-| `snmp_findings` / `valid_credentials` | `network.snmp_enum` | — | `valid_communities`, `snmp_findings` | ❌ **MISMATCH, no handler, DEFERRED** (MOD-061) | Kredensial valid SNMP tidak disimpan ke vault dan tidak ada handler normalizer. |
-| Reconnaissance capabilities (`fingerprint_result`, `dns_records`, `subdomains`, `web_fingerprint`, `admin_interfaces`, `service_versions`, `vulnerable_services`) | `recon.fingerprint`, `network.dns_enum`, `network.http_fingerprint`, `network.service_detect` | — | Various raw dicts | ❌ **MISMATCH, no handler, DEFERRED** (MOD-062) | 100% output recon Batch 10 tidak memiliki handler di normalizer. Data host & network recon hilang dari `ArtifactStore`. |
+| `snmp_findings` / `valid_credentials` | `network.snmp_enum` | `valid_credentials` | `valid_credentials`, `snmp_findings` | ✅ **FIXED** (MOD-061, commit `5635362`) | Direct vault write Gate 6 + `valid_credentials` contract standar `list[dict]`. |
+| Reconnaissance capabilities (`dns_records`, `subdomains`, `web_fingerprint`, `admin_interfaces`, `service_versions`, `vulnerable_services`) | `recon.fingerprint`, `network.dns_enum`, `network.http_fingerprint`, `network.service_detect` | `dns_records`, `subdomains`, `service_versions`, `web_fingerprint`, dll. | Various raw dicts | ✅ **PARTIALLY FIXED** (7 Handlers in commit `5635362`) | 7 handler normalizer recon ditambahkan ke `ArtifactNormalizer`. Sisa recon capability ditunda ke batch fix serentak. |
+| `azure_findings` | `cloud.azure` | — | `azure_findings` | ❌ **MISMATCH, no handler, DEFERRED** (MOD-066) | Output capability `azure_findings` tidak memiliki handler di `ArtifactNormalizer`. Data storage accounts, RBAC, dan NSG hilang 100% dari `ArtifactStore`. |
+| `azure_ad_findings` | `cloud.azure_ad` | — | `azure_ad_findings` | ❌ **MISMATCH, no handler, DEFERRED** (MOD-066) | Output capability `azure_ad_findings` tidak memiliki handler di `ArtifactNormalizer`. Data user dan guest Entra ID serta privileged service principals hilang dari `ArtifactStore`. |
+| `access_tokens` | `cloud.azure_ad` | — | `access_tokens` | ❌ **MISMATCH, no handler, DEFERRED** (MOD-066) | Output capability `access_tokens` (captured device code / client credential tokens) tidak memiliki handler di `ArtifactNormalizer`. |
+| `gcp_findings` | `cloud.gcp` | — | `gcp_findings` | ❌ **MISMATCH, no handler, DEFERRED** (MOD-068) | Output capability `gcp_findings` tidak memiliki handler di `ArtifactNormalizer`. Data public GCS buckets, IAM project roles, dan SA keys hilang dari `ArtifactStore`. |
---
diff --git a/batch11_audit_report.md b/batch11_audit_report.md
new file mode 100644
index 0000000..51f32b2
--- /dev/null
+++ b/batch11_audit_report.md
@@ -0,0 +1,242 @@
+# 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.