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)
- 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#
| |
Building agents:
| |
--kill-date and --kill-days are mutually exclusive. One is required.
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#
| |
Modules (Agent-Loadable)#
| |
Credentials#
| |
Credential types: plaintext, hash, ticket, ssh_key, token, api_key, certificate
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)#
| |
Proxy Configuration#
| |
Collection Requests#
| |
Operators (Admin Only)#
| |
Plugins#
| |
Utility#
| |
Agent Shell Commands#
Enter the agent shell with agents use <hostname>. The prompt changes to hostname:shortid>.
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 |
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.
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 session (SSH shell) |
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. Run listeners list to see available IPs reported by the teamserver.
Module format mismatch — Run capabilities inside the agent shell to see supported formats. Pass the correct format: load hashdump bof vs load hashdump py.