Detection Engineering
Finding holes is the fun part — but most programs fail at the next question: would you even see the attack happen? This is how you build alerts that actually fire.
The detection loop
Six steps from an attacker technique to a trusted, tracked alert.
Pick a technique
Start from a real ATT&CK technique an attacker would use against you.
Find the log source
Identify the telemetry that actually reveals it. No log, no detection.
Write the rule
Express it as a Sigma rule or SIEM/EDR query.
Test it
Fire the technique (Atomic Red Team / Caldera) and confirm the rule triggers.
Tune false positives
A noisy rule gets ignored. Tune until the signal is trusted.
Document & track coverage
Record trigger, severity, response — then map it on the ATT&CK matrix and repeat on the gaps.
No log, no detection
You can only detect what you collect. The telemetry that earns its keep:
Authentication & identity
Reveals: Logons, MFA prompts, new devices — brute force, stuffing, impossible travel.
Endpoint / process (EDR, Sysmon)
Reveals: Process creation, command lines, injection — execution and evasion.
Cloud control plane (CloudTrail)
Reveals: API calls — new keys, policy changes, role assumption, data access.
Network & DNS
Reveals: Connections, beacons, DNS tunneling — C2 and exfiltration.
Web / proxy
Reveals: Requests and egress — SSRF to metadata, suspicious outbound URLs.
Real rules (Sigma)
Sigma is a vendor-neutral detection format that converts to most SIEMs. Three that catch moves from this very curriculum:
New AWS access key created
Catches: A foothold minting fresh credentials to persist — the IAM-privesc tail.
title: AWS IAM Access Key Created
logsource:
product: aws
service: cloudtrail
detection:
selection:
eventSource: iam.amazonaws.com
eventName: CreateAccessKey
condition: selection
level: medium
tags:
- attack.persistence
- attack.t1098.001AWS CloudTrail
Instance metadata access from a server
Catches: SSRF reaching 169.254.169.254 to steal role creds — the Capital One move.
title: Cloud Instance Metadata Access via Web Request
logsource:
category: proxy
detection:
selection:
c-uri|contains: '169.254.169.254'
condition: selection
level: high
tags:
- attack.credential_access
- attack.t1552.005Web / proxy logs
Security event log cleared
Catches: An attacker wiping their tracks — a high-fidelity evasion signal.
title: Windows Security Event Log Cleared
logsource:
product: windows
service: security
detection:
selection:
EventID: 1102
condition: selection
level: high
tags:
- attack.defense_evasion
- attack.t1070.001Windows Security log
What separates good detection
Writing the rule is the easy part. These make it actually work.
Validate before you trust
A detection that never fired in a test is a hope, not a control. Fire the technique and watch it trigger.
Tune for trust
An alert that cries wolf gets muted. Cut false positives until analysts act on it.
Map coverage to ATT&CK
Plot every detection on the matrix. The blank cells are where attackers walk in unseen.
Climb the Pyramid of Pain
Hashes and IPs are cheap to change; detecting TTPs (behavior) hurts the attacker most.
See it on a live breach
Detection isn’t abstract. See exactly which signals would have caught FortiBleed before it became 86,644 leaked logins.