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

Implement more efficient batch rule evaluator #45

Merged
merged 5 commits into from
Sep 4, 2024
Merged

Conversation

bradleyjkemp
Copy link
Owner

This implements a new evaluator which processes a bundle of rules in one go. By doing so it can make use of more efficient string matching algorithms (namely Aho-Corasik) which are significantly faster than strings.Contains

Benchmarking this on phish.report data, this new bundle evaluator is >50x faster than running individual rules

@bradleyjkemp bradleyjkemp merged commit 0da7f75 into main Sep 4, 2024
1 check passed
@bradleyjkemp bradleyjkemp deleted the ahocorasick branch September 4, 2024 14:08
scudette pushed a commit to Velocidex/sigma-go that referenced this pull request Oct 25, 2024
* mvp

* Fuzz, move to new, correct library

* Use same technique for regexes

* cleanup

* dedupe matching logic
scudette pushed a commit to Velocidex/sigma-go that referenced this pull request Oct 25, 2024
* mvp

* Fuzz, move to new, correct library

* Use same technique for regexes

* cleanup

* dedupe matching logic
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