ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.
Python active-directorycloud-securitydefensive-validationfastapigood-first-issuemitre-attackopsecreactred-teamreportingsecurity
Revert "docs(research): add ARES vs GOAD validation matrix, Kahn DAG proof, and automated test suite"
Mafifrizice3dc753e752
diff --git a/README.md b/README.mdindex b1652df..1536593 100644--- a/README.md+++ b/README.md@@ -710,7 +710,6 @@ Comprehensive documentation is available in the [`docs/`](docs/) directory:- [**Documentation Portal & Subsystem Index**](docs/README.md)- [**Quickstart Engagement Guide**](QUICKSTART.md)-- [**ARES vs GOAD Validation Matrix & Benchmark Report**](docs/research/goad-validation-matrix.md)- [**RFC 001: Linux Active Directory & Cross-Platform Tradecraft**](docs/research/linux-active-directory-tradecraft.md)- [**Next-Gen Module SDK Specification (v2)**](docs/module_sdk.md)- [**ARES MCP Server & Product-Grade CLI Specification**](docs/mcp-server.md)diff --git a/docs/README.md b/docs/README.mdindex 75eee87..1e42880 100644--- a/docs/README.md+++ b/docs/README.md@@ -51,7 +51,6 @@ The documentation is organized into six functional pillars:| Document | Description | Target Audience || --- | --- | --- || [linux-active-directory-tradecraft.md](research/linux-active-directory-tradecraft.md) | RFC 001 (Implemented): Cross-platform Linux Active Directory post-exploitation suite (SSSD cache harvesting, Kerberos ccache extraction, keytab abuse, Samba secrets, ticket converter). | Offensive Researchers, Red Team |-| [goad-validation-matrix.md](research/goad-validation-matrix.md) | BENCHMARK 2026: ARES vs Orange Cyberdefense GOAD (Game of Active Directory) Validation Matrix, Kahn DAG execution proof, and architectural rigor report. | Red Team Leads, Architects, SecOps |---diff --git a/docs/research/goad-validation-matrix.md b/docs/research/goad-validation-matrix.mddeleted file mode 100644index cae6bbf..0000000--- a/docs/research/goad-validation-matrix.md+++ /dev/null@@ -1,179 +0,0 @@-# ARES vs GOAD (Game of Active Directory) Validation Matrix-## Architectural Rigor & Empirical Benchmark Report--- **Report Identifier**: `BENCHMARK-ARES-2026-GOAD`-- **Target Environment**: [Orange Cyberdefense GOAD (Game of Active Directory)](https://github.com/Orange-Cyberdefense/GOAD)-- **Domain**: Enterprise Active Directory Red Teaming & Continuous Security Validation-- **Status**: Production Verified (ARES Engine v6.0-Enterprise)-- **Author**: ARES Architecture & Red Team Engineering Group-- **Test Suite Verification**: 100% Passing (`tests/unit/test_goad_matrix_verification.py`, 4,625+ automated suite tests)-------## 1. Executive Summary: Refuting the "Vibecoded Script Collection" Fallacy--When advanced security tooling integrates artificial intelligence, a common and reasonable industry skepticism emerges:-> *"Is this just another vibecoded collection of offensive scripts wrapped around an LLM prompt?"*-> *(e.g. Community commentary on LinkedIn re: Orange Cyberdefense GOAD validation)*--**ARES definitively answers this question with empirical architecture.**--ARES is not an AI script wrapper, an unverified shell runner, or a prompt hallucination engine. It is an **operator-directed, deterministic engagement platform** engineered specifically for hybrid enterprise networks and complex Active Directory forests such as Orange Cyberdefense's **GOAD**.--In ARES:-1. **Zero LLM Execution Hallucination**: AI is strictly quarantined to offline tactical suggestions (`ChainAdvisor`). Every attack transition is resolved via a **deterministic directed acyclic graph (DAG)** using Kahn's topological sort algorithm (`DependencyResolver`).-2. **Deterministic Protocol Implementations**: ARES communicates with Domain Controllers using RFC-compliant Kerberos ASN.1 parsers, native LDAP ASN.1 filters, and MS-RPC/DCE-RPC interfaces (via Impacket bindings)—not fragile subshell pipes or wrapped CLI binaries.-3. **Three-Tier Fail-Closed Scope Enforcement**: Out-of-scope targets are intercepted and blocked at the parameter schema layer (`ScopeGuard`), the socket transport layer (`ScopeFirewall`), and OS packet filtering layers (`OSFirewallController`).-4. **Empirical Quality Engineering**: Every single module and DAG resolver is backed by automated regression tests in the 4,625+ passing test suite.-------## 2. GOAD Target Topology Overview--Orange Cyberdefense's GOAD represents the industry gold standard for vulnerable Active Directory lab environments. Its multi-domain, multi-forest topology encompasses complex trust relationships, legacy protocol weaknesses, and modern certificate misconfigurations:--```- GOAD ENTERPRISE TOPOLOGY- ┌────────────────────────────────────────────────────────────────────────┐- │ SEVENKINGDOMS.LOCAL │- │ Forest Root Domain │- │ - DC01 (Domain Controller: Windows Server 2019) │- │ - SRV01 (Member Server: MSSQL, IIS, Web App) │- │ - CA01 (Active Directory Certificate Services - AD CS) │- └───────────────────────────────────┬────────────────────────────────────┘- │ Bidirectional Forest Trust- ┌───────────────────────────────────┴────────────────────────────────────┐- │ NORTH.SEVENKINGDOMS.LOCAL │- │ Child / Trusted Domain │- │ - DC02 (Domain Controller: Kerberoastable Accounts, LAPS) │- │ - SRV02 (Workstation: Unconstrained Delegation, PetitPotam) │- └────────────────────────────────────────────────────────────────────────┘-```-------## 3. GOAD Attack Vector to ARES Production Module Mapping--The table below maps every canonical attack path in GOAD directly to its production ARES execution module, corresponding MITRE ATT&CK technique, input/output capabilities, and safety gating:--| GOAD Attack Scenario | Vulnerability / Target Component | ARES Module ID | MITRE ATT&CK | Execution Mechanism & Protocol | Safety & Scope Gate |-| :--- | :--- | :--- | :--- | :--- | :--- |-| **1. User & Group Recon** | Anonymous / Authenticated LDAP bind | `ad.enum_users` | T1087.002 | Pure Python LDAP ASN.1 query via port 389/636 | `ScopeGuard` Gate 5 IP validation |-| **2. AS-REP Roasting** | Account `fcastle` (`DONT_REQ_PREAUTH`) | `ad.asreproast` | T1558.004 | Native Kerberos KRB_AS_REQ / KRB_AS_REP extraction | Non-destructive ticket request; masked in vault |-| **3. Service Principal Discovery** | SPN enumeration across domain | `ad.enum_spn` | T1069.002 | LDAP filter `(servicePrincipalName=*)` | Read-only attribute extraction |-| **4. Kerberoasting** | Service account `sql_svc` (TGS request) | `ad.kerberoast` | T1558.003 | Native KRB_TGS_REQ for RC4/AES hashes | Single-ticket targeted acquisition |-| **5. AD CS Certificate Abuse** | Vulnerable template `ESC1` on `CA01` | `ad.adcs` | T1649 | MS-ICPR / MS-WCCE interface certificate request | Client authentication certificate validation |-| **6. Auth Coercion** | PetitPotam (`MS-EFSR`) / PrinterBug (`MS-RPRN`) | `ad.coerce` | T1187 | DCE-RPC transport with strict target authentication | `ScopeFirewall` egress socket isolation |-| **7. NTLM Relay to LDAP/S** | Unauthenticated DC relay for RBCD | `lateral.ntlm_relay` | T1557.001 | Real-time SMB/HTTP-to-LDAP authentication relay | Secondary parameter scope authorization |-| **8. LAPS Credential Recovery** | `ms-Mcs-AdmPwd` attribute exposure | `ad.laps_enum` | T1552.001 | LDAP attribute search with extended rights audit | Vault AES-256-GCM encrypted persistence |-| **9. Kerberos Delegation** | Unconstrained & Constrained Delegation | `ad.delegation_abuse` | T1558.002 | S4U2self & S4U2proxy Kerberos protocol extension | Controlled impersonation token generation |-| **10. MSSQL Pivoting** | Linked SQL servers & `xp_cmdshell` | `lateral.mssql` | T1090 | TDS protocol native connection with state tracking | Command execution audit logging |-| **11. DCSync Replication** | `DS-Replication-Get-Changes-All` rights | `ad.dcsync` | T1003.006 | DRSUAPI `IDL_DRSGetNCChanges` RPC call | Requires verified Domain Admin credentials |-------## 4. Architectural Proof: Deterministic DAG Engine vs "Vibecoded" Scripts--### 4.1 Kahn's Algorithm Topological Resolution-In contrast to scripts running sequentially with blind shell pipes, ARES resolves attack stages via Kahn's algorithm:--```- Step 1: Discover SPNs & Accounts- [ad.enum_users] [ad.enum_spn]- \ /- \ /- Step 2: Credential Extraction- [ad.asreproast] [ad.kerberoast]- \ /- \ /- Step 3: Privilege Escalation- [ad.adcs] (ESC1) [ad.delegation_abuse]- \ /- \ /- Step 4: Objective / Domain Compromise- [ad.dcsync]-```--When an operator launches an ARES engagement targeting a GOAD environment:-1. `CapabilityResolver` maps declared `REQUIRES` and `OUTPUTS` across all selected modules.-2. `DependencyResolver` constructs an acyclic dependency graph and partitions execution into strictly ordered stages.-3. If prerequisite credentials or artifacts (e.g. `domain_admin_creds` for `ad.dcsync`) are missing, the DAG engine **blocks execution immediately with zero wasted network noise**.--### 4.2 Three-Layer Fail-Closed Scope Architecture-Every outbound packet destined for a GOAD target (`192.168.56.x` or custom lab subnet) must cross three independent security gates:-- **Layer 1 (Declarative Validation)**: `ScopeGuard` validates target IP, hostname, CIDR, and secondary parameters (e.g. relay listener, certificate authority) against `campaign.scope`.-- **Layer 2 (In-Process Transport Hook)**: `ScopeFirewall` monkey-patches `socket.connect`, `socket.sendto`, and `asyncio.create_connection` to abort unauthorized socket syscalls before the first SYN packet leaves the NIC.-- **Layer 3 (OS Packet Filtering)**: `OSFirewallController` provisions hardware/OS firewall rules (`netsh` / `iptables`) preventing leakages to external networks.--### 4.3 Zero Plaintext Secrets in Storage-All credentials extracted from GOAD (AS-REP hashes, Kerberos TGS tickets, LAPS passwords, NTDS.dit hashes) are stored exclusively in the ARES Cryptographic Vault:-- Encrypted using **AES-256-GCM AEAD** with per-record initialization vectors (IVs).-- Evidence displayed to operators is automatically sanitized using `mask_secret_hash()`.-- Session tokens are stored in **memory-only structures**; browser refresh tokens utilize HttpOnly, host-only, one-time rotated cookies.-------## 5. Empirical Verification in ARES Test Suite--The GOAD validation capabilities are continuously verified via automated tests:--```bash-# Execute the GOAD architectural validation test-pytest tests/unit/test_goad_matrix_verification.py -v-```--Output:-```-tests/unit/test_goad_matrix_verification.py::test_goad_all_attack_vectors_have_active_production_modules PASSED-tests/unit/test_goad_matrix_verification.py::test_goad_modules_have_strict_mitre_mapping PASSED-tests/unit/test_goad_matrix_verification.py::test_goad_chain_topological_resolution PASSED--3 passed in 0.76s-```--Combined with the broader Active Directory test matrix:-- `tests/unit/test_ad_feasibility_matrix.py`: 18 passing tests-- `tests/unit/test_adcs_esc_expansion.py`: 14 passing tests-- `tests/unit/test_ad_dependency_preflight.py`: 2 passing tests-- `tests/unit/modules/test_linux_ad_tradecraft.py`: 19 passing tests-- **Overall Suite**: Over 4,625 passing automated tests across core, engine, plugins, and web surfaces.-------## 6. How Operators Execute ARES Against GOAD--When deploying ARES against a local or cloud-hosted GOAD instance:--### Step 1: Define the Engagement Campaign with Strict Scope-```bash-ares campaign create \- --name "GOAD-Enterprise-Validation" \- --scope "192.168.56.0/24,sevenkingdoms.local,north.sevenkingdoms.local" \- --noise-profile "normal"-```--### Step 2: Launch the Semi-Autonomous Active Directory Chain-```bash-ares chain run ad-domain-enumeration-chain \- --target "192.168.56.10" \- --domain "sevenkingdoms.local" \- --username "fcastle" \- --password "Password123!"-```--### Step 3: Inspect Real-Time Attack Graph & Evidence-1. Navigate to the ARES Operator Enclave (`http://127.0.0.1:5173`).-2. View real-time compromised credentials in the **Vault**.-3. Inspect shortest-path compromise visualizer showing the exact path from `fcastle` $\rightarrow$ `sql_svc` $\rightarrow$ `CA01 (ESC1)` $\rightarrow$ `Domain Admins`.-4. Export executive and technical deliverables with cryptographic audit trails.-------## 7. Conclusion--ARES was built from day one to eliminate the fragility, noise, and unreliability of disconnected offensive script collections. When tested against industry benchmark environments like Orange Cyberdefense's GOAD, ARES demonstrates:-- **Zero guesswork**: Pure topological execution graphs.-- **Enterprise safety**: Guaranteed fail-closed boundaries.-- **Battle-tested code**: 4,625+ passing tests.--ARES bridges the divide between cutting-edge adversary research and rigorous software engineering.diff --git a/tests/unit/test_goad_matrix_verification.py b/tests/unit/test_goad_matrix_verification.pydeleted file mode 100644index 279c49f..0000000--- a/tests/unit/test_goad_matrix_verification.py+++ /dev/null@@ -1,121 +0,0 @@-"""-ARES Architectural Benchmark: GOAD (Game of Active Directory) Validation Test.-Verifies that ARES modules deterministically cover all primary attack vectors-present in Orange Cyberdefense's Game of Active Directory (GOAD) without-relying on unverified shell scripts or probabilistic LLM execution.-"""-from __future__ import annotations--import pytest-from ares.core.plugin.loader import PluginLoader-from ares.core.chain.chain import CapabilityResolver, DependencyResolver--[email protected](scope="module")-def module_registry():- loader = PluginLoader()- loader._load_builtin()- return loader.registry---# The canonical attack vectors present in Orange Cyberdefense's GOAD environment-GOAD_ATTACK_VECTORS = [- {- "vector": "AS-REP Roasting",- "goad_target": "fcastle (DONOTREQPREAUTH)",- "module_id": "ad.asreproast",- "mitre": "T1558.004",- },- {- "vector": "Kerberoasting",- "goad_target": "sql_svc / web_svc SPN",- "module_id": "ad.kerberoast",- "mitre": "T1558.003",- },- {- "vector": "Active Directory Certificate Services (AD CS) ESC1-ESC8",- "goad_target": "SubCA / Vulnerable Certificate Templates",- "module_id": "ad.adcs",- "mitre": "T1649",- },- {- "vector": "Authentication Coercion (PetitPotam / PrinterBug)",- "goad_target": "Domain Controller MS-EFSR / MS-RPRN",- "module_id": "ad.coerce",- "mitre": "T1187",- },- {- "vector": "NTLM Relay to LDAP / LDAPS",- "goad_target": "Relay to DC for RBCD or ACL escalation",- "module_id": "lateral.ntlm_relay",- "mitre": "T1557.001",- },- {- "vector": "LAPS Credential Enumeration",- "goad_target": "ms-Mcs-AdmPwd attribute",- "module_id": "ad.laps_enum",- "mitre": "T1552.001",- },- {- "vector": "Kerberos Delegation Abuse (Constrained & Unconstrained)",- "goad_target": "msDS-AllowedToDelegateTo / TRUSTED_FOR_DELEGATION",- "module_id": "ad.delegation_abuse",- "mitre": "T1558.002",- },- {- "vector": "DCSync Replication",- "goad_target": "DS-Replication-Get-Changes-All on Domain Head",- "module_id": "ad.dcsync",- "mitre": "T1003.006",- },- {- "vector": "MSSQL Lateral Movement & Linked Servers",- "goad_target": "SQL Server linked queries & xp_cmdshell",- "module_id": "lateral.mssql",- "mitre": "T1090",- },- {- "vector": "Pass-the-Hash / Pass-the-Ticket",- "goad_target": "NTLM / Kerberos credential reuse across members",- "module_id": "credential.pass_the_hash",- "mitre": "T1550.002",- },-]---def test_goad_all_attack_vectors_have_active_production_modules(module_registry):- """Every GOAD vector must be backed by a concrete, active module in ARES registry."""- for item in GOAD_ATTACK_VECTORS:- mid = item["module_id"]- mod_cls = module_registry.get(mid)- assert mod_cls is not None, f"GOAD vector '{item['vector']}' missing module {mid}"- assert getattr(mod_cls, "MODULE_ID", None) == mid- assert hasattr(mod_cls, "run"), f"Module {mid} must implement run() method"- assert hasattr(mod_cls, "validate"), f"Module {mid} must implement validate() method"---def test_goad_modules_have_strict_mitre_mapping(module_registry):- """Verify that each module accurately declares its MITRE ATT&CK technique."""- for item in GOAD_ATTACK_VECTORS:- mid = item["module_id"]- mod_cls = module_registry.get(mid)- desc = getattr(mod_cls, "DESCRIPTION", "") or getattr(mod_cls, "__doc__", "")- # Either the docstring, DESCRIPTION, or MITRE attribute must reference the technique or ATT&CK- assert len(desc) > 20, f"Module {mid} must have descriptive documentation"---def test_goad_chain_topological_resolution(module_registry):- """Verify that GOAD modules can be auto-resolved into a valid execution DAG without cycles."""- resolver = CapabilityResolver(module_registry)- goad_mids = [item["module_id"] for item in GOAD_ATTACK_VECTORS]- nodes = resolver.build_nodes(goad_mids)-- assert len(nodes) == len(goad_mids)-- dep_resolver = DependencyResolver()- stages = dep_resolver.resolve(nodes)-- # Must resolve into at least 1 valid sequential/parallel stage- assert len(stages) >= 1- all_resolved = [m for stage in stages for m in stage]- assert set(all_resolved) == set(goad_mids)