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

none keyword #1559

Merged
merged 3 commits into from
Sep 2, 2021
Merged

none keyword #1559

merged 3 commits into from
Sep 2, 2021

Conversation

wxsBSD
Copy link
Collaborator

@wxsBSD wxsBSD commented Aug 31, 2021

Add the "none" keyword to the grammar which is just 0 (similar to "all" and "any").

@plusvic plusvic merged commit eb92e6b into VirusTotal:master Sep 2, 2021
@wxsBSD wxsBSD deleted the none branch September 2, 2021 20:09
tarterp pushed a commit to mandiant/yara that referenced this pull request Mar 31, 2022
@lupiotte
Copy link

Hello,

From my understanding the "none" statement doesn't work as I expect ;). Indeed even if a string appear in a scanned file the expression using "none" will report a true condition.
I have leveraged different version yara-v4.2.1-1934-win64 / yara-master-1798-win64 / yara-4.2.0 with the same issue.
Test done via official precompiled binaries (only x64 version tested) and executed under Windows environement (W10).

BTW you haven't included in your testing rules tests (tests/test-rules.c) which should have highlighted this issue.
image

Something like:

assert_false_rule(
"rule test { strings: $a = "dummy1" $b = "dummy2" $c = "ssi" "
"condition: none of them }",
TEXT_1024_BYTES "mississippi");

assert_false_rule(
"rule test { strings: $a1 = "dummy1" $b1 = "dummy2" $b2 = "ssi""
"condition: none of ($a*, $b*) }",
TEXT_1024_BYTES "mississippi");

Hope it's help.

maximelb pushed a commit to refractionPOINT/yara that referenced this pull request Nov 17, 2022
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.

3 participants