Closed tlansec closed 4 months ago
My past self comes to the rescue: https://github.com/VirusTotal/yara/commit/4de3d574bae5973c711095c1c755166c07dec322
As explained in the commit message, there were some false negatives in fast-mode with expressions like:
any of <string_set> in <range>
any of <string_set> at <offset>
The quick and dirty solution for the false negatives was finding all instances of the strings in <string_set>
, even if not strictly required in some other expressions like x of <string_set>
. The underlying problem is that at the point of the code were this decision is made, we don't have information about the kind of expressions we are parsing. Fixing this issue would require non-trivial changes.
Hey Victor,
Thanks for the explanation. It makes sense to avoid false negatives in this scenario, and if there isn't an easy way to fix it then I suppose we should mark this issue as resolved.
Cheers, Tom
Describe the bug When using a set of strings in conjunction with fast-mode, YARA will record the offsets of all the matching strings (contrary to the documnetations suggsted functionality)
To Reproduce Use the following rule to match against YARA itself:
Results in:
Expected behavior I would expect it to record the first instance of $s1 and $s2 only, e.g.: