Reducing False Positives
What is it?
Reducing false positives means testing a rule against a benign corpus (goodware) and refining it until it stops matching legitimate files — by choosing more distinctive strings, adding evidence, or excluding a benign pattern.
Why it matters
A YARA rule that flags legitimate software wastes analyst time and erodes trust. Testing against goodware before deployment is what makes a rule usable at fleet scale.
Where you see it
Running a candidate rule over a folder of common legitimate binaries; a hit there means the rule is too generic and needs a more distinctive string or a stricter condition.
What normal looks like
A rule that matches the target family and produces zero hits on the benign corpus, with any residual risk documented.
What suspicious looks like
A rule that matches a popular library or installer string (huge false-positive surface) — usually a too-common string chosen for convenience.
How analysts investigate
Test against goodware; for each false hit, find which string caused it and replace it with something distinctive to the malware, or strengthen the condition — then re-test.
Common beginner mistakes
- Deploying a rule without ever testing it against benign files.
- Choosing a convenient common string instead of a malware-distinctive one.
Test against goodware
candidate rule → run over a benign corpus (common installers, libraries)
hit on 'zlib' string? → too generic (zlib is everywhere)
replace with a malware-distinctive string / add evidence
target: matches the family, ZERO hits on goodwareQuick check
Your rule matches the malware AND several legitimate installers. Best fix?
A quick self-check — it doesn't affect your XP or progress.
Sign in to save your progress on the server.