-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ScanYara - Traceback Error #410
Comments
Thank you @derfel1989. I'm able to reproduce this and I'll get this fixed up today. I'll @ you when its fixed. |
Seems its an issue with the YARA Rule itself:
|
Should be fixed in the latest commit. I'll push a release later today as well. As noted in PR #411, Strelka supports pre-compiled rulesets, so we recommend using those to prevent rule compilation failures. |
Hi @phutelmyer, thank you for your support. The issue concerning the YARA rule has been resolved. However, the problem below persists for all submitted files. Am I missing something?
|
@derfel1989 Reopening... I rebuilt Strelka and am not getting this issue with the defaults. Can you provide more details on the YARA rules you're importing or any modifications / deviations from the original repo? Does you
|
My backend.yaml at 'strelka/configs/python/backend/backend.yaml' is:
At 'strelka/src/python/strelka/config/backend.yaml' is:
|
The backend config has been updated about a month or two ago with compiled support, please take a look at the latest config. I recommend modifying your current config file to match the latest. In the meantime, a PR has been implemented to fix the unhandled exception you've ran into. Sorry about that. |
That's odd. I'm using a fresh docker pre-build setup. It should come updated, isn't it? I just removed 2 Yara rules, which were present in ScanYara issue flags:
I decided to delete the whole folder, as it related to deprecated rules. Same warning about this file.
Update: Result for all scans: I will update the backend.yml. Thank you for your support. 🙂 |
@phutelmyer, I've reviewed all the backend.yml files. They look like yours. strelka/configs/python/backend/backend.yaml
|
Many thanks for your support. Well, my strelka is a fresh install.
Everything is under "/opt/strelka" and I didn't change anything in the configurations. |
@phutelmyer , please let me know if you need anything from me to replicate the issue I'm facing here. Thank you. |
@phutelmyer - Could you guide me on how to turn off the Yara evaluation before compilation? I changed the Python code below, but it didn't work. File: scan_yara.py From: To: Issue
Thank you. |
@derfel1989 As a solution: I recommend precompiling your YARA rules and providing the compiled file to Strelka to avoid the issues you're seeing. Here's how you can do it: Python Script to Remove Non-Compilable YARA RulesIf you encounter rules that cannot be compiled, you can use the following Python script to iterate through your YARA rules folder, attempt to compile each rule, and remove any files that cause a syntax error:
Remember to replace You can then reference the path to that file in the Backend config. This will resolve your issue at the expense of removing the bad YARA rules. Apologies for the headache here. Strelka does not do this as it is an issue with YARA and its inability to ignore any bad rules. Strelka could iterate every rule and strip out bad rules, but that would decrease performance significantly. Let me know how else I can help, I hope I can assist you quicker in the future. |
@phutelmyer Many thanks for your help, as always. I will test it and get back with the results. |
@phutelmyer Last question: where should I add the reference of the Python file to the backend.yml? |
Apologies for missing this @derfel1989... The Python file above would be your own pipeline / script just ahead of Strelka. The script itself does not produce a compiled .yar file that you can use. I can add to it if you'd like. |
Feel free to reopen this issue if issues persist. |
Describe the bug
A clear and concise description of what the bug is.
Environment details
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
See no error on ScanYara session as a fresh install and a correct Yara rule that matches the file, if applicable.
Screenshots
Release
Additional context
Backend Docker Logs: _strelka-backend-1_logs.txt
The text was updated successfully, but these errors were encountered: