A lightweight Go implant for MITRE Caldera purple‑team adversary emulation. The agent beacons to a Caldera server, pulls task instructions, executes them in an isolated process group (so EDR kill‑tree actions don’t terminate the agent), and returns rich telemetry so blue teams can measure prevention vs detection.
| Capability | Notes | |
|---|---|---|
| Detached execution | Uses setsid (Linux) so child process termination doesn’t propagate to the agent. |
|
| Timeout watchdog | Each instruction honours the timeout field and returns exit‑code 124 if exceeded. |
|
| Blocked‑by‑EDR flag | If the child receives SIGKILL, the agent reports status = 1 for accurate SOC scoring. |
|
| Verbose debugging | Run with CG_DEBUG=1 to print beacon traffic and execution traces. |
# clone your fork
git clone https://github.com/Bhanunamikaze/CalderaAgent.git
cd CalderaAgent
# build for the local platform
CGO_ENABLED=0 go build -o agent CalderaAgent.go
# run (replace URL with your Caldera server)
./caldera-linux-agent -server https://caldera_server:8443 -insecure -debug# Linux x64 (default)
go build -o agent-linux CalderaAgent.go
# Windows x64
GOOS=windows GOARCH=amd64 go build -o agent.exe CalderaAgent.goUsage: ./agent <C2 URL>
Once launched, the agent will beacon every sleep seconds, execute abilities, and post results back to /beacon.
./bin/caldera-linux-agent -server https://caldera_server:8443 -insecure -debugArguments:
-server <url>: CALDERA server URL.-insecure: Disables TLS certificate verification. Use this only when you are intentionally connecting to a server with an untrusted or self-signed certificate.-debug: Enables verbose debug logging to stdout.--fresh: Ignores any persistedpawstate and registers as a new CALDERA agent identity.
Debug can also be enabled with:
CG_DEBUG=1 ./bin/caldera-linux-agent -server https://caldera_server:8443 -insecure.\bin\caldera-agent-windows.exe -server https://caldera_server:8443 -insecure -debugArguments:
-server <url>: CALDERA server URL.-insecure: Disables TLS certificate verification.-debug: Enables verbose debug logging.
| Field | Description |
|---|---|
exit_code |
Native process exit code (or 124 on timeout). |
status |
0 = executed / runtime error, 1 = blocked by EDR (SIGKILL). |
pid |
Child PID for reference in EDR logs. |
- HTTP beaconing to
/beacon - Payload download from
/file/download - Result posting back to
/beacon shexecutor- payload deletion via
delete_payload - bounded stdout/stderr capture
- transport timeouts and response cleanup
- process-group kill on timeout
pawpersistence across restarts--freshidentity reset- pending-result replay after transient communication loss
- in-flight instruction journaling
- instruction-level sleep
- watchdog handling
- deferred deadman handling on signal/watchdog termination
Linux state is stored in the first writable location from:
$HOME/.caldera-agent//tmp/.caldera-agent/
Files used:
paw.jsonpending-results.jsoninflight.json
- HTTP beaconing to
/beacon - Payload download from
/file/download - Result posting back to
/beacon - executor selection for:
cmdpshpwsh
- payload deletion via
delete_payload - debug logging via
-debug
This project is released under the MIT License. See LICENSE for full text.