Starting the CLI#
| |
Per-command JSON output (also works inside the shell):
| |
Tab Completion#
Tab completion is available at every argument position:
- Command and sub-command names
- Agent hostnames and
hostname:shortidpairs - Listener names, module names, build names, credential IDs
- Flag names (
--listener,--kill-date, etc.) - Flag values where they are enumerable (protocol types, credential IDs)
- Listener IPs for builds:
--listener name:<TAB>completes with the IPs reported by the teamserver for that listener, so you do not have to look them up manually - Parent listener for external listeners:
--parent <TAB>completes with the names of existing listeners when creating an external (redirector) listener - Local filesystem paths for
uploadsource files - Remote filesystem paths for
downloadtargets (cached from previouslsresults — no implicit C2 traffic) - Background task indices for
results
Global Shell Commands#
These commands are available at the tantoc2> or tantoc2[engagement]> prompt.
Connection#
| Command | Description |
|---|---|
connect <url> | Set the teamserver URL |
login <username> | Log in (prompts for password) |
logout | Log out |
| |
Engagements#
| |
Agents#
| |
The Last Seen column in agents list shows relative time for beacon agents (e.g., 2m ago). For session agents, it shows Connected when the agent is active, or Disconnected when it is not.
Tags and notes:
| |
Tags are free-form labels used to categorize agents (e.g., web-server, domain-controller, initial-access). Notes are free-text and visible to all operators with engagement access.
Building agents:
| |
--kill-date and --kill-days are mutually exclusive. One is required.
--mode session|beacon overrides the build mode that would otherwise be inferred from the transport type. This is useful when building a beacon-mode agent that relays through a TCP transport (which would otherwise default to session mode).
If the selected listener is not currently running, a warning is shown before the build proceeds.
Viewing and downloading builds:
| |
Agent groups:
| |
All agents in a group must share the same capability set.
Agent identification: Agents are identified by:
hostname— unambiguous if only one agent on that hosthostname:shortid— always unambiguous (e.g.,WORKSTATION-01:a1b2c3d4)- UUID or UUID prefix — direct ID match
Listeners#
| |
listeners info <name-or-id> prints a formatted detail panel for one listener, showing name, type, status, bind address, port, external host (for redirector listeners), parent listener, IPs reported to the teamserver, active agents currently checking in, and the creation timestamp.
External listeners require --parent: When creating an external (redirector) listener, --parent <listener_name> specifies the real listener it fronts. The protocol for agent callbacks is derived from the parent listener’s transport type — no --protocol flag is needed. Tab completion is available for --parent: type --parent <TAB> to see running listeners.
listeners info shows active agents: The detail panel includes a list of agents currently checking in through the listener. This makes it easy to see which agents depend on a listener before stopping or removing it.
Warning before removing a listener used in builds: If a listener has active agents or is referenced in existing builds, the CLI displays a warning before proceeding with removal.
Modules (Agent-Loadable)#
| |
Credentials#
| |
Credential types: plaintext, hash, ticket, ssh_key, token, api_key, certificate
creds update accepts any combination of --notes, --domain, and --tags. Fields not specified are unchanged.
creds delete <id> permanently removes a credential and its encrypted secret from the engagement store. The operation is irreversible — the credential ID is accepted as a positional argument and tab-completes from the current credential list.
File Transfers#
Upload and download are agent-scoped — use them from the agent shell. To manage completed transfers from the global prompt:
| |
Tools (Agentless Operations)#
| |
Audit Log#
| |
--security-only is a bare flag (no value). --since and --until accept ISO 8601 dates or datetimes. Results are paginated using --limit and --offset.
An engagement must be active (engagements use <name>) before querying the audit log.
Proxy Configuration#
| |
Collection Requests#
| |
Operators (Admin Only)#
| |
operators passwd is available to any authenticated operator (not admin-only). It prompts for the current password, new password, and confirmation. Use this for routine password rotation.
operators info <username> displays a Rich-formatted table with the operator’s profile: username, role, active status, last login timestamp, and all engagement access grants. The output is a structured table rather than raw JSON.
Plugins#
| |
plugins load takes an absolute path on the server to an already-present .whl file. The server installs it with pip and refreshes all registries. The source file is not deleted.
plugins upload reads a .whl file from your local filesystem, uploads it to the server’s plugin inbox directory, installs it, and refreshes registries.
Utility#
| |
help supports tab completion: type help <TAB> to see completable command group names, and help agents<TAB> to see sub-commands. This makes it easy to discover sub-command help without knowing the exact names.
Agent Shell Commands#
Enter the agent shell with agents use <hostname>. The prompt changes to hostname:shortid>. When you exit the agent shell with back or exit, the prompt returns to the global or engagement prompt — the agent context is fully cleared from the prompt.
Management Commands (always available)#
| Command | Description |
|---|---|
info | Show agent details (mode, OS, IPs, capabilities) |
capabilities | Show supported module formats and built-in commands |
loaded | List currently loaded modules |
modules list | Show compatible modules for this agent |
modules info <name> | Show details for a specific module |
load <module> <format> | Load a module (managed mode) |
load <module> <format> --daemonize | Load a module (daemonized mode) |
unload <loaded-module-id> | Unload a running managed module |
files list | List file transfers for this agent |
files info <transfer-id> | Show transfer details |
files fetch <transfer-id> [path] | Download a completed transfer |
upload <local> <remote> | Upload a file to the agent |
download <remote> | Download a file from the agent |
tasks | List background tasks |
results <N> | Show result for background task number N |
history [N] | Show command history (last N entries) |
help | List available commands |
back / exit | Return to global shell |
Built-In Agent Commands#
These depend on the agent’s capabilities. Common built-ins for the development agent:
| Command | Description |
|---|---|
survey | Collect full system metadata (OS, IPs, users, processes) |
whoami | Current user and privilege level |
hostname | System hostname |
ls [path] | List directory contents (formatted table) |
cat <file> | Read a file |
pwd | Print working directory |
cd <path> | Change directory |
env | List environment variables |
ps | List running processes |
netstat | Network connections |
exec <command> | Execute a shell command (everything after exec is the command) |
beacon_config <json> | Adjust beacon interval/jitter: {"interval": 30, "jitter": 10} |
kill | Terminate this agent |
Use capabilities to see the exact built-in command list for your agent.
exec rest argument: The exec command treats everything after the command name as a single string — no quoting is required for commands with spaces or pipes:
| |
Task Execution Modes#
| |
Press Ctrl+C during a blocking wait to move the task to background.
The ;; separator (double semicolon) submits all tasks before waiting, so they run concurrently on the agent.
Loaded Module Commands#
When a module is loaded, its name becomes a top-level command:
| |
Local Commands from Agent Shell#
| |
Group Shell Commands#
Enter a group shell with agents group use <name>. The prompt changes to groupname[N]> where N is the number of agents.
Commands are identical to the agent shell. Each command is sent to all agents in the group. Results are displayed per-agent.
| |
Tools Shell Commands#
Enter a tools shell with tools use <module-name>. The prompt changes to module-name>.
Session Setup#
| |
Information#
| |
Executing Operations#
| |
Specific operations depend on the loaded module. For the SSH tool:
| Operation | Description |
|---|---|
exec <command> | Run a command on all targets |
upload <local> <remote> | Upload a file |
download <remote> | Download a file |
shell | Open an interactive SSH session |
shell prompt: When the SSH interactive session opens, the CLI prompt changes to host:port$ (e.g., 10.0.0.5:22$). Type commands normally. Exit with exit or logout. After the session ends, the tools shell prompt resumes automatically.
Task Management#
| |
Navigation#
| |
TUI Keyboard Shortcuts#
These shortcuts work in TUI mode (tantoc2-cli --tui):
| Shortcut | Action |
|---|---|
| Ctrl+T | Open a new tab |
| Ctrl+W | Close current tab |
| Ctrl+Left / Ctrl+Right | Navigate between tabs |
| Ctrl+R | Rename current tab |
| Ctrl+P | Open theme picker |
| Ctrl+A | Toggle agents panel (live agent list) |
| Ctrl+L | Toggle listeners panel |
| Ctrl+Z | Background the current blocking task |
| Ctrl+Q | Quit TUI |
| Escape | Toggle scroll mode (scroll output without losing input focus) |
TUI Themes#
Press Ctrl+P to open the theme picker. Available themes:
| Theme | Description |
|---|---|
default | Textual default |
tantoc2-monokai | Monokai-inspired dark |
tantoc2-hotdog-stand | High-contrast red/yellow |
tantoc2-light | Light background |
tantoc2-matrix | Green-on-black terminal |
TUI Layout#
The TUI opens with a Main tab. Use agents use <hostname> to open an agent shell — it appears in a new tab automatically. Tools shells also open in new tabs.
Each tab has:
- Scrollable output log (all command output for that shell)
- Shared command input at the bottom
- Prompt label showing the current context
The status bar at the bottom shows: server URL, logged-in user, active engagement, and agent count.
Agents Panel#
Ctrl+A opens a side panel listing all active agents for the current engagement. Click an agent to enter its shell in a new tab.
Local Shell Tab#
Open a local shell tab from the global prompt with local_shell. The tab runs your OS shell ($SHELL) with a local:dirname$ prompt. Use back or exit to close it.
Common Mistakes#
“Not connected” — Run connect <url> before login.
“No engagement selected” — Run engagements use <name> before agent or listener commands.
“Multiple agents on hostname” — Use hostname:shortid form. Run agents list to see short IDs.
Listener bound to 0.0.0.0 — Specify an IP: --listener main-http:10.0.0.1. You can also use tab completion: --listener main-http:<TAB> will complete with the IPs the teamserver knows about for that listener. Run listeners list to see them all.
Module format mismatch — Run capabilities inside the agent shell to see supported formats. Pass the correct format: load hashdump bof vs load hashdump py.