Agent Foskett Academy • SOC Analyst Academy • Module 9 • Lesson 86 • Detection Engineering: Turning Findings into Protection

Lesson 86 — The Threshold Hid a Real Attack

The tuning worked.

Alert volume dropped dramatically.

Then a real attack was reviewed.

It never crossed the new threshold.

Agent Foskett looked at the rule again.

Every threshold that removes noise can also remove attack visibility.
Agent Foskett investigating a false negative caused by an overly high detection threshold
Quiet can be dangerous.

A lower alert count means little if malicious behaviour has fallen below the detection boundary.

✓ Reproduce
✓ Compare
✓ Measure
✓ Restore coverage

Case briefing

BEFORE TUNING THRESHOLD: > 10 events / 5 minutes RESULT: Too many alerts AFTER TUNING THRESHOLD: > 20 events / 5 minutes RESULT: Queue much quieter REAL ATTACK 18 events / 5 minutes ALERT: NONE THE TUNING WORKED. SO DID THE ATTACK.

Investigation objective

Understand how threshold tuning can create false negatives, reproduce the missed malicious behaviour and redesign the detection so operational noise is reduced without silently removing important attack coverage.

Investigator's rule

Every tuning decision should ask two questions: what noise disappears — and what attack behaviour disappears with it?

Stage 1 — reconstruct the tuning decision

BeforeAfter
Threshold > 10Threshold > 20
High daily volumeMuch lower daily volume
Known noisy workflows matchedMany noisy workflows disappeared
Known attack matchedNew attack at 18 events did not match

The dashboard looked better

The visible operational metric improved: fewer alerts. But the security metric — whether meaningful malicious behaviour remained detectable — was not tested broadly enough.

A threshold is a boundary

Changing the number moves the boundary between activity the rule can see and activity it ignores. That is a security decision, not merely a volume adjustment.

Stage 2 — reproduce the missed attack

01-reproduce-missed-behaviour.kql
123456789
DeviceProcessEvents
| where Timestamp > ago(30d)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| summarize EventCount=count()
  by DeviceId, DeviceName, AccountName,
     bin(Timestamp, 5m)
| where EventCount between (11 .. 20)
| order by EventCount desc

Search the blind band

If the threshold moved from greater than 10 to greater than 20, activity between those boundaries deserves deliberate review. That is the behaviour the tuning stopped surfacing.

Do not inspect only the missed incident

The known attack proves a blind spot exists. Historical telemetry can show whether other suspicious activity also fell into the newly ignored range.

Stage 3 — compare benign and malicious behaviour

ActivityEvents / 5 minContext
Support automation16Expected management workflow
Developer script19Known development activity
Finance workstation attack18Unexpected PowerShell chain
Deployment host27Expected high-frequency administration

The count alone cannot separate them

The malicious case sits inside the same numeric range as legitimate activity. Raising the threshold therefore removes both benign noise and real attack visibility.

This is where context matters

When benign and malicious counts overlap, detection quality may need to come from process lineage, device role, account context, command behaviour or other evidence — not a larger number.

Stage 4 — understand the false-negative cost

THRESHOLD > 10 BENIGN MATCHES: HIGH ATTACK A: MATCH ✓ ATTACK B: MATCH ✓ THRESHOLD > 20 BENIGN MATCHES: LOWER ATTACK A: MATCH ✓ ATTACK B: MISS ✗ TUNING BENEFIT: LESS NOISE TUNING COST: LOST ATTACK COVERAGE THE COST MUST BE MEASURED, NOT ASSUMED.

False negatives are harder to see

False positives arrive in the queue and complain loudly. False negatives are quiet. You may only discover them through another alert, a hunt, incident review or external evidence.

Silence is not proof of quality

A detection with almost no alerts may be exceptionally precise — or it may simply be unable to see the behaviour you care about.

Stage 5 — test candidate thresholds against known cases

CandidateBenign volumeAttack AAttack B
> 10HighMatchMatch
> 15MediumMatchMatch
> 20LowMatchMiss
> 10 + contextPotentially lowerMatchMatch

Use multiple malicious examples

One known attack may be unusually loud. Testing several historical cases helps expose whether tuning has overfit the rule to the easiest example.

Threshold plus context may outperform threshold alone

If legitimate and malicious activity overlap numerically, additional evidence can sometimes improve precision without moving the threshold beyond quieter attacks.

Stage 6 — add context instead of simply raising the number

02-add-behavioural-context.kql
12345678910
DeviceProcessEvents
| where Timestamp > ago(30d)
| where FileName in~ ("powershell.exe", "pwsh.exe")
| where InitiatingProcessFileName in~ (
    "msedge.exe", "chrome.exe", "firefox.exe"
)
| summarize EventCount=count()
  by DeviceId, DeviceName, AccountName,
     bin(Timestamp, 5m)
