How Plugins Work#
TantoC2 ships as a bare core — no transports, tools, agents, or modules are included by default. Everything is a plugin, discovered at runtime through two mechanisms:
- Entry points (recommended): Install a plugin package (
pip install tantoc2-transport-http) and it is discovered automatically via Python entry points - Directory scanning: Drop a
.pyfile in the appropriate plugin directory; the framework scans forPluginBasesubclasses
No code changes to the core system are required to add new plugins.
Plugin Base Class#
Every plugin extends PluginBase:
| |
Plugin Types#
| Type | Base Class / Format | Directory | Description |
|---|---|---|---|
| Transport | TransportBase | Entry-point package or plugins/transports/ | Listener implementations (HTTP, TCP, custom) |
| Tools Module | AgentlessModuleBase | Entry-point package or plugins/agentless/ | Direct service interaction (SSH, SMB, etc.) from the teamserver |
| Agent Package | AgentPackageBase | Entry-point package or plugins/agent_packages/ | Crypto, codec, build pipeline, and capability declarations |
| Agent Module | YAML manifest + compiled payload | agent_modules/ | Compiled payloads loadable by agents (BOF, shellcode, DLL, etc.) |
Hot-Reload#
Drop a .py file into the appropriate directory and trigger a refresh:
CLI:
| |
API:
| |
No server restart required.
Plugin Inbox#
For easy deployment, drop files into the plugin inbox directory (plugin_inbox_dir config). The plugin watcher automatically handles them:
.pyfiles: Auto-detected by type and moved to the correct plugin directory.whlfiles: Installed via pip, then registered through entry points
The inbox is checked every bg_plugin_watcher_interval seconds (default: 30).
Dependency Auto-Install#
Modules can declare pip dependencies in their metadata via dependencies: list[str]. Missing packages are auto-installed at discovery time. If installation fails, the module is tracked as unavailable with a reason — queryable via the unavailable_modules property on the module manager.
Deployment#
Standalone Package (Recommended)#
Package your plugin as a Python wheel with entry points. Install with pip install and the framework discovers it automatically:
| |
File Drop#
Place a .py file in the appropriate directory:
| |
Plugin Inbox#
Drop .py or .whl files into the inbox for automatic routing and installation.
The plugin is discovered on the next server start, refresh, or inbox scan.
Next Steps#
- Agent Packages — crypto, wire protocol, and capability declarations
- Agent Modules — compiled payloads loaded into agents
- Transport Plugins — listener implementations
- Tools Modules — direct protocol interaction