Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Safely Account for a YARA Compilation Failure#411

Merged
phutelmyer merged 2 commits intomasterfrom
yara-compiled-fix
Nov 10, 2023
Merged

Safely Account for a YARA Compilation Failure#411
phutelmyer merged 2 commits intomasterfrom
yara-compiled-fix

Conversation

@phutelmyer
Copy link
Contributor

Describe the change
As identified in #410, Strelka will fail to load YARA, and subsequently fail to scan, if an unsupported YARA rule is ingested. This can be fixed by curating YARA rules prior to use in Strelka, however, to account for safe loading, we are now checking for a properly loaded compiled YARA prior to use.

Note: This may still fail if users remove the default test YARA and push unsupported YARA rules.

Describe testing procedures
A test using an unsupported YARA rule was created. This test successfully passes, which prior to the changes, did not. Strelka should not fail anymore using the default patterns + any unsupported patterns.

Sample output
N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of and tested my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@phutelmyer phutelmyer merged commit b39c78f into master Nov 10, 2023
@phutelmyer
Copy link
Contributor Author

Note
As Strelka supports pre-compiled rulesets, we recommend using those to prevent rule compilation failures.
Compiling rules in a pipeline ahead of Strelka ensures that all expected rules will load properly every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant