Contents
API that external systems can use to receive information about application events
Kaspersky Anti Targeted Attack Platform provides an API for external systems that provides access to information about events registered by the application.
To receive information only for events that satisfy certain conditions, you can specify filters in the request parameters.
The application does not automatically send information about new events based on prior requests. A new request must be sent to receive up-to-date information.
Information about new events can be retrieved for no more than two hours after these events appear in the Kaspersky Anti Targeted Attack Platform database.
Special considerations for operation in the distributed solution
If the application runs in distributed solution mode, you must separately configure the integration with the external system for each PCN and SCN server from which you want to receive events. This limitation is due to the fact that the web interface of the PCN server displays information about all events, but the events database stores only those events that have been registered on that specific server.
Page topRequest for querying event information
To create a request for getting information about events, the HTTP GET method is used.
You can set the parameters for executing a cURL command by using additional switches (see the table below).
Please refer to the cURL documentation for more information about cURL command switches.
At the first request, Kaspersky Anti Targeted Attack Platform creates a ContinuationToken (hereinafter also referred to as the "token"). The application sends events available in the system at the time of the token creation. When a new token is created, Kaspersky Anti Targeted Attack Platform sends events available in the system at the time of creation of this token.
The token contains information about which data were transmitted last. If you want to receive events recorded after the last request, you must save the created token and use it in future requests.
Command syntax
For the first request:
curl --cert <path to the TLS certificate file> --key <path to the private key file> -X GET "<URL of the server with the Central Node component>:<port, 443 by default>/kata/events_api/v1/<external_system_id>/events"
If the request is processed successfully, information about requested events and the token value are displayed.
For subsequent requests:
curl --cert <path to the TLS certificate file> --key <path to the private key file> -X GET "<URL of the server with the Central Node component>:<port, 443 by default>/kata/events_api/v1/<external_system_id>/events&continuation_token=<token value received by the first request>"
If the request is processed successfully, information about events received since the last request is displayed.
You can create a request to output information about events by specifying the maximum collection time and number of events, as well as event filtering parameters:
curl --cert <path to the TLS certificate file> --key <path to the private key file> -X GET "<URL of the server with the Central Node component>:<port, 443 by default>/kata/events_api/v1/<external_system_id>/events?filter=<event filter>&max_timeout=<maximum event collection time>&max_events=<maximum number of events>&continuation_token=<token value received by the first request>"
If you specified the value of the filter
parameter for the first request, you do not have to specify it during subsequent requests: the filtering parameters are saved from the previous request and are used if no new parameters are passed in subsequent requests. If you do not want to use filtering, do not specify a value for the parameter.
Settings
Parameter |
Type |
Description |
---|---|---|
|
UUID |
Unique ID of the external system used for authorization in Kaspersky Anti Targeted Attack Platform. |
|
string |
Event filtering settings. These are set using the event query language. |
|
int |
Maximum event collection time. Specified in the following format: PT<integer value>S. For example, PT300S. The server sends information about events collected during the specified time. The default value is 5 minutes. This value is used unless otherwise specified in the request. The maximum event collection time may not exceed 5 minutes. If you specify a value greater than 5 minutes, the Central Node server returns an error. The actual total time to wait for events may be increased. |
|
int |
Maximum number of events If no value is specified in the request, Kaspersky Anti Targeted Attack Platform calculates it based on the number of hosts on which the Endpoint Agent component is installed. Examples of values for typical configurations:
The value specified in the request must not exceed these limits. |
|
string |
Value of the token. |
Example of entering commands with parameters
|
|
If parameter values contain special characters, you must use URL encoding or the
--data-urlencode
option in requests.
Example of commands with URL-encoded parameters
|
Example of commands with parameters that use the --data-urlencode
option
|
Response
HTTP code: 200
Format: JSON
|
Returned value
Return code |
Description |
---|---|
|
Incorrect parameters. |
|
Authorization required. |
|
Internal server error. Repeat the request later. |
Query language for filtering events
The event filtering query language supports the following functions and operators:
- Functions:
in
. - Comparison operators for String or Boolean values:
==
!=
- Comparison operators for numbers and variables:
AND
OR
NOT
==
!=
>
>=
<
<=
You can view the list of fields by which you can filter events in the Fields for filtering events section.
If you want to receive information about events of different types, you must create a separate request for each type of event.
|
Numerical and string constants are supported. String constants must be enclosed in single quotation marks: 'example'
. Wildcards * and ? are supported for string constants. If you do not want to use these characters as wildcards, you must escape them: \*
, \?
. Also, in string constants, you must escape special characters.
Fields for filtering events
The fields for filtering events are listed in the table below.
If field values contain special characters, you must use URL encoding or the
--data-urlencode
option in requests.
List of fields for filtering events
Field name |
Type |
Description |
---|---|---|
hostName |
string |
Host name. |
HostIp |
string |
IP address of the host. |
EventType |
string |
Event type. Possible values:
|
UserName |
string |
User name. |
OsFamily |
string |
Family of the operating system. |
OsVersion |
string |
Version of the operating system being used on the host. |
Ioa.Rules.Id |
string |
TAA (IOA) rule ID. |
Ioa.Rules.Name |
string |
Information about the results of file analysis using the Targeted Attack Analyzer technology: name of the TAA (IOA) rule that was used to create the alert. |
Ioa.Rules.Techniques |
string |
MITRE technique |
Ioa.Rules.Tactics |
string |
MITRE tactic |
Ioa.Severity |
string |
Importance level that is assigned to an event generated using this TAA (IOA) rule. Possible values:
|
Ioa.Confidence |
string |
Level of confidence depending on the likelihood of false alarms caused by the rule. Possible values:
|
FileCreationTime |
integer |
File creation time. |
DllCreationTime |
integer |
DLL creation time. |
DroppedCreationTime |
integer |
Creation time of the modified file. |
InterpretedFileCreationTime |
integer |
Creation time of the interpreted file. |
FileName |
string |
File name. |
DllName |
string |
DLL name. |
DroppedName |
string |
Name of the modified file. |
BlockedName |
string |
Name of the blocked file. |
InterpretedFileName |
string |
Name of the interpreted file. |
FilePath |
string |
Path to the directory where the file is located. |
DllPath |
string |
Path to the directory where the DLL is located. |
DroppedPath |
string |
Path to the directory where the modified file is located. |
BlockedPath |
string |
Path to the directory where the blocked file is located. |
InterpretedFilePath |
string |
Path to the directory where the interpreted file is located. |
FileFullName |
string |
Full path to the file. Includes the path to the directory and the file name. |
DllFullName |
string |
Full path to the DLL. Includes the path to the directory and the file name. |
DroppedFullName |
string |
Full path to the modified file. Includes the path to the directory and the file name. |
BlockedFullName |
string |
Full path to the blocked file. Includes the path to the directory and the file name. |
DetectedName |
string |
Full path to the detected file. Includes the path to the directory and the file name. |
OriginalFileName |
string |
Full path to the original file. Includes the path to the directory and the file name. |
InterpretedFileFullName |
string |
Full path to the interpreted file. Includes the path to the directory and the file name. |
FileModificationTime |
integer |
File modification time. |
DllModificationTime |
integer |
DLL modification time. |
DroppedModificationTime |
integer |
Modification time of the modified time. |
InterpretedFileModificationTime |
integer |
Modification time of the interpreted time. |
FileSize |
integer |
File size. |
DllSize |
integer |
DLL size. |
DroppedSize |
integer |
Size of the modified file. |
InterpretedFileSize |
integer |
Size of the interpreted file. |
Md5 |
string |
MD5 hash of the file. |
DllMd5 |
string |
MD5 hash of the DLL |
DroppedMd5 |
string |
MD5 hash of the modified file. |
InterpretedMd5 |
string |
MD5 hash of the interpreted file. |
DetectedMd5 |
string |
MD5 hash of the detected file. |
Sha256 |
string |
SHA256 hash of the file. |
DllSha256 |
string |
SHA256 hash of the DLL. |
DroppedSha256 |
string |
SHA256 hash of the modified file. |
BlockedSha256 |
string |
SHA256 hash of the blocked file. |
InterpretedSha256 |
string |
SHA256 hash of the interpreted file. |
DetectedSha256 |
string |
SHA256 hash of the detected file. |
HijackingPath |
string |
A malicious DLL placed in a directory on the standard search path to make the operating system load it before the original DLL. |
LogonRemoteHost |
string |
IP address of the host that initiated remote access. |
RealUserName |
string |
Name of the user assigned when the user was registered in the system. |
EffectiveUserName |
string |
User name that was used to log in to the system. |
Environment |
string |
Environment variables. |
ProcessType |
integer |
Process type. Possible values:
|
LinuxOperationResult |
string |
Result of the operation. Possible values:
|
SystemPid. |
integer |
Process ID. |
ParentFileFullName. |
string |
Path to the parent process file. |
ParentMd5 |
string |
MD5 hash of the parent process file. |
ParentSha256 |
string |
SHA256 hash of the parent process file. |
StartupParameters |
string |
Process start options. |
ParentSystemPid |
integer |
Parent process ID. |
ParentStartupParameters |
string |
Parent process startup settings. |
Method. |
string |
HTTP request method. |
Direction. |
string |
Connection direction. Possible values:
|
LocalIp |
string |
IP address of the local computer from which the remote connection attempt was made. |
LocalPort |
integer |
Port of the local computer from which the remote connection attempt was made. |
RemoteHostName |
string |
Name of the computer that was the target of the remote connection attempt. |
RemoteIp |
string |
IP address of the computer that was the target of the remote connection attempt. |
RemotePort |
integer |
Port of the computer that was the target of the remote connection attempt. |
URI |
string |
Address of the resource to which the HTTP request was made. |
KeyName |
string |
Path to the registry key. |
ValueName |
string |
Registry value name. |
ValueData |
string |
Registry value data. |
RegistryOperationType |
integer |
Type of the operation with the registry. Possible values:
|
PreviousKeyName |
string |
Previous path to the registry key. |
PreviousValueData |
string |
Previous name of the registry value. |
System.EventID.value |
string |
Type ID of the security event in the Windows log. |
LinuxEventType |
string |
Event type. Possible values:
|
System.Channel.value |
string |
Log name. |
System.EventRecordID.value |
string |
Entry ID in the log. |
System.Provider.Name.value |
string |
ID of the system that logged the event. |
EventData.Data.TargetDomainName.value |
string |
Domain name of the remote computer. |
EventData.Data.ObjectName.value |
string |
Name of the object that initiated the event. |
EventData.Data.PackageName.value |
string |
Name of the package that initiated the event. |
EventData.Data.ProcessName.value |
string |
Name of the process that initiated the event. |
VerdictName |
string |
Name of the detected object. |
RecordId |
integer |
ID of the triggered rule. |
ProcessingMode |
string |
Scanning mode. Possible values:
|
DetectedName |
string |
Name of the object. |
DetectedObjectType |
string |
Type of the object. Possible values:
|
ThreatStatus |
string |
Discovery mode. Possible values:
|
UntreatedReason |
string |
Object processing status. Possible values:
|
InteractiveInputText |
string |
Interpreter command. |
ObjectContent |
string |
Contents of the script sent to be scanned. |
ObjectContentType |
integer |
Content type of the script. Possible values:
|
FileOperationType |
integer |
Type of the file operation. Possible values:
|
PreviousFileName |
string |
Path to the directory where the file was previously located. |
PreviousFileFullName |
string |
Full name of the file including the path to the directory where the file was previously located and/or the previous file name. |
DroppedFileType |
integer |
Type of the modified file. Possible values:
|