Download OpenAPI specification:
The Redteam API controls the automated red-team platform running inside a lab. Use it to inspect attacker sessions and to play actions on a running lab: run custom shell commands, execute Atomic Red Team tests, upload files, and read the attack report.
Unlike the Scenario API, the Redteam API is reached per lab, through the platform gateway proxy:
https://app.<your-domain>/proxy/<lab-id>/api/redteam
Get <lab-id> from the Scenario API (GET /scenario/run_lab returns it, or list
labs via GET /runner/). Fill both values in the Servers selector above.
Requests go through the OIDC-authenticated gateway, so pass the same
Authorization: Bearer <token> header as for the Scenario API — see the
Authentication guide.
Command execution is asynchronous. POST /command (and POST /atomic) queue
work and return an identifier immediately; you then poll GET /command/{id}
until its status is terminal and read its output. Commands run against an
existing attack session (a foothold), identified by its identifier from
GET /attack_sessions.
See the Red-team operations guide for an end-to-end walkthrough.
Status (string) or Status (null) (Status) Filter the results by status. | |
Ordered (boolean) or Ordered (null) (Ordered) Default: false If true, return the results in execution order. | |
Name (string) or Name (null) (Name) Filter the results by name. |
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/attack"
[- {
- "idAttack": 0,
- "status": "string",
- "created_date": "",
- "started_date": "",
- "last_update": "",
- "commands": { },
- "values": "string",
- "output": { },
- "sources": [
- 0
], - "iocs": [
- { }
], - "infrastructure": { },
- "docker_id": "string",
- "worker": {
- "id": "string",
- "name": "string",
- "title": "string",
- "title_fr": "string",
- "description": "string",
- "cve": [
- {
- "property1": "string",
- "property2": "string"
}
], - "version": "string",
- "side_effects": "string",
- "topics": "string",
- "repeatable": true,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "attack_mode": "string",
- "bas_compat": false,
- "options": [ ],
- "destination_port": 0
}, - "user_activity": {
- "id": 0,
- "duration": 0,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "parameters": "string",
- "title": "string",
- "description": "string",
- "task_id": "string"
}, - "custom_attack": {
- "id": "string",
- "uid": "string",
- "title": "string",
- "mitre_tag": "string",
- "status": "string",
- "command": "string",
- "output": "string",
- "description": "string",
- "attack_session_id": "string",
- "target_ip": "string"
}
}
]curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/report"
[- {
- "id": 0,
- "source_ids": [
- 0
], - "attack_type": "ATTACK_REPORT",
- "status": "string",
- "started_date": "string",
- "last_update": "string",
- "target_nodes": [
- {
- "node_type": "TARGET_NODE",
- "node_info": {
- "ip": "string",
- "type_session": "string",
- "privilege_level": "string",
- "session_id": "string",
- "username": "string"
}, - "attack_process_graph": [
- {
- "powershell": {
- "encoded_command": "string",
- "decoded_command": "string",
- "binary": [
- "string"
]
}, - "sh": {
- "encoded_command": "string",
- "decoded_command": "string",
- "binary": [
- "string"
]
}, - "download": "string"
}
]
}
], - "output": [
- { }
], - "iocs": [
- {
- "type": "ip_address",
- "value": "string",
- "description_fr": "string",
- "description_en": "string"
}
], - "worker": {
- "id": "string",
- "name": "string",
- "title": "string",
- "title_fr": "string",
- "description": "string",
- "cve": [
- {
- "property1": "string",
- "property2": "string"
}
], - "version": "string",
- "side_effects": "string",
- "topics": "string",
- "repeatable": true,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "attack_mode": "string",
- "bas_compat": false,
- "options": [ ],
- "destination_port": 0
}
}
]| attack_id required | integer (Attack Id) Identifier of an attack in the knowledge base. |
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/attack/<attack_id>"
{- "idAttack": 0,
- "status": "string",
- "created_date": "",
- "started_date": "",
- "last_update": "",
- "commands": { },
- "values": "string",
- "output": { },
- "sources": [
- 0
], - "iocs": [
- { }
], - "infrastructure": { },
- "docker_id": "string",
- "worker": {
- "id": "string",
- "name": "string",
- "title": "string",
- "title_fr": "string",
- "description": "string",
- "cve": [
- {
- "property1": "string",
- "property2": "string"
}
], - "version": "string",
- "side_effects": "string",
- "topics": "string",
- "repeatable": true,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "attack_mode": "string",
- "bas_compat": false,
- "options": [ ],
- "destination_port": 0
}, - "user_activity": {
- "id": 0,
- "duration": 0,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "parameters": "string",
- "title": "string",
- "description": "string",
- "task_id": "string"
}, - "custom_attack": {
- "id": "string",
- "uid": "string",
- "title": "string",
- "mitre_tag": "string",
- "status": "string",
- "command": "string",
- "output": "string",
- "description": "string",
- "attack_session_id": "string",
- "target_ip": "string"
}
}| attack_id required | integer (Attack Id) Identifier of an attack in the knowledge base. |
curl -X POST "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/attack/<attack_id>/play"
{- "idAttack": 0,
- "status": "string",
- "created_date": "",
- "started_date": "",
- "last_update": "",
- "commands": { },
- "values": "string",
- "output": { },
- "sources": [
- 0
], - "iocs": [
- { }
], - "infrastructure": { },
- "docker_id": "string",
- "worker": {
- "id": "string",
- "name": "string",
- "title": "string",
- "title_fr": "string",
- "description": "string",
- "cve": [
- {
- "property1": "string",
- "property2": "string"
}
], - "version": "string",
- "side_effects": "string",
- "topics": "string",
- "repeatable": true,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "attack_mode": "string",
- "bas_compat": false,
- "options": [ ],
- "destination_port": 0
}, - "user_activity": {
- "id": 0,
- "duration": 0,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "parameters": "string",
- "title": "string",
- "description": "string",
- "task_id": "string"
}, - "custom_attack": {
- "id": "string",
- "uid": "string",
- "title": "string",
- "mitre_tag": "string",
- "status": "string",
- "command": "string",
- "output": "string",
- "description": "string",
- "attack_session_id": "string",
- "target_ip": "string"
}
}Retrieve the latest UserActivity based on the highest user_activity_id.
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/user_activity/latest"
{- "idAttack": 0,
- "status": "string",
- "created_date": "",
- "started_date": "",
- "last_update": "",
- "commands": { },
- "values": "string",
- "output": { },
- "sources": [
- 0
], - "iocs": [
- { }
], - "infrastructure": { },
- "docker_id": "string",
- "worker": {
- "id": "string",
- "name": "string",
- "title": "string",
- "title_fr": "string",
- "description": "string",
- "cve": [
- {
- "property1": "string",
- "property2": "string"
}
], - "version": "string",
- "side_effects": "string",
- "topics": "string",
- "repeatable": true,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "attack_mode": "string",
- "bas_compat": false,
- "options": [ ],
- "destination_port": 0
}, - "user_activity": {
- "id": 0,
- "duration": 0,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "parameters": "string",
- "title": "string",
- "description": "string",
- "task_id": "string"
}, - "custom_attack": {
- "id": "string",
- "uid": "string",
- "title": "string",
- "mitre_tag": "string",
- "status": "string",
- "command": "string",
- "output": "string",
- "description": "string",
- "attack_session_id": "string",
- "target_ip": "string"
}
}Display all Docker logs (start and stop workers), and return a dict where keys are attack IDs (or a docker ID if not associated with an attack) and values are worker docker logs.
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/logs"
{- "property1": [
- "string"
], - "property2": [
- "string"
]
}Display a specific Docker logs, and return a dict where keys are attack IDs (or a docker ID if not associated with an attack) and values are worker docker logs.
| attack_id required | integer (Attack Id) Identifier of an attack in the knowledge base. |
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/logs/<attack_id>"
[- "string"
]Quick platform reset :
curl -X DELETE "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/platform"
{- "message": "string"
}curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/worker"
[- {
- "id": "string",
- "name": "string",
- "title": "string",
- "title_fr": "string",
- "description": "string",
- "cve": [
- {
- "property1": "string",
- "property2": "string"
}
], - "version": "string",
- "side_effects": "string",
- "topics": "string",
- "repeatable": true,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "attack_mode": "string",
- "bas_compat": false,
- "options": [ ],
- "destination_port": 0
}
]| worker_id required | string (Worker Id) Identifier of a red-team worker. |
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/worker/<worker_id>"
{- "id": "string",
- "name": "string",
- "title": "string",
- "title_fr": "string",
- "description": "string",
- "cve": [
- {
- "property1": "string",
- "property2": "string"
}
], - "version": "string",
- "side_effects": "string",
- "topics": "string",
- "repeatable": true,
- "mitre_data": {
- "technique": {
- "id": "string",
- "name": "string"
}, - "subtechnique": {
- "id": "string",
- "name": "string"
}, - "tactics": [
- {
- "id": "string",
- "name": "string"
}
], - "implementation": {
- "id": "string"
}
}, - "attack_mode": "string",
- "bas_compat": false,
- "options": [ ],
- "destination_port": 0
}Display informations known by attacker about hosts and attack session.
curl "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/attack_sessions" \ -H "Authorization: Bearer $TOKEN"
{- "attack_sessions": [
- {
- "idAttackSession": 0,
- "attack_source": 0,
- "source": "string",
- "username": "string",
- "type": "string",
- "identifier": "string",
- "privilege_level": 0,
- "direct_access": true,
- "port": 0,
- "is_up": true,
- "parent_id": 0,
- "idHost": 0,
- "target": {
- "idNetworkInterface": 0,
- "ip": "string",
- "mac": "string",
- "subnet": "string",
- "internet_access": true,
- "host": {
- "idHost": 0,
- "attack_source": 0,
- "hostname": "string",
- "netbios_name": "string",
- "domain": "string"
}
}
}
]
}Display informations known by attacker about hosts and attack session.
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/attack_infrastructures"
{- "attack_infrastructures": [
- {
- "idInfrastructure": 0,
- "attack_source": 0,
- "public_ip": "string",
- "private_ip": "string",
- "domain_name": "string",
- "type": "string",
- "token": "string"
}
]
}Display informations known by attacker about hosts and attack session.
curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/attack_knowledge"
{- "hosts": [
- {
- "idHost": 0,
- "attack_source": 0,
- "hostname": "string",
- "netbios_name": "string",
- "domain": "string",
- "network_interfaces": [
- {
- "idNetworkInterface": 0,
- "ip": "string",
- "mac": "string",
- "subnet": "string",
- "internet_access": true
}
], - "roles": [
- {
- "idRole": 0,
- "name": "string"
}
], - "files": [
- {
- "idFile": 0,
- "name": "string",
- "path": "string"
}
]
}
], - "network_interfaces": [
- {
- "idNetworkInterface": 0,
- "ip": "string",
- "mac": "string",
- "subnet": "string",
- "internet_access": true
}
], - "services": [
- {
- "idService": 0,
- "vendor": "string",
- "product": "string",
- "version": "string",
- "status": "string",
- "credentials": [
- {
- "idCredential": 0,
- "username": "string",
- "password": "string",
- "domain": "string",
- "type": "string"
}
]
}
], - "softwares": [
- {
- "idSoftware": 0,
- "vendor": "string",
- "product": "string",
- "version": "string",
- "path": "string",
- "status": "string",
- "credentials": [
- {
- "idCredential": 0,
- "username": "string",
- "password": "string",
- "domain": "string",
- "type": "string"
}
]
}
], - "credentials": [
- {
- "idCredential": 0,
- "username": "string",
- "password": "string",
- "domain": "string",
- "type": "string"
}
], - "payloads": [
- {
- "idPayload": 0,
- "name": "string",
- "url": "string",
- "payload_type": "string",
- "payload_os": "string"
}
], - "files": [
- {
- "idFile": 0,
- "name": "string",
- "path": "string"
}
], - "ad_groups": [
- {
- "idADGroup": 0,
- "name": "string",
- "credentials": [
- {
- "idCredential": 0,
- "username": "string",
- "password": "string",
- "domain": "string",
- "type": "string"
}
], - "gpos": [
- {
- "idGPO": 0,
- "name": "string"
}
], - "hosts": [
- {
- "idHost": 0,
- "attack_source": 0,
- "hostname": "string",
- "netbios_name": "string",
- "domain": "string"
}
]
}
]
}Add informations in knowledge database to generate new attack.
| topic_name required | string (Topic Name) Knowledge topic (RabbitMQ routing key). |
| topic_data required | Array of any (Topic Data) Entries to add for this topic; each is published to the worker. |
{- "topic_name": "string",
- "topic_data": [
- null
]
}{- "status": "string"
}curl -X GET "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/command"
[- {
- "id": "string",
- "uid": "string",
- "title": "string",
- "mitre_tag": "string",
- "status": "string",
- "command": "string",
- "output": "string",
- "description": "string",
- "attack_session_id": "string",
- "target_ip": "string"
}
]| command required | string (Command) |
| identifier required | string (Identifier) |
| title | string (Title) Default: "CUSTOM EXECUTION" |
{- "command": "string",
- "identifier": "string",
- "title": "CUSTOM EXECUTION"
}{- "idResultCommand": 0
}| idResultCommand required | string (Idresultcommand) Identifier returned by POST /command (or POST /atomic). |
curl "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/command/42" \ -H "Authorization: Bearer $TOKEN" # -> { "id": 42, "status": "success", "command": "whoami", "output": "nt authority\\system", ... }
{- "id": "string",
- "uid": "string",
- "title": "string",
- "mitre_tag": "string",
- "status": "string",
- "command": "string",
- "output": "string",
- "description": "string",
- "attack_session_id": "string",
- "target_ip": "string"
}This methods adds Atomic tests to the list of custom commands to execute, and returns the list of attack result IDs.
Caller of this API can then request the /get_command with an attack result ID to get the command status.
| attack_session_identifier required | string (Attack Session Identifier) Identifier of the target attack session (from GET /attack_sessions). |
| upload_file required | string <binary> (Upload File) |
# Run an Atomic Red Team test file against an attack session. # Returns a list of command ids; poll GET /command/{id} for each. curl -X POST "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/atomic?attack_session_identifier=<attack-session-identifier>" \ -H "Authorization: Bearer $TOKEN" \ -F "upload_file=@T1053.003.yaml"
[- "string"
]| identifier required | string (Identifier) Identifier of the target attack session (from GET /attack_sessions). |
| upload_file required | string <binary> (Upload File) |
curl -X POST "https://app.mantis-platform.io/proxy/LAB_ID/api/redteam/upload?identifier=<attack-session-identifier>" \ -H "Authorization: Bearer $TOKEN" \ -F "upload_file=@./payload.exe"
{- "idResultCommand": 0
}