# kevoreilly/capev2 architecture

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

- Interactive diagram: https://gitdiagram.com/kevoreilly/capev2
- Repository: https://github.com/kevoreilly/capev2

## Overview

CAPE is a malware sandbox. Analysts submit samples or URLs through the web API, MCP server, or CLI; tasks are scheduled onto isolated analysis machines, where guest agents and platform analyzers execute and instrument malware. Auxiliary collectors and processing plugins produce behavioral, network, memory, unpacked-payload, configuration, and signature results. Reports and artifacts are persisted for web review, optional central storage, similarity analysis, and interactive Guacamole sessions. Several subsystem links reflect README capabilities and tree structure; unsampled implementations are represented only at their exact enclosing paths.

Main entry points: [`lib/cuckoo/core/analysis_manager.py`](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/analysis_manager.py) (Analysis Manager), [`modules/reporting`](https://github.com/kevoreilly/capev2/tree/master/modules/reporting) (Report Writers), [`modules/processing`](https://github.com/kevoreilly/capev2/tree/master/modules/processing) (Processing Plugins), [`agent/go/main.go`](https://github.com/kevoreilly/capev2/blob/master/agent/go/main.go) (Guest Agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Submission And Access"]
  node_web_submission["Web Submission<br/>[views.py]"]
  node_mcp_server["MCP Server<br/>[server.py]"]
  node_analysis_views["Analysis Views<br/>[views.py]"]
  node_guacamole["Interactive Desktop<br/>[consumers.py]"]
end

subgraph group_orchestration["Execution Orchestration"]
  node_task_database[("Task Database<br/>[database.py]")]
  node_scheduler["Task Scheduler<br/>[scheduler.py]"]
  node_analysis_manager["Analysis Manager"]
  node_machinery["Machine Manager"]
  node_network_routing["Network Routing<br/>[router_manager.py]"]
end

subgraph group_analysis["Guest Analysis"]
  node_guest_agent["Guest Agent<br/>[main.go]"]
  node_windows_analyzer["Windows Analyzer<br/>[analyzer.py]"]
  node_linux_analyzer["Linux Analyzer<br/>[analyzer.py]"]
  node_auxiliary_collectors["Auxiliary Collectors"]
  node_result_server["Result Server<br/>[resultserver.py]"]
end

subgraph group_processing["Analysis Processing"]
  node_processing_engine["Processing Engine"]
  node_processing_plugins["Processing Plugins"]
  node_signatures["Detection Signatures"]
  node_cape_extractors["CAPE Extractors<br/>[CAPE.py]"]
end

subgraph group_results["Results And Storage"]
  node_artifact_storage["Artifact Storage"]
  node_storage_backend[("Object Storage<br/>[storage_backend.py]")]
  node_reporting["Report Writers"]
  node_mcrit["MCRIT Service"]
  node_threat_intelligence["Threat Intelligence"]
end

node_analyst(("Analyst"))

node_analyst -->|"submits samples"| node_web_submission
node_analyst -->|"submits tasks"| node_mcp_server
node_analyst -->|"reviews reports"| node_analysis_views
node_analyst -->|"opens desktop"| node_guacamole
node_mcp_server -->|"calls API"| node_web_submission
node_web_submission -->|"creates tasks"| node_task_database
node_scheduler -->|"loads tasks"| node_task_database
node_scheduler -->|"dispatches tasks"| node_analysis_manager
node_analysis_manager -->|"starts machine"| node_machinery
node_analysis_manager -->|"configures routing"| node_network_routing
node_analysis_manager -->|"controls guest"| node_guest_agent
node_machinery -->|"runs analyzer"| node_windows_analyzer
node_machinery -->|"runs analyzer"| node_linux_analyzer
node_windows_analyzer -->|"uses agent"| node_guest_agent
node_linux_analyzer -->|"uses agent"| node_guest_agent
node_analysis_manager -->|"runs auxiliaries"| node_auxiliary_collectors
node_analysis_manager -->|"registers task"| node_result_server
node_processing_engine -->|"runs plugins"| node_processing_plugins
node_processing_engine -->|"runs signatures"| node_signatures
node_processing_engine -->|"extracts payloads"| node_cape_extractors
node_reporting -->|"stores artifacts"| node_artifact_storage
node_artifact_storage -->|"uses backend"| node_storage_backend
node_analysis_views -->|"reads reports"| node_reporting
node_processing_plugins -->|"supplies results"| node_reporting
node_signatures -->|"supplies detections"| node_reporting
node_cape_extractors -->|"supplies configs"| node_reporting
node_processing_plugins -.->|"queries similarity"| node_mcrit
node_processing_plugins -.->|"queries intelligence"| node_threat_intelligence
node_guacamole -->|"opens session"| node_analysis_manager
node_guacamole -->|"tracks idle time"| node_guest_agent

click node_web_submission "https://github.com/kevoreilly/capev2/blob/master/web/submission/views.py"
click node_mcp_server "https://github.com/kevoreilly/capev2/blob/master/mcp/server.py"
click node_analysis_views "https://github.com/kevoreilly/capev2/blob/master/web/analysis/views.py"
click node_guacamole "https://github.com/kevoreilly/capev2/blob/master/web/guac/consumers.py"
click node_task_database "https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/database.py"
click node_scheduler "https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/scheduler.py"
click node_analysis_manager "https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/analysis_manager.py"
click node_machinery "https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/machinery_manager.py"
click node_network_routing "https://github.com/kevoreilly/capev2/blob/master/utils/router_manager.py"
click node_guest_agent "https://github.com/kevoreilly/capev2/blob/master/agent/go/main.go"
click node_windows_analyzer "https://github.com/kevoreilly/capev2/blob/master/analyzer/windows/analyzer.py"
click node_linux_analyzer "https://github.com/kevoreilly/capev2/blob/master/analyzer/linux/analyzer.py"
click node_auxiliary_collectors "https://github.com/kevoreilly/capev2/tree/master/modules/auxiliary"
click node_result_server "https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/resultserver.py"
click node_processing_engine "https://github.com/kevoreilly/capev2/tree/master/lib/cuckoo/core/processing_engine"
click node_processing_plugins "https://github.com/kevoreilly/capev2/tree/master/modules/processing"
click node_signatures "https://github.com/kevoreilly/capev2/tree/master/modules/signatures"
click node_cape_extractors "https://github.com/kevoreilly/capev2/blob/master/modules/processing/CAPE.py"
click node_artifact_storage "https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/common/artifact_storage.py"
click node_storage_backend "https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/common/storage_backend.py"
click node_reporting "https://github.com/kevoreilly/capev2/tree/master/modules/reporting"
click node_threat_intelligence "https://github.com/kevoreilly/capev2/tree/master/lib/cuckoo/common/integrations/threatintelligence"

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_submission,node_mcp_server,node_analysis_views,node_guacamole toneBlue
class node_task_database,node_scheduler,node_analysis_manager,node_machinery,node_network_routing toneAmber
class node_guest_agent,node_windows_analyzer,node_linux_analyzer,node_auxiliary_collectors,node_result_server toneMint
class node_processing_engine,node_processing_plugins,node_signatures,node_cape_extractors toneRose
class node_artifact_storage,node_storage_backend,node_reporting,node_mcrit,node_threat_intelligence,node_analyst toneIndigo
```

## Components

### Submission And Access

- [Web Submission](https://github.com/kevoreilly/capev2/blob/master/web/submission/views.py): `web/submission/views.py`
- [MCP Server](https://github.com/kevoreilly/capev2/blob/master/mcp/server.py): `mcp/server.py`
- [Analysis Views](https://github.com/kevoreilly/capev2/blob/master/web/analysis/views.py): `web/analysis/views.py`
- [Interactive Desktop](https://github.com/kevoreilly/capev2/blob/master/web/guac/consumers.py): `web/guac/consumers.py`

### Execution Orchestration

- [Task Database](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/database.py): `lib/cuckoo/core/database.py`
- [Task Scheduler](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/scheduler.py): `lib/cuckoo/core/scheduler.py`
- [Analysis Manager](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/analysis_manager.py): `lib/cuckoo/core/analysis_manager.py`
- [Machine Manager](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/machinery_manager.py): `lib/cuckoo/core/machinery_manager.py`
- [Network Routing](https://github.com/kevoreilly/capev2/blob/master/utils/router_manager.py): `utils/router_manager.py`

### Guest Analysis

- [Guest Agent](https://github.com/kevoreilly/capev2/blob/master/agent/go/main.go): `agent/go/main.go`
- [Windows Analyzer](https://github.com/kevoreilly/capev2/blob/master/analyzer/windows/analyzer.py): `analyzer/windows/analyzer.py`
- [Linux Analyzer](https://github.com/kevoreilly/capev2/blob/master/analyzer/linux/analyzer.py): `analyzer/linux/analyzer.py`
- [Auxiliary Collectors](https://github.com/kevoreilly/capev2/tree/master/modules/auxiliary): `modules/auxiliary`
- [Result Server](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/core/resultserver.py): `lib/cuckoo/core/resultserver.py`

### Analysis Processing

- [Processing Engine](https://github.com/kevoreilly/capev2/tree/master/lib/cuckoo/core/processing_engine): `lib/cuckoo/core/processing_engine`
- [Processing Plugins](https://github.com/kevoreilly/capev2/tree/master/modules/processing): `modules/processing`
- [Detection Signatures](https://github.com/kevoreilly/capev2/tree/master/modules/signatures): `modules/signatures`
- [CAPE Extractors](https://github.com/kevoreilly/capev2/blob/master/modules/processing/CAPE.py): `modules/processing/CAPE.py`

### Results And Storage

- [Artifact Storage](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/common/artifact_storage.py): `lib/cuckoo/common/artifact_storage.py`
- [Object Storage](https://github.com/kevoreilly/capev2/blob/master/lib/cuckoo/common/storage_backend.py): `lib/cuckoo/common/storage_backend.py`
- [Report Writers](https://github.com/kevoreilly/capev2/tree/master/modules/reporting): `modules/reporting`
- **MCRIT Service**
- [Threat Intelligence](https://github.com/kevoreilly/capev2/tree/master/lib/cuckoo/common/integrations/threatintelligence): `lib/cuckoo/common/integrations/threatintelligence`

### Other components

- **Analyst**

## Connections

- Analyst → Web Submission: submits samples
- Analyst → MCP Server: submits tasks
- Analyst → Analysis Views: reviews reports
- Analyst → Interactive Desktop: opens desktop
- MCP Server → Web Submission: calls API
- Web Submission → Task Database: creates tasks
- Task Scheduler → Task Database: loads tasks
- Task Scheduler → Analysis Manager: dispatches tasks
- Analysis Manager → Machine Manager: starts machine
- Analysis Manager → Network Routing: configures routing
- Analysis Manager → Guest Agent: controls guest
- Machine Manager → Windows Analyzer: runs analyzer
- Machine Manager → Linux Analyzer: runs analyzer
- Windows Analyzer → Guest Agent: uses agent
- Linux Analyzer → Guest Agent: uses agent
- Analysis Manager → Auxiliary Collectors: runs auxiliaries
- Analysis Manager → Result Server: registers task
- Processing Engine → Processing Plugins: runs plugins
- Processing Engine → Detection Signatures: runs signatures
- Processing Engine → CAPE Extractors: extracts payloads
- Report Writers → Artifact Storage: stores artifacts
- Artifact Storage → Object Storage: uses backend
- Analysis Views → Report Writers: reads reports
- Processing Plugins → Report Writers: supplies results
- Detection Signatures → Report Writers: supplies detections
- CAPE Extractors → Report Writers: supplies configs
- Processing Plugins → MCRIT Service: queries similarity
- Processing Plugins → Threat Intelligence: queries intelligence
- Interactive Desktop → Analysis Manager: opens session
- Interactive Desktop → Guest Agent: tracks idle time
