Skip to content
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

YARA Generator and Rule Update 240726 #182

Merged
merged 5 commits into from
Aug 12, 2024
Merged

YARA Generator and Rule Update 240726 #182

merged 5 commits into from
Aug 12, 2024

Conversation

Neo23x0
Copy link
Collaborator

@Neo23x0 Neo23x0 commented Jul 29, 2024

  • I tried for 3 hours to improve the rule generator and make it generate rules based on certificate information in cases the PE header info isn't enough just to find out that in all cases in which there is no PE info the sec directory structure is also not present and so I decided to give up

BUT, I re-run the generator and would like to use a different directory structure:

  • / (root) contains rules we recommend to use
  • /other contains variations of the rules that can be used in certain non-standard use cases

I also ran the generator to generate new rules but I noticed that you guys also removed some drivers.

@josehelps
Copy link
Collaborator

@Neo23x0 been out of town but should be able to test and merge this in next week, stand by apologies for taking a bit to get you a reply here.

@josehelps
Copy link
Collaborator

Hey yeah some got moved to the bootloader project and others were duplicates.

This ran smoothly looks good to me:

[INFO ] [+] Writing 507 YARA rules to the output file ../../detections/yara/other/yara-rules_vuln_drivers.yar
[INFO ] [+] Writing 22 YARA rules to the output file ../../detections/yara/yara-rules_mal_drivers.yar
[INFO ] [+] Writing 507 YARA rules to the output file ../../detections/yara/yara-rules_vuln_drivers_strict.yar
[INFO ] [+] Writing 22 YARA rules to the output file ../../detections/yara/other/yara-rules_mal_drivers_strict.yar
[INFO ] [+] Writing 507 YARA rules to the output file ../../detections/yara/other/yara-rules_vuln_drivers_strict_renamed.yar

matches the count on the files included in the PR as well

(loldrivers-py3.12) jhernandez in ~/magicsword/LOLDrivers/detections/yara on yara_update_240726 λ cat yara-rules_vuln_drivers_strict.yar| grep "rule "  | wc -l
     507

@josehelps josehelps merged commit b6dd164 into main Aug 12, 2024
2 checks passed
@josehelps
Copy link
Collaborator

We use the PE info to also extract the certificate using LIEF is is why likely is missing.

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.

2 participants