Detection
Tuning
Learn how security teams optimize alert rules to reduce noise, catch real threats, and balance false positives against false negatives.
What Is Detection Tuning?
Detection tuning is the process of adjusting security alert rules and thresholds so that a monitoring system fires on real threats while staying quiet about harmless activity. Think of it as calibrating a smoke detector: too sensitive and it screams at burnt toast, too lax and it ignores a real fire.
Why Tuning Matters
Key Vocabulary
The Confusion Matrix
The Core Trade-Off
False Positive vs False Negative
| False Positive | False Negative | |
|---|---|---|
| Definition | Alert fires on benign activity | No alert for real attack |
| Analogy | Fire alarm at burnt toast | Fire alarm silent during fire |
| Impact | Analyst fatigue, wasted time | Undetected breach, data loss |
| Fix Direction | Tighten rule, add exceptions | Broaden rule, lower threshold |
| Severity | Annoying but visible | Dangerous and invisible |
Precision and Recall
\(\text{Precision} = \frac{TP}{TP + FP}\)
\(\text{Recall} = \frac{TP}{TP + FN}\)
The Tuning Lifecycle
How to Tune a Detection Rule
Example 1: Brute-Force Login Alert
Scenario: Your SIEM triggers an alert whenever a single account has 5 or more failed logins within 10 minutes. The SOC is drowning in alerts every Monday morning when employees return and mistype their passwords.
Example 2: Suspicious DNS Rule
Scenario: A detection rule flags DNS queries to newly registered domains (NRDs) as potential command-and-control (C2) traffic. However, the marketing team recently launched a campaign using a brand-new domain, generating 200+ false positives per day.
Example 3: Calculating Precision
Scenario: Over one week, a detection rule produces 120 alerts. After investigation, the SOC classifies them: 18 true positives, 102 false positives. A separate red team exercise revealed 3 attacks that were missed (false negatives).
Common Tuning Techniques
Common Mistakes
Detection Tuning Summary
| Concept | Description | Key Metric |
|---|---|---|
| False Positive | Alert on benign activity | Precision drops |
| False Negative | Missed real attack | Recall drops |
| Precision | \(\frac{TP}{TP+FP}\) | Alert quality |
| Recall | \(\frac{TP}{TP+FN}\) | Threat coverage |
| Tuning Goal | Balance both rates | Maximize both |
Question 1 of 5
A security analyst discovers that a detection rule flagged a legitimate software update as malware. This scenario is best described as a:
Question 2 of 5
If a detection rule has high recall but low precision, what is most likely happening?
Question 3 of 5
A SOC team completely disables a noisy detection rule instead of tuning it. What is the primary risk of this action?
Question 4 of 5
A rule generates 200 alerts in a week. After review: 30 are true positives and 170 are false positives. What is the rule's precision?
Question 5 of 5
Which tuning technique involves requiring events from multiple log sources to match before an alert fires?