How to perform Yara-scan using KEA [Kaspersky Endpoint Agent]
The scenario is applicable for KEA version 3.10 and above.
There is no built-in feature to perform Yara-scan using KATA/EDR Expert 3.7.2. But if necessary, it's possible to perform it using KEA 3.10 and above.
Yara-scan using the Command line
Requirements:
- KEA 3.10 (and above) installed
-
Files with Yara-rules (
*.yara;*.yar)
Scenario:
- Ensure that KEA is installed and running;
-
Run the Yara-scan
"C:\Program Files (x86)\Kaspersky Lab\Endpoint Agent\agent.exe"--scan-yara --path c:\rules --folder c:\files --scan-files yesSyntax--path [PATH]- the location of yara-files
--folder [PATH]- the scope of scanning (e.g.C:\to scan all files on the C drive and subfolders) - Results will be listed on the CLI
Yara-scan using KATA/EDR Web-UI
Alternatively you can perform the commend using "Run program" EDR task from Central Node.
Yara-scan using KSC
If KEA is installed and managed from KSC server, you can start the command by *.bat file using Remote installation task.
Requirements:
- KEA 3.10 (and above) installed
- Files with Yara-rules (*.yara; *.yar)
- Shared folder with READ ALL access
- Shared folder with WRITE ALL access
Follow these steps:
- Prepare the batch file
- Prepare Shared folders: one with READ and one with WRITE access for everyone
-
Create installation package on KSC using
*.batfile (see example below) - Create and start "Install application remotely" task
Example:
@echo off
"C:\Program Files (x86)\Kaspersky Lab\Endpoint Agent\agent.exe" --scan-yara --path \\SHARE\YaraRules\ --folder C:\ --scan-files yes >> C:\Windows\Temp\yara-scan-results.txt
copy C:\Windows\Temp\yara-scan-results.txt \\SHARE\YaraScanRusults\%computername%_results.txt
|
The script will start Yara scanning using KEA: all files at C:\ will be scanned using all rules from \\SHARE\YaraRules\, results will be saved into \\SHARE\YaraScanRusults\ folder.
\\SHARE\YaraRules\ folder should be available for READ
\\SHARE\YaraScanRusults\ folder should be available for WRITE


0 Comments
Recommended Comments
There are no comments to display.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now