| where EventCount > 10

Context should come from the hypothesis

Do not add random conditions merely to shrink the result set. Each condition should represent evidence that helps distinguish the suspicious behaviour being detected.

Be careful with brittle context

Overly specific filenames, paths or strings may reduce noise while making the detection easy to evade. Preserve the behaviour wherever possible.

Stage 7 — backtest the revised candidate

CANDIDATE C THRESHOLD: > 10 ADDED CONTEXT: Browser-initiated PowerShell 30-DAY BACKTEST: Historical benign volume: REDUCED Known Attack A: MATCH ✓ Known Attack B: MATCH ✓ Previously missed attack: MATCH ✓ NEXT: Inspect remaining matches. Test more malicious examples. Document limitations.

Re-run the full test

Do not assume the new contextual condition fixes the problem because it catches the missed incident. Repeat the historical volume and coverage checks from Lessons 83 and 84.

Look for new blind spots

A contextual filter can create a different false-negative boundary. For example, browser-initiated PowerShell logic will not detect the same behaviour initiated through another process chain.

Stage 8 — document the trade-off

DecisionDocument
Threshold retained or changedEvidence supporting the number
Context addedWhy it represents the security hypothesis
Noise reducedMeasured before/after volume
Coverage preservedKnown malicious cases retested
Remaining blind spotsBehaviour the rule still cannot detect

Make the limitation visible

Analysts and future detection engineers need to know what the rule does not cover. Undocumented blind spots become dangerous assumptions.

Tuning needs a security rationale

“Reduced alerts by 80%” is incomplete. The decision should also state what happened to malicious coverage and which risks remain.

Stage 9 — write the engineering finding

FALSE-NEGATIVE FINDING The detection threshold was raised from >10 to >20 events to reduce alert volume. A confirmed malicious case generated 18 events in the same five-minute window. RESULT: The tuned detection did not alert. ROOT CAUSE: The threshold change treated event count as the primary separator between benign and malicious activity. Historical review showed legitimate and malicious activity overlapped between 11 and 20 events. DECISION: Restore lower-volume coverage and use additional behavioural context to improve precision.

The problem was not tuning itself

The problem was tuning against visible noise without sufficiently measuring the invisible coverage cost.

Detection engineering balances two failure modes

Too much noise can overwhelm analysts. Too little sensitivity can hide attacks. Good engineering makes that trade-off explicit and testable.

Stage 10 — make the final decision

BEFORE HIGH VOLUME GOOD COVERAGE AFTER AGGRESSIVE TUNING LOWER VOLUME REAL ATTACK MISSED REVISED APPROACH LOWER THRESHOLD + SECURITY CONTEXT + BACKTESTING + KNOWN ATTACK VALIDATION GOAL: REDUCE REDUNDANT WORK WITHOUT MOVING REAL ATTACKS OUTSIDE THE RULE.

A quiet queue is not the objective

The objective is useful detection coverage at an operationally sustainable workload.

The next engineering problem

Even when coverage is preserved, the SOC may discover that another rule already detects the same behaviour. Lesson 87 examines redundant detections and duplicate analyst work.

Lesson 86 key takeaways

  • Every threshold creates a detection boundary.
  • Raising a threshold can remove malicious activity as well as benign noise.
  • False negatives are often less visible than false positives.
  • Search the historical range removed by a tuning change.
  • Compare benign and malicious behaviour around the threshold boundary.
  • Do not assume event count alone can distinguish intent.
  • Test multiple known malicious examples, not just the loudest incident.
  • Use security-relevant context when benign and malicious volumes overlap.
  • Do not add arbitrary filters simply to reduce results.
  • Backtest again after every meaningful tuning change.
  • Document both the noise reduction and the coverage cost.
  • Make remaining blind spots explicit.
  • The goal is sustainable analyst workload without sacrificing important attack visibility.

Module 9 — Detection Engineering: Turning Findings into Protection

Lesson 86 exposed the false-negative cost of aggressive threshold tuning and restored lower-volume attack coverage using behavioural context. Lesson 87 will examine what happens when the detection works — but another rule is already detecting the same thing.

Next: Lesson 87 — The Detection Duplicated Another Rule

Continue your SOC Analyst training

Module 9 focuses on turning validated investigation findings into transparent, tested and operationally useful detections.

Can detection tuning cause false negatives?

Lesson 86 of the Agent Foskett SOC Analyst Academy teaches analysts how raising detection thresholds can reduce alert noise while also hiding genuine malicious activity, and how to measure that false-negative cost.

Balancing false positives and false negatives in detection engineering

Learn how to reproduce missed attacks, examine the historical blind band created by threshold changes, add security-relevant behavioural context and backtest revised detection logic before production.