Title here
Summary here
The JustC2 teamserver exposes a REST API over HTTPS. All endpoints are prefixed with the configured endpoint path (default: /endpoint). Authentication uses JWT bearer tokens.
POST /endpoint/login
Content-Type: application/json
{
"username": "operator1",
"password": "mypassword",
"version": "1.2"
}Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"refresh_token": "eyJhbGciOiJIUzI1NiIs..."
}POST /endpoint/refresh
Content-Type: application/json
{
"refresh_token": "eyJhbGciOiJIUzI1NiIs..."
}Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs..."
}Include the access token in all subsequent requests:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...POST /endpoint/sync
Authorization: Bearer <access_token>Generates an OTP for WebSocket connection:
POST /endpoint/otp/generate
Authorization: Bearer <access_token>Connect via WebSocket:
GET /endpoint/connect?otp=<otp_token>POST /endpoint/subscribe
Authorization: Bearer <access_token>
Content-Type: application/json
{
"categories": ["agents", "tasks", "downloads"],
"console_team_mode": true
}GET /endpoint/listener/list
Authorization: Bearer <access_token>POST /endpoint/listener/create
Authorization: Bearer <access_token>
Content-Type: application/json
{
"name": "http-primary",
"config_type": "BeaconHTTP",
"config": "{...}"
}POST /endpoint/listener/editPOST /endpoint/listener/stopPOST /endpoint/listener/pause
POST /endpoint/listener/resumeGET /endpoint/agent/list
Authorization: Bearer <access_token>POST /endpoint/agent/generate
Authorization: Bearer <access_token>
Content-Type: application/json
{
"agent_name": "beacon",
"config": "{...}",
"listeners_name": ["http-primary"]
}POST /endpoint/agent/remove
Content-Type: application/json
{
"agent_id": "abc12345"
}POST /endpoint/agent/command/execute
Content-Type: application/json
{
"agent_name": "beacon",
"agent_id": "abc12345",
"cmdline": "shell whoami",
"args": {}
}POST /endpoint/agent/command/filePOST /endpoint/agent/command/rawPOST /endpoint/agent/update/data
POST /endpoint/agent/set/tag
POST /endpoint/agent/set/mark
POST /endpoint/agent/set/colorGET /endpoint/agent/task/list?agent_id=abc12345&limit=50&offset=0POST /endpoint/agent/task/cancel
Content-Type: application/json
{
"agent_id": "abc12345",
"task_id": "task001"
}POST /endpoint/agent/task/deletePOST /endpoint/agent/task/hookPOST /endpoint/agent/task/savePOST /endpoint/chat/send
Content-Type: application/json
{
"message": "Starting lateral movement phase"
}GET /endpoint/download/listPOST /endpoint/download/sync
Content-Type: application/json
{
"file_id": "dl001"
}POST /endpoint/download/delete
Content-Type: application/json
{
"file_ids": ["dl001", "dl002"]
}GET /endpoint/screen/listGET /endpoint/screen/image?screen_id=scr001POST /endpoint/screen/setnotePOST /endpoint/screen/removeGET /endpoint/creds/listPOST /endpoint/creds/add
Content-Type: application/json
{
"username": "admin",
"password": "P@ssw0rd",
"realm": "CORP.LOCAL",
"type": "plaintext",
"host": "10.0.0.5"
}POST /endpoint/creds/edit
POST /endpoint/creds/remove
POST /endpoint/creds/set/tagGET /endpoint/targets/listPOST /endpoint/targets/add
POST /endpoint/targets/edit
POST /endpoint/targets/remove
POST /endpoint/targets/set/tagGET /endpoint/tunnel/listPOST /endpoint/tunnel/start/socks5
POST /endpoint/tunnel/start/socks4
POST /endpoint/tunnel/start/lportfwd
POST /endpoint/tunnel/start/rportfwdPOST /endpoint/tunnel/stopPOST /endpoint/tunnel/set/infoGET /endpoint/service/listPOST /endpoint/service/call
Content-Type: application/json
{
"function": "myFunction",
"args": "{...}"
}These require OTP authentication instead of JWT:
POST /endpoint/otp/upload/tempGET /endpoint/otp/download/syncAll API endpoints return JSON responses:
Success:
{
"ok": true,
"data": { ... }
}Error:
{
"ok": false,
"message": "Error description"
}Unauthenticated or unrecognized requests receive the configured HTTP error page (default: 404 with the custom error page).