Mapping Attacks to Detections
Aligning techniques to MITRE ATT&CK.
Mapping Attacks to Detections is a free Cyber Security Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Why Map to ATT&CK
MITRE ATT&CK is a curated knowledge base of adversary tactics, techniques, and procedures observed in the real world. It gives red and blue a shared vocabulary.
Mapping every test and every detection to an ATT&CK ID lets you answer one question precisely: which adversary behaviors can we actually see?
- Tactics = the adversary's goal (the 'why')
- Techniques = how they achieve it (the 'how')
- Procedures = the specific implementation (the 'what')
Anatomy of a Technique ID
Each technique has a stable identifier you will use everywhere in purple teaming.
T1059— Command and Scripting Interpreter (technique)T1059.001— PowerShell (sub-technique)TA0002— Execution (the tactic it belongs to)
A single technique can serve multiple tactics. For example, valid accounts (T1078) support Initial Access, Persistence, Privilege Escalation, and Defense Evasion simultaneously.
From Procedure to Data Source
To detect a technique you must know what data source reveals it. ATT&CK lists data sources and components for each technique.
For PowerShell execution (T1059.001), relevant telemetry includes:
- Script block logging (Event ID 4104)
- Module logging (Event ID 4103)
- Process creation with command line (Event ID 4688 / Sysmon 1)
If none of these are collected, the technique is a guaranteed blind spot regardless of how good your rules are.
Picking a Procedure to Emulate
A technique is abstract; you detect concrete procedures. Choose a realistic implementation an adversary actually uses.
For T1059.001, a common encoded-command procedure looks like:
powershell.exe -nop -w hidden -enc <base64-encoded-script>Defining Detection Logic
Once you know the artifact, you express detection logic. The encoded-command example above produces a process-creation event whose command line contains suspicious flags.
A pseudo-rule for it:
process == 'powershell.exe'
AND command_line CONTAINS '-enc'
AND command_line MATCHES '(?i)(-nop|-w hidden|-windowstyle hidden)'Writing Portable Rules With Sigma
Sigma is a generic, vendor-neutral detection format that compiles into Splunk, Elastic, Sentinel, and others. Mapping rules to ATT&CK keeps coverage trackable.
A Sigma snippet for suspicious encoded PowerShell:
detection:
selection:
Image|endswith: '\powershell.exe'
CommandLine|contains:
- '-enc'
- '-EncodedCommand'
condition: selection
tags:
- attack.execution
- attack.t1059.001The Coverage Matrix
For each technique in scope, record what telemetry exists and whether a detection fires. A coverage row captures the full picture:
- Technique: T1059.001 PowerShell
- Data source available: Yes (Sysmon 1, 4104)
- Detection exists: Yes (Sigma rule)
- Last validated: date of the purple test
- Result: Detected / Logged / Blind
This table, kept in a tool like VECTR, becomes your authoritative detection coverage record.
Avoiding Brittle Detections
A common trap is mapping a detection to a technique but building it on a fragile, easily evaded artifact. Detecting one specific tool name is brittle; detecting the behavior is robust.
- Brittle: alert on a single hard-coded malware filename
- Better: alert on the behavior, e.g. a process spawning from
winword.exeintocmd.exe
The Pyramid of Pain captures this: hashes and filenames are trivial for an attacker to change, while TTPs are costly. Aim detections high on the pyramid.
Chaining Techniques
Real intrusions are chains, not single events. A detection on the full chain is far stronger than any one link.
An emulated chain might be:
T1566.001Spearphishing Attachment (Initial Access)T1059.001PowerShell (Execution)T1547.001Registry Run Key (Persistence)T1003.001LSASS Memory dumping (Credential Access)
Mapping each step lets you see exactly where in the kill chain your visibility starts and stops.
Validating the Mapping
A mapping is only a claim until tested. During the purple session, red executes the procedure and blue confirms the mapped detection actually fires on the mapped data source.
- Execute the procedure in a controlled window
- Confirm the expected event ID appears in telemetry
- Confirm the rule generates an alert (not just a log)
- Record the validation date and outcome
Only after this loop do you mark a technique as genuinely covered.
Visualizing With the Navigator
The ATT&CK Navigator lets you render coverage as a colored heatmap over the matrix. Green for detected, yellow for logged-only, red for blind spots.
- Export results from your tracking tool as a Navigator layer
- Overlay multiple layers (tested vs. threat-intel priorities)
- Share the heatmap with leadership to justify investment
This visual makes an abstract concept like 'detection coverage' immediately understandable to non-technical stakeholders.
Quick Check
Test your understanding of mapping attacks to detections.
Recap
You can now align attacks to detections systematically:
- Use ATT&CK IDs (tactic, technique, sub-technique) as shared language
- Identify the data source that exposes each technique
- Choose a realistic procedure, then write behavior-based logic
- Express portable rules in Sigma tagged with the technique
- Aim high on the Pyramid of Pain to avoid brittle detections
- Validate every mapping live, then visualize coverage in the Navigator
Next you will plan and run an actual purple team exercise end to end.
Frequently asked questions
Is the “Mapping Attacks to Detections” lesson free?
Yes — the full text of “Mapping Attacks to Detections” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.
What will I learn in “Mapping Attacks to Detections”?
Aligning techniques to MITRE ATT&CK. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cyber Security Academy?
No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Mapping Attacks to Detections” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cyber Security Academy lesson?
Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why Purple Teaming
- Mapping Attacks to Detections
- Running a Purple Team Exercise
- Closing Detection Gaps and Metrics