Tasks and Commands
Overview
When an operator types a command in the agent console, it creates a task. Tasks are queued on the teamserver and delivered to the agent on its next check-in. When the agent completes the task, results are returned and displayed in the console.
Task Types
| Type | ID | Description |
|---|---|---|
| Local | 0 | Executed locally on the teamserver (no agent communication) |
| Task | 1 | Standard command sent to the agent |
| Browser | 2 | File or process browser request |
| Job | 3 | Long-running background job on the agent |
| Tunnel | 4 | Tunnel-related data |
| Proxy Data | 5 | SOCKS proxy traffic |
Task Lifecycle
Operator → Command → Task Created → Queued
↓
Agent check-in → Task delivered
↓
Agent executes task
↓
Results returned → Console output
↓
CompletedStates
- Created — The operator submitted a command
- Queued — The task is waiting for the agent to check in
- Delivered — The task was sent to the agent
- Completed — Results have been received
Command Execution
Commands are entered in the agent console. The console supports:
Standard Commands
Type commands directly in the console input. Available commands depend on the agent type (Beacon vs. Gopher) and are defined by the extender.
File Commands
Upload files to the agent via the file command interface (/agent/command/file API endpoint).
Raw Commands
Send raw command data to the agent via the raw command interface (/agent/command/raw).
Task Management
Viewing Tasks
Open the Tasks tab to see all tasks across all sessions:
- Task table — Lists all tasks with status, agent, operator, command, and timestamps
- Task output — Shows detailed output for the selected task
Cancelling Tasks
Right-click a pending task → Cancel to remove it from the queue before it’s delivered to the agent.
Deleting Tasks
Right-click a completed task → Delete to remove it from the task history.
Task Hooks
Tasks support hooks — follow-up actions that execute when a task completes. Hooks enable automation workflows:
- A task completes with output
- The hook processes the output
- Additional actions are triggered based on the results
Saving Tasks
Task data can be saved for later review or reporting via the task save functionality.
Task Priority
Tasks have a priority field that determines their delivery order when multiple tasks are queued:
- Higher priority tasks are delivered first
- Tasks with the same priority are delivered in FIFO order
Synchronous vs Asynchronous
- Asynchronous agents (default) — Tasks are queued and delivered on the next check-in
- Synchronous agents — Tasks are delivered and responses received in real-time (used with interactive sessions)
Console Output
Task results are displayed in the agent console with status indicators:
| Status | Color | Description |
|---|---|---|
| Info | Blue | Informational output |
| Error | Red | Error messages |
| Success | Green | Successful completion |