It Fired.
That Was Never The Hard Part.
The judgment calls that apply whether the rule is written in YARA, Sigma, or Suricata: false-positive reduction, ATT&CK mapping discipline, and testing before a rule ever reaches production. See the YARA, Sigma, and Suricata/Snort guides for the syntax itself.
Rule Anatomy, Universally
Strip away the syntax and every detection rule, regardless of tool, shares the same four parts.
The Four Parts Every Rule Has
1. Trigger Condition The pattern or event that fires the rule: a string match, a field comparison, a behavioral sequence └── This is the only part most people think about when they say "write a rule" 2. Context / Enrichment Asset criticality, user role, time-of-day — the data that turns a raw match into an actual risk score └── The same trigger on a domain controller and a kiosk workstation should not carry equal weight 3. Suppression / Threshold Rate-limiting a pattern that's real but noisy by nature, so a legitimate signal doesn't drown the queue // a brute-force alert without a threshold fires on the third failed login exactly as loud as the three-hundredth 4. Response Action Alert-only vs auto-block, and critically, who actually sees the alert and what they're expected to do with it └── A rule with no defined response action is a rule nobody is accountable for acting on
False Positive Reduction Techniques
A rule that's always right and never fires isn't useful. A rule that fires constantly and is usually wrong gets ignored. The craft lives between those two failure modes.
Document Every Allowlist Entry
Enrich Before You Score
Threshold And Frequency Analysis
Correlate Weak Signals
ATT&CK Mapping Discipline
A tag is either useful triage information or it's decoration. The difference is specificity.
Tag The Technique, Not The Tactic
A Wrong Mapping Is Worse Than None
Use Mapping For Coverage Analysis
Testing Before Deploy
A rule that has never been tested against anything but the sample that inspired it is a rule that hasn't actually been tested.
Confirm It Fires On The Target First
Run It Against A Clean Baseline
Stage The Rollout
Get A Second Set Of Eyes
Common Pitfalls
The mistakes that let a rule ship half-finished, and stay that way for years.
Environment-Specific Logic
No Documented False-Positive Rate
No Owner Or Review Date
Confusing Detected With Confirmed
Full Example
A hypothesis, taken through every step above to a rule actually ready to ship.
From Hypothesis To Shipped Rule
Hypothesis An attacker is using certutil to download a second-stage payload Trigger condition certutil.exe with -urlcache or -split flags present in the command line Context / enrichment Exclude known software-deployment accounts that legitimately run certutil for certificate operations ATT&CK mapping T1105 (Ingress Tool Transfer) — a specific, well-known technique, not a broad tactic guess Testing Ran against a clean one-week baseline: two hits, both traced to the certificate management team's own scheduled maintenance script, added to the documented allowlist with the ticket number attached Staged rollout Alert-only for one week, zero unexplained hits, promoted to full alerting with an assigned owner and a 90-day review date // this is the difference between a rule that ships and a rule that just gets written