Skip to main content
  1. Documentation/
  2. Architecture/

System Overview

Table of Contents
TantoC2 runs as a single Python process with no external service dependencies.

Design Principles
#

  • Per-engagement isolation: Each engagement gets its own SQLite database. Data from one engagement is invisible to another.
  • Plugin architecture: Transports, tools modules, agent packages, and agent modules are all independent packages discovered at runtime via entry points. A default install includes no plugins — install only what you need.
  • Modular agent protocol: Each agent package brings its own CryptoProvider and ProtocolCodec. Magic bytes route to the correct handler.
  • Capability-driven agents: Each agent package declares its supported module formats, built-in commands, and capabilities. The teamserver uses these declarations to filter compatible modules and present appropriate options to operators.
  • Dual module loading modes: Agent modules can be loaded in managed mode (results flow through loading agent) or daemonized mode (payload runs independently, may register as a new agent).
  • No external dependencies: No Redis, Celery, or external database. Everything runs in-process with SQLAlchemy + SQLite.

Process Architecture
#

System Overview

Component Interactions
#

ComponentResponsibility
Flask APIREST endpoints, request validation, RBAC enforcement
Flask-SocketIOReal-time event push to authenticated clients
Message PipelineMagic routing → crypto → codec → handler chain
Agent ManagerRegistration, check-in processing, task CRUD, lifecycle, capability tracking
Agent Module RegistryAgent module discovery, YAML manifest validation, compatibility filtering by format/platform/arch
Tools ManagerDirect service interaction (SSH, SMB, etc.) via installed tool plugins, proxy/tunnel routing
Credential ServiceEncrypted storage, auto-extraction, export
Build ManagerConfig stamping, template selection, output format selection, binary generation
Background ServicesDead agent detection, stale task cleanup, key rotation, archival, plugin watching