Overview

JustC2 supports interactive terminal sessions that provide a real-time shell on compromised hosts. Unlike standard tasks (which are queued and executed asynchronously), terminals provide an interactive experience similar to SSH or RDP command prompts.

Starting a Terminal

  1. Right-click an agent session → Terminal or use the terminal command in the agent console
  2. Configure terminal parameters:
    • Program — The shell to launch (e.g., cmd.exe, /bin/bash, powershell.exe)
    • Size — Terminal dimensions (height × width)
    • OEM Code Page — Character encoding (relevant for Windows)
  3. Click Start

Terminal Interface

The terminal interface provides:

  • Terminal emulator — Full terminal emulation with VT100/xterm support
  • Input — Type commands as you would in a local terminal
  • Output — Real-time command output rendering
  • Start/Stop buttons — Control the terminal session lifecycle

Terminal Management

Multiple Terminals

You can open multiple terminal sessions on the same agent or across different agents. Each terminal runs in its own tab within the terminal container.

Stopping a Terminal

Click Stop or close the terminal tab to terminate the remote shell session. This sends a close command to the agent, which terminates the shell process.

How It Works

Operator types → Client sends input → Agent receives → Shell process
                                                            ↓
                                                     Output generated
                                                            ↓
Operator sees ← Client renders ← Agent sends ← Shell output captured
  1. Keyboard input from the operator is sent as terminal write tasks
  2. The agent forwards input to the spawned shell process (stdin)
  3. Shell output (stdout/stderr) is captured by the agent
  4. Output is sent back through the C2 channel to the operator’s terminal view

OPSEC Considerations

  • Terminal sessions spawn a new process on the target (e.g., cmd.exe, bash)
  • The spawned process may be visible to endpoint security products
  • Interactive shells generate more frequent C2 communication than standard tasks
  • Consider the agent’s sleep interval — real-time interaction requires shorter sleep times
  • Terminal sessions maintain state; exiting the shell terminates the session

Use Cases

  • System administration — Run sequences of commands interactively
  • Debugging — Troubleshoot issues in real-time
  • Script execution — Run scripts and observe output live
  • Environment exploration — Navigate file systems and inspect configurations