# mafifrizi/ares architecture

> Architecture diagram of the GitHub repository mafifrizi/ares, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mafifrizi/ares
- Repository: https://github.com/mafifrizi/ares

## Overview

ARES is an operator-directed red-team engagement and continuous security-validation platform. The principal workflow is to authenticate and configure an engagement, discover and fingerprint targets, plan authorized attack steps, execute modules within scope, then validate and present findings. The graph also preserves the documented attack-path, collaboration, replay, reporting, and integration capabilities. Source excerpts are partial, so uncertain internal wiring is omitted; some capability branches are supported by the README and repository tree rather than sampled implementation.

Main entry points: [`ares/core/engine.py`](https://github.com/mafifrizi/ares/blob/main/ares/core/engine.py) (Campaign Engine), [`ares/api/server.py`](https://github.com/mafifrizi/ares/blob/main/ares/api/server.py) (API Server), [`ares/modules`](https://github.com/mafifrizi/ares/tree/main/ares/modules) (Attack Modules), [`ares/goal/engine.py`](https://github.com/mafifrizi/ares/blob/main/ares/goal/engine.py) (Goal Planner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Operator Control"]
  node_web["Dashboard UI<br/>[App.tsx]"]
  node_api["API Server<br/>[server.py]"]
  node_auth["Identity &amp; Sessions<br/>[sso.py]"]
  node_collab["Team Collaboration<br/>[manager.py]"]
end

subgraph group_planning["Discovery &amp; Planning"]
  node_fingerprint["Target Fingerprinting<br/>[engine.py]"]
  node_service["Service Intelligence<br/>[engine.py]"]
  node_goal["Goal Planner<br/>[engine.py]"]
  node_strategy["Adaptive Strategy<br/>[engine.py]"]
end

subgraph group_execution["Engagement Execution"]
  node_modules["Attack Modules"]
  node_engine["Campaign Engine<br/>[engine.py]"]
  node_scope["Scope &amp; Egress Guards<br/>[scope_firewall.py]"]
  node_workers["Distributed Workers<br/>[controller.py]"]
end

subgraph group_evidence["Analysis &amp; Evidence"]
  node_artifacts["Artifact Correlation<br/>[engine.py]"]
  node_attackgraph["Attack Graph<br/>[attack_graph.py]"]
  node_findings["Findings API<br/>[findings.py]"]
  node_reports["Report Generation<br/>[report_gen.py]"]
  node_replay["Campaign Replay<br/>[engine.py]"]
end

subgraph group_integration["Platform Services"]
  node_database[("Campaign Database<br/>[database.py]")]
  node_mcp["MCP Interface<br/>[server.py]"]
end

node_operator(("Operator"))
node_target(("Authorized Targets"))
node_llm(("Optional LLM"))

node_operator -->|"operates"| node_web
node_web -->|"calls"| node_api
node_api -->|"authenticates"| node_auth
node_api -->|"reads and writes"| node_database
node_api -->|"dispatches engagement"| node_engine
node_api -->|"serves findings"| node_findings
node_api -->|"coordinates operators"| node_collab
node_engine -->|"fingerprints targets"| node_fingerprint
node_fingerprint -->|"probes"| node_target
node_engine -->|"maps services"| node_service
node_service -->|"scans ports"| node_target
node_engine -->|"requests goal plan"| node_goal
node_strategy -->|"requests execution plan"| node_goal
node_strategy -->|"dispatches modules"| node_engine
node_goal -->|"selects steps"| node_modules
node_engine -->|"executes"| node_modules
node_engine -->|"enforces scope"| node_scope
node_modules -->|"performs authorized tests"| node_target
node_engine -->|"submits tasks"| node_workers
node_modules -->|"produces artifacts"| node_artifacts
node_artifacts -->|"queues follow-ups"| node_modules
node_artifacts -->|"informs paths"| node_attackgraph
node_engine -->|"validates findings"| node_findings
node_findings -->|"supplies evidence"| node_reports
node_engine -->|"persists campaign"| node_database
node_database -->|"provides history"| node_replay
node_web -->|"visualizes paths"| node_attackgraph
node_mcp -.->|"exposes tools"| node_api
node_goal -.->|"may consult"| node_llm

click node_web "https://github.com/mafifrizi/ares/blob/main/frontend/src/App.tsx"
click node_api "https://github.com/mafifrizi/ares/blob/main/ares/api/server.py"
click node_auth "https://github.com/mafifrizi/ares/blob/main/ares/core/sso.py"
click node_collab "https://github.com/mafifrizi/ares/blob/main/ares/collab/manager.py"
click node_fingerprint "https://github.com/mafifrizi/ares/blob/main/ares/fingerprint/engine.py"
click node_service "https://github.com/mafifrizi/ares/blob/main/ares/service_intel/engine.py"
click node_goal "https://github.com/mafifrizi/ares/blob/main/ares/goal/engine.py"
click node_strategy "https://github.com/mafifrizi/ares/blob/main/ares/strategy/engine.py"
click node_modules "https://github.com/mafifrizi/ares/tree/main/ares/modules"
click node_engine "https://github.com/mafifrizi/ares/blob/main/ares/core/engine.py"
click node_scope "https://github.com/mafifrizi/ares/blob/main/ares/core/scope_firewall.py"
click node_workers "https://github.com/mafifrizi/ares/blob/main/ares/worker/controller.py"
click node_artifacts "https://github.com/mafifrizi/ares/blob/main/ares/artifact_intel/engine.py"
click node_attackgraph "https://github.com/mafifrizi/ares/blob/main/ares/graph/attack_graph.py"
click node_findings "https://github.com/mafifrizi/ares/blob/main/ares/api/findings.py"
click node_reports "https://github.com/mafifrizi/ares/blob/main/ares/modules/reporting/report_gen.py"
click node_replay "https://github.com/mafifrizi/ares/blob/main/ares/replay/engine.py"
click node_database "https://github.com/mafifrizi/ares/blob/main/ares/db/database.py"
click node_mcp "https://github.com/mafifrizi/ares/blob/main/ares/mcp/server.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_api,node_auth,node_collab toneBlue
class node_fingerprint,node_service,node_goal,node_strategy toneAmber
class node_modules,node_engine,node_scope,node_workers toneMint
class node_artifacts,node_attackgraph,node_findings,node_reports,node_replay toneRose
class node_database,node_mcp,node_operator,node_target,node_llm toneIndigo
```

## Components

### Operator Control

- [Dashboard UI](https://github.com/mafifrizi/ares/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API Server](https://github.com/mafifrizi/ares/blob/main/ares/api/server.py): `ares/api/server.py`
- [Identity & Sessions](https://github.com/mafifrizi/ares/blob/main/ares/core/sso.py): `ares/core/sso.py`
- [Team Collaboration](https://github.com/mafifrizi/ares/blob/main/ares/collab/manager.py): `ares/collab/manager.py`

### Discovery & Planning

- [Target Fingerprinting](https://github.com/mafifrizi/ares/blob/main/ares/fingerprint/engine.py): `ares/fingerprint/engine.py`
- [Service Intelligence](https://github.com/mafifrizi/ares/blob/main/ares/service_intel/engine.py): `ares/service_intel/engine.py`
- [Goal Planner](https://github.com/mafifrizi/ares/blob/main/ares/goal/engine.py): `ares/goal/engine.py`
- [Adaptive Strategy](https://github.com/mafifrizi/ares/blob/main/ares/strategy/engine.py): `ares/strategy/engine.py`

### Engagement Execution

- [Attack Modules](https://github.com/mafifrizi/ares/tree/main/ares/modules): `ares/modules`
- [Campaign Engine](https://github.com/mafifrizi/ares/blob/main/ares/core/engine.py): `ares/core/engine.py`
- [Scope & Egress Guards](https://github.com/mafifrizi/ares/blob/main/ares/core/scope_firewall.py): `ares/core/scope_firewall.py`
- [Distributed Workers](https://github.com/mafifrizi/ares/blob/main/ares/worker/controller.py): `ares/worker/controller.py`

### Analysis & Evidence

- [Artifact Correlation](https://github.com/mafifrizi/ares/blob/main/ares/artifact_intel/engine.py): `ares/artifact_intel/engine.py`
- [Attack Graph](https://github.com/mafifrizi/ares/blob/main/ares/graph/attack_graph.py): `ares/graph/attack_graph.py`
- [Findings API](https://github.com/mafifrizi/ares/blob/main/ares/api/findings.py): `ares/api/findings.py`
- [Report Generation](https://github.com/mafifrizi/ares/blob/main/ares/modules/reporting/report_gen.py): `ares/modules/reporting/report_gen.py`
- [Campaign Replay](https://github.com/mafifrizi/ares/blob/main/ares/replay/engine.py): `ares/replay/engine.py`

### Platform Services

- [Campaign Database](https://github.com/mafifrizi/ares/blob/main/ares/db/database.py): `ares/db/database.py`
- [MCP Interface](https://github.com/mafifrizi/ares/blob/main/ares/mcp/server.py): `ares/mcp/server.py`

### Other components

- **Operator**
- **Authorized Targets**
- **Optional LLM**

## Connections

- Operator → Dashboard UI: operates
- Dashboard UI → API Server: calls
- API Server → Identity & Sessions: authenticates
- API Server → Campaign Database: reads and writes
- API Server → Campaign Engine: dispatches engagement
- API Server → Findings API: serves findings
- API Server → Team Collaboration: coordinates operators
- Campaign Engine → Target Fingerprinting: fingerprints targets
- Target Fingerprinting → Authorized Targets: probes
- Campaign Engine → Service Intelligence: maps services
- Service Intelligence → Authorized Targets: scans ports
- Campaign Engine → Goal Planner: requests goal plan
- Adaptive Strategy → Goal Planner: requests execution plan
- Adaptive Strategy → Campaign Engine: dispatches modules
- Goal Planner → Attack Modules: selects steps
- Campaign Engine → Attack Modules: executes
- Campaign Engine → Scope & Egress Guards: enforces scope
- Attack Modules → Authorized Targets: performs authorized tests
- Campaign Engine → Distributed Workers: submits tasks
- Attack Modules → Artifact Correlation: produces artifacts
- Artifact Correlation → Attack Modules: queues follow-ups
- Artifact Correlation → Attack Graph: informs paths
- Campaign Engine → Findings API: validates findings
- Findings API → Report Generation: supplies evidence
- Campaign Engine → Campaign Database: persists campaign
- Campaign Database → Campaign Replay: provides history
- Dashboard UI → Attack Graph: visualizes paths
- MCP Interface → API Server: exposes tools
- Goal Planner → Optional LLM: may consult
