Skip to content

API: Commands

List of command plugins

Request

GET /api/v1/plugins/commands HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

List of command templates

Request

GET /api/v1/command-templates HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Show information about command template

Request

GET /api/v1/command-templates/{COMMAND_TEMPLATE_ID} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Add command to agent

Request

1
2
3
4
5
6
7
8
POST /api/v1/agents/{AGENT_GUID}/commands HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json

{
  "template": "{COMMAND_TEMPLATE_ID}",
  "configuration": {COMMAND_CONFIGURATION}
}

Example 1

POST /api/v1/agents/{AGENT_GUID}/commands HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json

{
  "template": "cmd",
  "configuration": {
    "command": "whoami"
  }
}

Example 2

POST /api/v1/agents/{AGENT_GUID}/commands HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json

{
  "template": "spawn",
  "configuration": {
    "listenerId": "1",
    "payloadType": "WINDOWS_X64_STAGELESS",
    "encryptedCommunication": true
  },
  "execConf": {
    "execType": "NEW",
    "executable": "C:\\Windows\\System32\\notepad.exe",
    "suspended": false
  }
}

Get agent commands

Request

GET /api/v1/agents/{AGENT_GUID}/commands HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Get all commands

Request

GET /api/v1/commands HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Get result of the one command

Request

GET /api/v1/commands/{COMMAND_ID} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}