Kaspersky Research Sandbox provides an API to obtain Suricata alerts triggered by the user's custom rules.
The response structure contains the data received directly from the Suricata scanner. For more details about data structure, refer to Suricata documentation.
Request
Request method: GET
Endpoint: https://<server name>/api/v1/sandbox/tasks/<task ID>/custom-suricata-alerts
Parameters
Obtaining custom Suricata rule alerts parameters
Parameter |
Data type |
Occurrence |
Description |
---|---|---|---|
|
string |
Required |
Object execution task ID (GUID). |
cURL command sample: $ curl --http1.1 --user <user name> --request GET --header "Content-Type:application/octet-stream" --data-binary '@<path to file>' 'https://<server name>/api/v1/sandbox/tasks/<task ID>/custom-suricata-alerts' You will be asked to enter your password. The password is not displayed while you type it. |
Responses
Endpoint returns alerts triggered by the user's custom Suricata rules.
200 OK
Suricata alerts obtained successfully.
200 OK response parameters
Parameter |
Data type |
Description |
---|---|---|
|
string |
Date and time when an alert was registered. |
|
string |
Event type, for example "alert". |
|
number |
Flow ID. |
|
string |
Source IP address. |
|
integer |
Source port number. |
|
string |
Destination IP address. |
|
integer |
Destination port number. |
|
string |
Protocol used, for example, "UDP". |
|
string |
Application layer protocol, for example "TLS". |
|
array |
Information about a packet:
|
|
array |
Alert description:
|
200 OK response example: { "timestamp": "2022-09-01T12:01:36.936848+0300", "event_type": "alert", "flow_id": 1202053786389392, "src_ip": "10.109.221.118", "src_port": 56001, "dest_ip": "224.0.0.252", "dest_port": 5355, "proto": "UDP", "app_proto": "failed", "packet_info": { "linktype": 1 }, "alert": { "action": "allowed", "gid": 1, "signature_id": 1, "rev": 1, "signature": "Trojan-Spy.Win32.Solmyr.a", "category": "", "severity": 3 }, "packet": "AQBeAAD8AOBM8826CABFAAAyAHMAAAER8GgKbd124AAA/NrBFOsAHtILnD0AAAABAAAAAAAABHdwYWQAAAEAAQ==" } |
400 Bad Request
Failed to obtain Suricata alerts.
400 Bad Request response parameters
Parameter |
Data type |
Description |
---|---|---|
|
string |
Error ID. |
|
string |
Description of the error. |
|
string |
Additional information, if available. |
Error examples: Incorrect {"code":6,"message":"task not found"} Incorrect {"code":29,"message":"bad task id"} |
401 Unauthorized
Failed to obtain Suricata alerts due to incorrect user credentials.
404 Not Found
Failed to obtain Suricata alerts due to incorrect task ID.
500 Internal Server Error
Failed to obtain Suricata alerts due to an internal server error.
Page top