Running the Run YARA Scan task. The application scans files and objects for indicators of targeted attacks on the corporate IT infrastructure using databases of YARA rules. YARA rules are descriptions of signatures of targeted attacks and intrusions into the corporate IT infrastructure that Kaspersky Endpoint Security uses to scan objects.
To run a YARA scan, you must prepare YARA files that describe rules. When creating YARA files, consider the following requirements:
Kaspersky recommends creating one rule per YARA file. This makes the scan results more readable.
A YARA scan can take a long time. Depending on the drive size, task settings, and the number of objects on the disk, a YARA scan can last anywhere from several minutes to several hours. The application does not display a progress indicator. It is not possible to stop or cancel a YARA scan. You are advised to wait until the results of a YARA scan are available.
Command syntax
avp.com YARA <full path to the YARA file>|/path=<path to the folder with YARA files> [<advanced settings>]
YARA files |
|
|
Full path to the YARA file that you want to use for scanning. You can specify paths to multiple YARA files separated by spaces. Required argument if the Example:
|
|
Full path to a folder with YARA files that you want to use for scanning. Required argument if the Example:
|
Advanced settings |
|
|
Quick YARA Scan. For each object, the application logs one occurrence of the detected indicator. The application also hides duplicates of detected indicators in the log. Quick YARA Scan allows scanning large files quicker. If this setting is not specified, the application performs a standard YARA scan. In this mode, the application logs duplicates of detected indicators. |
|
Limit of the number of unique triggered rules that makes the application stop the YARA scan when reached. If the value of this setting is not specified or if |
|
Limit of the YARA scan duration in seconds. When this time runs out, the application stops the YARA scan. If the value of this setting is not specified or if |
|
This argument starts a recursive scan of subfolders within the |
|
This argument starts a YARA scan of files in the specified list of folders. You can specify multiple values separated by spaces. Kaspersky Endpoint Security supports the If this setting is not specified, the application performs a YARA scan of all local disks except network shares, cloud drives, and removable media. |
|
Scan the memory of all running processes. |
|
Scan memory only for the listed processes. Specify space-separated full paths to executable files of processes. You can also use |
|
File size limit for the YARA scan. The application skips larger files. |
|
Editing the scan scope. You can specify multiple values separated by spaces. The following values are available:
Scan scope must be specified with the Example:
|
|
Excluding files from the YARA scan. You can specify multiple values separated by spaces. The following values are available:
Exclusions must be specified with the Example:
|
|
YARA scan of autorun point objects. |
|
Excluding autorun point objects from the scan scope. Specify space-separated full paths to executable files of processes. You can also use |
|
If you specify a path to a folder, the application saves scan results at the specified path in a file named yara_<computer name>_<scan completion time>.txt. If you specify a path to a specific TXT file, the application saves the scan results in that file. For example: Scan results are output to the command line regardless of whether the |
Command return values:
-1 means the command is not supported by the version of the application that is installed on the computer.0 – the command completed successfully.1 means a mandatory argument was not passed to the command.2 means a general error occurred.4 means there was a syntax error.5: One or more YARA rule files specified in the argument could not be found.If the command was executed successfully (return value 0) and indicators of compromise were detected along the way, Kaspersky Endpoint Security outputs the following task result information to the command line:
|
Start time and completion time of a scan. |
|
The name of the computer on which the object was detected. |
|
Error code for the error that occurred while running the task. If there are no errors, the application outputs |
|
Error description for the error that occurred while running the task. For example, |
|
The name of the object or process on which the YARA rule triggered. |
|
Hashes of the object on which the YARA rule triggered. |
|
The name of the triggered YARA rule. |
|
Metadata specified in the YARA rule. |
|
Found matches within the object that meet the YARA rule conditions:
|