Skip to content

API: Listeners

List of listener plugins

Request

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

Create new listener

For creating new listener you have to provide ID of the listener type you wish to create (can be found form previous request result).

Request

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

{
  "plugin": "ID_OF_THE_LISTENER",
  "name": "NAME_YOU_GIVE_TO_THE_LISTENER",
  "configuration": {LISTENER_CONFIGURATION}
}

Example

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

{
  "plugin": "shelldot.listener.agent-reverse-tcp",
  "name": "my-tcp-reverse-listener",
  "configuration": {
    "hosts": [
      "localhost",
      "192.168.32.135"
    ],
    "port": 5555,
    "handshakeBytes": "QUFBQQ==",
    "startTime": "2023-04-10T11:02:09Z"
  }
}

List all created listeners

Request

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

Change listener name

Request

1
2
3
4
5
6
7
PATCH /api/v1/listeners/{LISTENER_ID} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json

{
  "name": "NEW_NAME"
}

Start listener

Request

PUT /api/v1/listeners/{LISTENER_ID}/start HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Stop listener

Request

PUT /api/v1/listeners/{LISTENER_ID}/stop HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Delete listener

Request

DELETE /api/v1/listeners/{LISTENER_ID} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}