Agent Build Pipeline#
Config Stamping#
Agent packages define their own stamping mechanism. The default approach uses a marker block — 256 bytes of 0xDEADBEEF — which the build manager replaces with an encrypted configuration blob containing:
- Callback addresses (host, port, protocol)
- Kill date (mandatory)
- Beacon interval and jitter
- Agent-specific configuration
The configuration is encrypted before stamping, so it does not appear in plaintext in the binary. The specific stamping approach (marker replacement, appended blob, etc.) is defined by the agent developer as part of the agent package.
Output Formats#
Agent packages declare their available output formats through build templates. Each template has a platform, arch, mode (beacon or session), and format. The operator specifies the desired combination at build time; the teamserver resolves the correct template internally. Common formats include:
| Platform | Formats |
|---|---|
| Windows | EXE, DLL, shellcode, service binary, BOF |
| Linux | ELF, SO, shellcode |
Templates also declare a mode (AgentMode.BEACON or AgentMode.SESSION). The valid modes for a given build are the intersection of the package’s template modes and the transport plugin’s supported_modes() — for example, the HTTP transport declares [BEACON] and the TCP transport declares [SESSION].
Build API#
List Packages and Templates#
| |
Create a Build#
| |
platform, arch, mode, and listener_id are optional. The teamserver resolves the matching template internally. Valid modes are the intersection of the package’s template modes and the listener transport’s supported_modes().
Download#
| |
CLI Workflow#
| |
Build management is integrated into the agents command. Use agents builds to list and download existing builds.
Project Build System#
TantoC2 uses Hatch as its build backend.
Makefile Targets#
| Target | Description |
|---|---|
make all | Build all wheels (server, CLI, dev agent, web UI) |
make build | Build teamserver wheel |
make build-cli | Build CLI wheel |
make build-dev-agent | Build dev agent wheel |
make build-web | Build web UI (npm + wheel) |
make dev | Install in development mode |
make test | Run pytest with coverage |
make lint | Run ruff linter |
make typecheck | Run mypy |
make format | Format with ruff |
make check | All checks (lint + typecheck + test) |
make clean | Remove build artifacts |
Docker#
| |