07 Detection Engineering
Welcome to:
Module 07 — Detection Engineering
In the previous modules, you learned how to:
Monitor ↓Detect ↓Hunt ↓Respond ↓Investigate ↓Reconstructattacker activity. You now understand how adversaries may appear across:
Identity
Endpoint
Network
Cloud
Email
ApplicationsThe next challenge is:
How Do WeTurn That Knowledge
Into ReliableSecurity Detections?This is the role of:
Detection EngineeringDetection engineering is the structured practice of converting:
Threat Behavior ↓Observable Activity ↓Security Telemetry ↓Detection Logic ↓Alertinto repeatable defensive capability.
The objective is not simply to create:
More AlertsThe objective is to create:
Useful
Reliable
Actionable
Testable
Maintainabledetections.
Module Objectives
Section titled “Module Objectives”By the end of this module, you will understand how to:
-
explain detection engineering.
-
understand the detection engineering lifecycle.
-
identify detection requirements.
-
create detection use cases.
-
translate attacker behaviors into observables.
-
identify required telemetry.
-
design detection logic.
-
understand query-based detection.
-
understand rule-based detection.
-
understand threshold detections.
-
understand correlation detections.
-
understand sequence detections.
-
understand behavioral detections.
-
understand risk-based detection.
-
understand Sigma.
-
understand portable detection logic.
-
create Sigma-style detection rules.
-
map detections to MITRE ATT&CK.
-
understand detection coverage.
-
build ATT&CK coverage matrices.
-
identify detection gaps.
-
identify telemetry gaps.
-
test detections.
-
perform positive and negative tests.
-
understand false positives.
-
understand false negatives.
-
tune detection rules.
-
manage exclusions.
-
understand alert severity and confidence.
-
create investigation guidance.
-
measure detection quality.
-
version detections.
-
manage detection lifecycle.
-
convert incidents into new detections.
-
convert threat hunts into new detections.
-
use threat intelligence to improve detections.
-
understand detection-as-code concepts.
-
document detections professionally.
1 — What Is Detection Engineering?
Section titled “1 — What Is Detection Engineering?”Detection engineering is the disciplined process of designing, building, testing and maintaining security detections.
A detection engineer asks:
What ThreatDo We Care About?
↓
What BehaviorWould It Produce?
↓
Which TelemetryWould Capture It?
↓
What LogicCould Detect It?
↓
How Do WeValidate It?
↓
How Do WeMaintain It?2 — Detection Engineering vs SOC Monitoring
Section titled “2 — Detection Engineering vs SOC Monitoring”SOC monitoring focuses on:
Receiving
Triaging
Investigatingalerts.
Detection engineering focuses on:
Designing
Building
Testing
Improvingthe logic that generates those alerts.
3 — Detection Engineering vs Threat Hunting
Section titled “3 — Detection Engineering vs Threat Hunting”Threat hunting asks:
What ThreatMight ExistThat WeDid Not Detect?Detection engineering asks:
How Can WeReliably DetectThat BehaviorNext Time?This creates:
Threat Hunt ↓Behavior Identified ↓Detection Engineering ↓Automated Detection4 — Detection Engineering Lifecycle
Section titled “4 — Detection Engineering Lifecycle”Use:
Threat Need ↓Use Case ↓Telemetry ↓Detection Logic ↓Build ↓Test ↓Deploy ↓Monitor ↓Tune ↓Review ↓Retire5 — Start With the Threat
Section titled “5 — Start With the Threat”Do not begin with:
What QueryCan I Write?Begin with:
What ThreatDo We Needto Detect?Example:
Threat:
CredentialDumpingThen ask:
What BehaviorWould IndicateCredential Dumping?6 — Detection Use Case
Section titled “6 — Detection Use Case”A detection use case defines the defensive requirement.
Example:
DET-IAM-001
Detect PotentialPrivileged AccountCompromiseA professional use case may include:
Use Case ID
Threat Scenario
Business Risk
ATT&CK Mapping
Required Telemetry
Detection Logic
Severity
Confidence
Known Benign Activity
Investigation Steps
Test Method7 — Detection Requirement
Section titled “7 — Detection Requirement”A detection requirement should explain:
What MustBe Detectednot exactly:
Which SIEM Syntaxto UseExample:
Detect repeatedauthentication failuresagainst multiple accountsfrom the same sourcewithin a short period.This requirement can later be translated into different platforms.
8 — Threat to Observable
Section titled “8 — Threat to Observable”Detection engineering begins by translating attacker behavior into:
ObservableActivityExample:
Threat:
Password SprayObservable:
Same Source IP
Multiple Usernames
Authentication Failures
Short Time Window9 — Observable to Telemetry
Section titled “9 — Observable to Telemetry”Then ask:
Which Data SourceCan ShowThose Observables?For password spray:
Identity LogsFields might include:
Source IP
Username
Result
Timestamp
Application10 — Detection Dependency Chain
Section titled “10 — Detection Dependency Chain”A detection depends on:
Threat Behavior ↓Telemetry Source ↓Log Collection ↓Parsing ↓Fields ↓Detection LogicIf any layer fails:
DetectionMay Fail11 — Telemetry First
Section titled “11 — Telemetry First”Before building a rule, confirm:
Does RequiredTelemetry Exist?
Is It Collected?
Is It Parsed?
Is It Timely?
Is It Complete?12 — Detection Cannot Fix Missing Telemetry
Section titled “12 — Detection Cannot Fix Missing Telemetry”If the requirement is:
DetectPowerShell Executionbut process and PowerShell telemetry are not collected:
No QueryCan ReliablySolve the ProblemThis is:
Telemetry Gapnot simply a detection gap.
13 — Detection Logic
Section titled “13 — Detection Logic”Detection logic describes:
Which Events
Which Conditions
Which Relationships
Which Thresholds
Which Time Windowshould produce an alert.
14 — Simple Detection
Section titled “14 — Simple Detection”Example:
IF
event_type =admin_role_assignment
THEN
AlertThis is simple but may be noisy.
15 — Contextual Detection
Section titled “15 — Contextual Detection”Improved version:
IF
event_type =admin_role_assignment
AND
target_environment =production
AND
actor NOT INapproved_admin_automation
THEN
Alert16 — Query-Based Detection
Section titled “16 — Query-Based Detection”Many SIEM detections are built as queries.
Conceptually:
Search Events
↓
Apply Conditions
↓
Group
↓
Calculate
↓
AlertThe exact query language depends on the platform.
17 — Detection Fields
Section titled “17 — Detection Fields”Common identity fields:
User
Source IP
Destination
Device
Result
MFA Status
Role
TimestampEndpoint fields:
Process
Parent Process
Command Line
File
Hash
User
Host
Destination IP18 — Field Quality Matters
Section titled “18 — Field Quality Matters”Suppose your detection expects:
source_ipbut the parser incorrectly stores it as:
destination_ipYour rule may:
Fail
or
Generate Wrong AlertsDetection engineering therefore depends on good data engineering.
19 — Selection Logic
Section titled “19 — Selection Logic”A detection may identify:
Events of Interestusing one or more conditions.
Example:
process_name = powershell.exe20 — Filter Logic
Section titled “20 — Filter Logic”Filters remove:
Known ExpectedActivityExample:
ExcludeApproved DeploymentAutomation21 — Avoid Broad Filters
Section titled “21 — Avoid Broad Filters”Dangerous:
ExcludeAll AdministratorAccountsThis may hide real attacks.
Filters should be:
Specific
Documented
Reviewed22 — Threshold Detection
Section titled “22 — Threshold Detection”Example:
More Than20 Failed Logins
By Same User
Within5 MinutesUseful for:
Brute Force23 — Password Spray Threshold
Section titled “23 — Password Spray Threshold”Different logic may be required:
Same Source IP
↓
Failures Against20 Different Users
↓
Within10 MinutesThis shows why:
Groupingis critical.
24 — Correlation Detection
Section titled “24 — Correlation Detection”Correlation combines events.
Example:
Failed Logins +Successful Login +Admin Role Assignmentwithin:
15 Minutes25 — Sequence Detection
Section titled “25 — Sequence Detection”Sequence matters when order is important.
Example:
Phishing Delivery ↓Suspicious Login ↓Mailbox RuleThis may produce stronger evidence than individual events.
26 — Behavioral Detection
Section titled “26 — Behavioral Detection”Behavior-based detections focus on attacker actions.
Example:
Office Process ↓Scripting Interpreter ↓External Connectionrather than:
Known Malware Hash27 — Behavioral Detection Benefits
Section titled “27 — Behavioral Detection Benefits”Attackers can change:
Hash
Domain
File Name
IPbut may still need to perform:
Execution
Persistence
Credential Access
Lateral Movement
Collection28 — Risk-Based Detection
Section titled “28 — Risk-Based Detection”Risk-based models combine signals.
Example:
New Country+20
Repeated MFA Denial+30
New Admin Role+50Total:
100may trigger:
High-RiskIdentity Alert29 — Severity
Section titled “29 — Severity”Severity asks:
How SignificantCould theActivity Be?Example:
Credential Dumpingon Domain Controllermay have high severity.
30 — Confidence
Section titled “30 — Confidence”Confidence asks:
How StronglyDoes the DetectionSuggest MaliciousActivity?These should remain separate.
31 — Example
Section titled “31 — Example”Detection:
Rare PowerShellCommandmay have:
Severity:High
Confidence:Lowdepending on environment.
32 — MITRE ATT&CK Mapping
Section titled “32 — MITRE ATT&CK Mapping”Map detections to relevant ATT&CK techniques.
Example:
Detection:Suspicious PowerShell
↓
ATT&CK:Execution
↓
Command andScripting Interpreter33 — Why Map Detections to ATT&CK?
Section titled “33 — Why Map Detections to ATT&CK?”ATT&CK mapping helps with:
Coverage Analysis
Threat Modeling
Purple Team Testing
Detection Prioritization
Reporting34 — Avoid ATT&CK Over-Mapping
Section titled “34 — Avoid ATT&CK Over-Mapping”Do not map a detection to every technique that sounds related.
Ask:
What BehaviorCan This RuleActually Observe?35 — Detection Coverage
Section titled “35 — Detection Coverage”Detection coverage asks:
Which RelevantAttacker BehaviorsCan We Detect?36 — Coverage Matrix
Section titled “36 — Coverage Matrix”Create:
| Technique | Telemetry | Detection | Tested | Coverage |
|---|---|---|---|---|
| PowerShell | Endpoint | DET-END-001 | Yes | Covered |
| Credential Dumping | Endpoint | DET-END-002 | Yes | Covered |
| Scheduled Task | Endpoint | None | No | Gap |
| New Cloud Access Key | Cloud | DET-CLD-001 | Partial | Partial |
37 — Coverage Does Not Equal Effectiveness
Section titled “37 — Coverage Does Not Equal Effectiveness”Remember:
Detection Exists ≠Detection WorksA rule may be:
Disabled
Broken
Too Noisy
Missing Data
Poorly Tuned38 — Coverage Status
Section titled “38 — Coverage Status”Use statuses such as:
Covered
Partially Covered
Detection Gap
Telemetry Gap
Not Applicable
Needs Validation39 — Detection Gap
Section titled “39 — Detection Gap”A detection gap exists when:
Threat Behavior ↓Telemetry Exists ↓No Detection Logic40 — Telemetry Gap
Section titled “40 — Telemetry Gap”A telemetry gap exists when:
Threat Behavior ↓Required TelemetryUnavailable41 — Detection Validation
Section titled “41 — Detection Validation”Validation answers:
Does theDetection ActuallyWork?42 — End-to-End Validation
Section titled “42 — End-to-End Validation”Simulated Behavior ↓Telemetry Generated ↓Collected ↓Parsed ↓Rule Matches ↓Alert Generated ↓Analyst Receives It43 — Positive Test
Section titled “43 — Positive Test”A positive test asks:
Does ExpectedThreat-Like BehaviorGenerate an Alert?44 — Negative Test
Section titled “44 — Negative Test”A negative test asks:
Does SimilarBenign ActivityAvoid UnnecessaryAlerting?Both are important.
45 — Test Case
Section titled “45 — Test Case”Create:
Detection_Test_Case.csvwith:
| Test ID | Detection | Behavior | Expected Telemetry | Expected Result | Actual Result |
|---|
46 — Example Positive Test
Section titled “46 — Example Positive Test”Detection:
New PrivilegedCloud RoleTest:
Create ApprovedTest Role AssignmentExpected:
Cloud Audit Event ↓Detection Match ↓Alert47 — Example Negative Test
Section titled “47 — Example Negative Test”Same detection.
Expected benign scenario:
Approved AutomationCreates Expected RoleThe detection should behave according to the designed exception logic.
48 — Test Safely
Section titled “48 — Test Safely”Detection testing must occur in:
Authorized
Controlled
Approvedenvironments.
Do not perform unsafe attack activity against systems without authorization.
49 — Detection Test Failure
Section titled “49 — Detection Test Failure”Possible causes:
No Telemetry
Parsing Error
Wrong Field
Incorrect Query
Threshold Problem
Rule Disabled
Alert Routing Failure50 — False Positive
Section titled “50 — False Positive”A false positive occurs when:
DetectionIncorrectly IdentifiesBenign Activityas Suspicious51 — Benign True Positive
Section titled “51 — Benign True Positive”The rule correctly identifies the targeted behavior, but the behavior is:
AuthorizedExample:
ApprovedPenetration Test52 — False Negative
Section titled “52 — False Negative”A false negative occurs when:
Malicious ActivityOccurs
but
DetectionDoes Not Trigger53 — Why False Negatives Matter
Section titled “53 — Why False Negatives Matter”False negatives may remain:
Invisibleunless discovered through:
Incident Response
Threat Hunting
Forensics
Purple Team Testing54 — Causes of False Negatives
Section titled “54 — Causes of False Negatives”Examples:
Missing Telemetry
Threshold Too High
Rule Logic Wrong
Filter Too Broad
Attack Variation
Parsing Failure55 — Detection Tuning
Section titled “55 — Detection Tuning”Tuning improves:
SignaltoNoisePossible tuning actions:
Adjust Threshold
Add Context
Improve Conditions
Use Asset Criticality
Use Identity Context
Narrow Exclusion
Add Sequence56 — Bad Tuning
Section titled “56 — Bad Tuning”Bad approach:
Too Many Alerts ↓Exclude EverythingThis creates blind spots.
57 — Good Tuning
Section titled “57 — Good Tuning”Example:
Instead of excluding all PowerShell:
Focus on:
Encoded Commands
Unusual Parents
Network Downloads
High-Risk Hosts58 — Detection Exclusion Register
Section titled “58 — Detection Exclusion Register”Create:
Detection_Exclusions.csvwith:
| Detection | Exclusion | Reason | Owner | Expiration | Review |
|---|
59 — Exclusions Need Governance
Section titled “59 — Exclusions Need Governance”Every exclusion should answer:
Why Does It Exist?
Who Approved It?
When ShouldIt Be Reviewed?
Could ItHide an Attack?60 — Detection Quality
Section titled “60 — Detection Quality”A good detection should be:
Relevant
Accurate
Actionable
Explainable
Testable
Maintainable61 — Actionable Detection
Section titled “61 — Actionable Detection”An alert should tell the analyst:
What Happened?
Who?
Where?
When?
Why Alerted?
What ShouldBe Checked Next?62 — Alert Context
Section titled “62 — Alert Context”Useful alert fields:
User
Host
IP
Process
Resource
Timestamp
ATT&CK Technique
Detection Reason
Severity
Confidence63 — Investigation Guidance
Section titled “63 — Investigation Guidance”Each detection should ideally contain:
InvestigationStepsExample:
Detection:
Privileged MFAFatigueInvestigation:
Review MFA Events
Check Source IP
Confirm User Activity
Review Authentication
Review Privilege Changes
Review Subsequent Actions64 — Detection Runbook
Section titled “64 — Detection Runbook”A detection can connect to a runbook:
Alert ↓Runbook ↓Investigation65 — Detection Documentation
Section titled “65 — Detection Documentation”Create:
Detection_Use_Case.mdwith:
# Detection ID
# Detection Name
# Purpose
# Threat Scenario
# ATT&CK Mapping
# Required Telemetry
# Detection Logic
# Severity
# Confidence
# Known Benign Activity
# Exclusions
# Investigation Steps
# Validation Test
# Owner
# Version
# Status66 — Detection Naming
Section titled “66 — Detection Naming”Good:
Privileged AccountAdded toAdministrative GroupBetter than:
Rule 17Names should explain:
What BehaviorIs Being Detected67 — Detection IDs
Section titled “67 — Detection IDs”Use consistent IDs.
Example:
DET-IAM-001
DET-END-001
DET-NET-001
DET-CLD-001
DET-EMAIL-00168 — Detection Domains
Section titled “68 — Detection Domains”Possible taxonomy:
IAMIdentity
ENDEndpoint
NETNetwork
CLDCloud
EMAILEmail
APPApplication69 — Detection Versioning
Section titled “69 — Detection Versioning”Track:
Detection ID
Version
Change
Reason
Date
Reviewer70 — Detection Change Example
Section titled “70 — Detection Change Example”Version 1:
20 Failuresin 5 MinutesVersion 2:
10 Failuresin 5 Minutesfor Privileged AccountsDocument why.
71 — Detection Lifecycle Status
Section titled “71 — Detection Lifecycle Status”Possible:
Draft
Testing
Production
Tuning
Deprecated
Retired72 — Detection Review
Section titled “72 — Detection Review”Review detections periodically for:
Alert Volume
False Positives
False Negatives
Last Triggered
Telemetry Health
ATT&CK Mapping
Threat Relevance73 — Detection Debt
Section titled “73 — Detection Debt”A SOC may accumulate:
Unused Rules
Broken Rules
Duplicate Rules
Unowned Rules
High-Noise RulesThis is:
Detection Debt74 — Duplicate Detection
Section titled “74 — Duplicate Detection”Two teams may create:
Suspicious PowerShell
and
Malicious PowerShellwith nearly identical logic.
Review for:
Duplicate
Overlap
Different Scope75 — Detection Rationalization
Section titled “75 — Detection Rationalization”Workflow:
Existing Rules ↓Compare Objective ↓Compare Logic ↓Compare Telemetry ↓Compare Alert Outcome ↓ConsolidateWhere Appropriate76 — Detection-as-Code
Section titled “76 — Detection-as-Code”Detection-as-code treats detection logic like software.
Principles may include:
Version Control
Peer Review
Testing
Automation
Change History77 — Benefits
Section titled “77 — Benefits”Detection-as-code can improve:
Consistency
Traceability
Review
Testing
Deployment78 — Detection Repository
Section titled “78 — Detection Repository”A simple repository might look like:
detections/│├── identity/├── endpoint/├── network/├── cloud/├── email/└── tests/79 — Rule Metadata
Section titled “79 — Rule Metadata”Each detection should include metadata such as:
Title
ID
Description
Author
Date
Status
ATT&CK
Data Source80 — What Is Sigma?
Section titled “80 — What Is Sigma?”Sigma is a generic, structured format for describing log-based detection rules.
It aims to make detection logic:
Portable
Readable
Shareableacross different security platforms.
81 — Sigma Concept
Section titled “81 — Sigma Concept”Instead of writing a detection only for one SIEM:
Threat Behavior ↓Sigma Rule ↓Platform-SpecificQuery82 — Basic Sigma Structure
Section titled “82 — Basic Sigma Structure”Conceptually:
title: Suspicious PowerShell Executionid: example-idstatus: experimental
logsource: category: process_creation product: windows
detection: selection: Image|endswith: - '\powershell.exe'
condition: selectionThis is intentionally simple.
83 — Sigma Detection Section
Section titled “83 — Sigma Detection Section”The:
detectionsection usually contains:
Selections
Filters
Condition84 — Selection
Section titled “84 — Selection”Example:
selection: Image|endswith: - '\powershell.exe'This identifies relevant events.
85 — Additional Behavior
Section titled “85 — Additional Behavior”Improve:
selection: Image|endswith: - '\powershell.exe' CommandLine|contains: - '-EncodedCommand'Now the detection is more behavior-specific.
86 — Parent Process Logic
Section titled “86 — Parent Process Logic”You could also consider:
ParentImage|endswith: - '\winword.exe' - '\excel.exe'when detecting suspicious Office-to-PowerShell chains.
87 — Filters
Section titled “87 — Filters”Example conceptual filter:
filter_approved: User: - 'approved_automation_account'Then:
condition: selection and not filter_approved88 — Sigma Is Not Magic
Section titled “88 — Sigma Is Not Magic”A Sigma rule still depends on:
Correct Logs
Correct Fields
Platform Mapping
Testing
Tuning89 — Portable Does Not Mean Identical
Section titled “89 — Portable Does Not Mean Identical”Different SIEM platforms may represent:
Process
Command Line
User
Event Typedifferently.
Conversion requires validation.
90 — Sigma Rule Quality
Section titled “90 — Sigma Rule Quality”A good Sigma-style rule should include:
Clear Title
Description
Log Source
Detection Logic
False Positives
ATT&CK Tags
Status91 — Example Detection: Suspicious PowerShell
Section titled “91 — Example Detection: Suspicious PowerShell”Threat scenario:
Attacker UsesPowerShellto ExecuteEncoded CommandTelemetry:
Process CreationObservable:
powershell.exe
EncodedCommand92 — Sigma-Style Example
Section titled “92 — Sigma-Style Example”title: PowerShell With Encoded Commandstatus: experimental
logsource: category: process_creation product: windows
detection: selection: Image|endswith: - '\powershell.exe' CommandLine|contains: - '-EncodedCommand' - '-enc'
condition: selection
falsepositives: - Administrative scripts - Approved automation
level: medium93 — Detection Improvement
Section titled “93 — Detection Improvement”Add context such as:
Unusual Parent
Network Connection
Privileged User
Critical Assetto improve prioritization.
94 — Detection: Password Spray
Section titled “94 — Detection: Password Spray”Requirement:
Detect repeatedauthentication failuresagainst multiple accountsfrom one source.Logic:
Group by:Source IP
Count:Distinct Users
Condition:High User Count
Window:Short Period95 — Detection: Brute Force
Section titled “95 — Detection: Brute Force”Logic differs:
Group by:User
Count:Failures
Within:Short Period96 — Detection: MFA Fatigue
Section titled “96 — Detection: MFA Fatigue”Sequence:
Multiple MFADenials
↓
MFA ApprovalPotential context:
New IP
New Device
Privileged User97 — Detection: New Administrator
Section titled “97 — Detection: New Administrator”Telemetry:
Identity
Directory
Cloud IAMAlert when:
Privileged RoleAssignedInvestigate:
Actor
Target
Approval
Source
Subsequent Activity98 — Detection: Credential Dumping
Section titled “98 — Detection: Credential Dumping”Potential observable:
Unexpected Process
↓
AccessesCredential ProcessContext may include:
Process Path
Signer
User
Host
Command99 — Detection: Scheduled Task Persistence
Section titled “99 — Detection: Scheduled Task Persistence”Detect:
New Scheduled Taskand prioritize when:
Suspicious Command
Rare User
Critical Host
Unusual Path100 — Detection: Service Creation
Section titled “100 — Detection: Service Creation”Monitor:
New Service
Binary Path
Creator
Target Host101 — Detection: C2 Beaconing
Section titled “101 — Detection: C2 Beaconing”Potential analytics:
Same Host
Same Destination
Regular Intervals
Repeated Connections102 — Detection: DNS Tunneling
Section titled “102 — Detection: DNS Tunneling”Potential features:
Long Queries
High Entropy
High Frequency
Large Subdomains
Rare Domain103 — Detection: Data Exfiltration
Section titled “103 — Detection: Data Exfiltration”Consider:
Data Volume
Destination
User
Time
Asset
Historical Baseline104 — Detection: Cloud Logging Disabled
Section titled “104 — Detection: Cloud Logging Disabled”High-value rule:
Audit LoggingDisabledorModifiedInvestigate:
Actor
Resource
Source IP
Approval
Related IAM Changes105 — Detection: Public Cloud Storage
Section titled “105 — Detection: Public Cloud Storage”Detect:
Storage PolicyChanged ↓Public AccessEnabled106 — Detection: Cloud Access Key Creation
Section titled “106 — Detection: Cloud Access Key Creation”Prioritize when:
Privileged Identity
Unexpected Source
New Key
Production Account107 — Detection: Inbox Forwarding
Section titled “107 — Detection: Inbox Forwarding”Monitor:
New ExternalMailbox Forwardingespecially after:
Suspicious Login108 — Detection Correlation Across Domains
Section titled “108 — Detection Correlation Across Domains”A powerful detection might combine:
IdentitySuspicious Login
+
EndpointPowerShell
+
NetworkRare DomainThis may produce higher confidence than any one signal.
109 — Multi-Stage Detection
Section titled “109 — Multi-Stage Detection”You may identify:
Initial Access ↓Execution ↓Persistenceacross several alerts.
This is sometimes called:
Attack ChainCorrelation110 — Alert Prioritization
Section titled “110 — Alert Prioritization”Prioritize using:
Detection Severity
Confidence
Asset Criticality
User Privilege
Threat Intelligence
Related Alerts111 — Entity Risk
Section titled “111 — Entity Risk”An entity may accumulate risk.
Example:
User A
Suspicious Login+20
MFA Denial+20
Privilege Change+50Total:
90This can improve prioritization.
112 — Detection Analytics vs Static Rules
Section titled “112 — Detection Analytics vs Static Rules”Static rule:
Hash =Known MalwareAnalytic detection:
Rare Process +Unusual Parent +External ConnectionBoth have value.
113 — Threat Intelligence-Driven Detection
Section titled “113 — Threat Intelligence-Driven Detection”Threat intelligence might identify:
Domain
Hash
Technique
Malware Family
CampaignTranslate this into:
IOC Rules
Behavior Rules
Hunts
Coverage Review114 — Avoid Threat Feed Overload
Section titled “114 — Avoid Threat Feed Overload”Do not create:
Millionsof IOC Ruleswithout considering:
Freshness
Confidence
Relevance
Performance115 — Incident-Driven Detection
Section titled “115 — Incident-Driven Detection”After an incident:
Build Timeline
Identify Behaviors
Identify Missed Signals
Create Detection116 — Example Incident Improvement
Section titled “116 — Example Incident Improvement”Incident reveals:
Mailbox RuleCreatedAfter Suspicious LoginNew detection:
Suspicious Login ↓Mailbox RuleWithin 30 Minutes117 — Forensics-to-Detection
Section titled “117 — Forensics-to-Detection”Forensics finds:
Scheduled Task
PowerShell
Rare DomainUse these behaviors to build:
Detection Logic118 — Hunt-to-Detection
Section titled “118 — Hunt-to-Detection”Threat hunt identifies:
Low-and-SlowPassword SprayExisting rule missed it.
Build detection using:
Distinct Usersby Source IP119 — Purple Team Validation
Section titled “119 — Purple Team Validation”Purple Team can safely simulate relevant techniques.
Workflow:
Technique ↓Simulation ↓Telemetry ↓Detection ↓SOC Investigation ↓Gap Analysis120 — Detection Metrics
Section titled “120 — Detection Metrics”Possible metrics:
Alert Volume
True Positive Rate
False Positive Rate
Detection Coverage
Time to Alert
Rules Tested
Rules Failing
Detection Gaps121 — Metric Caution
Section titled “121 — Metric Caution”A detection with:
ZeroFalse Positivesmay simply:
Never TriggerMetrics require context.
122 — Precision
Section titled “122 — Precision”Conceptually:
Of AlertsGenerated
How ManyWere Relevant?123 — Recall
Section titled “123 — Recall”Conceptually:
Of RelevantThreat Activity
How MuchDid We Detect?Recall is harder to measure because:
Unknown ThreatsMay NeverBe Observed124 — Detection Latency
Section titled “124 — Detection Latency”Measure:
Activity Time ↓Alert TimeA detection arriving hours later may not support timely response.
125 — Telemetry Latency
Section titled “125 — Telemetry Latency”Sometimes the rule is fast but:
Logs ArriveLateThis is a telemetry pipeline issue.
126 — Detection Health
Section titled “126 — Detection Health”Monitor:
Rule Enabled?
Rule Executing?
Data Source Healthy?
Alert Routing Working?
Last Triggered?127 — Detection Health Dashboard
Section titled “127 — Detection Health Dashboard”Create:
Detection_Health_Dashboard.mdwith:
Production Rules
Rules Tested
Rules Failing
High-Noise Rules
Data Source Failures
Unowned Rules
Review Overdue128 — Detection Review Questions
Section titled “128 — Detection Review Questions”For every rule ask:
Does ThreatStill Matter?
Does TelemetryStill Exist?
Does LogicStill Work?
Is It Noisy?
Does SOCKnow Howto Investigate It?129 — Detection Retirement
Section titled “129 — Detection Retirement”Retire when:
Technology Removed
Threat No Longer Relevant
Rule Replaced
Telemetry RemovedDocument the reason.
130 — Detection Governance
Section titled “130 — Detection Governance”A mature program defines:
Naming
IDs
Owners
Review
Testing
Change Approval
Versioning
Retirement131 — Detection Change Review
Section titled “131 — Detection Change Review”Before changing logic, evaluate:
Why?
Expected Benefit?
False Positive Impact?
False Negative Risk?
Testing Required?132 — Peer Review
Section titled “132 — Peer Review”Detection rules should ideally receive:
Technical Review
Threat Review
Data Review
Testing Reviewbefore production deployment.
133 — Detection Testing Record
Section titled “133 — Detection Testing Record”Create:
Detection_Test_Register.csvwith:
| Detection | Version | Positive Test | Negative Test | Result | Reviewer |
|---|
134 — Detection Gap Register
Section titled “134 — Detection Gap Register”Create:
Detection_Gap_Register.csvwith:
| Gap ID | Threat Behavior | ATT&CK | Telemetry | Detection | Gap Type | Priority |
|---|
135 — Detection Inventory
Section titled “135 — Detection Inventory”Create:
Detection_Inventory.csvwith:
| Detection ID | Name | Domain | ATT&CK | Telemetry | Owner | Status | Version |
|---|
136 — ATT&CK Coverage Register
Section titled “136 — ATT&CK Coverage Register”Create:
ATTACK_Detection_Coverage.csvwith:
| Tactic | Technique | Relevant? | Telemetry | Detection | Tested | Coverage |
|---|
137 — Detection Engineering Backlog
Section titled “137 — Detection Engineering Backlog”Maintain:
Threat
Requested Detection
Priority
Reason
Telemetry Readiness
Owner
Status138 — Prioritize Detection Work
Section titled “138 — Prioritize Detection Work”Use:
Threat Relevance
Business Impact
Asset Criticality
Current Coverage
Incident History
Threat Intelligencenot simply:
ATT&CK Technique Count139 — High-Value Areas
Section titled “139 — High-Value Areas”Common high-value detection areas include:
Privileged Identity
Credential Access
Persistence
Lateral Movement
Cloud IAM
Security Disablement
Data Exfiltration140 — Detection Engineering and AI
Section titled “140 — Detection Engineering and AI”AI can assist with:
Query Drafting
Sigma Drafting
Rule Documentation
ATT&CK Mapping
Test Cases
False Positive Analysis
Detection SummariesBut:
AI-Generated Rule ≠Production-ReadyDetection141 — Validate AI Queries
Section titled “141 — Validate AI Queries”AI may:
Use Wrong Field
Invent Event ID
Use Invalid Syntax
Misunderstand PlatformAlways validate against:
Actual Schema
Real Telemetry
Test Dataset142 — Validate AI ATT&CK Mapping
Section titled “142 — Validate AI ATT&CK Mapping”AI may over-map a rule.
Check:
What BehaviorDoes the RuleActually Detect?143 — AI and False Positives
Section titled “143 — AI and False Positives”AI can help brainstorm:
PossibleBenign CausesBut these must be validated against the actual environment.
144 — AI and Detection Documentation
Section titled “144 — AI and Detection Documentation”AI is especially useful for drafting:
Description
Investigation Guidance
Test Plan
Change Summaryfrom validated technical information.
145 — Professional Detection Engineering Principle
Section titled “145 — Professional Detection Engineering Principle”The best detection is not the one with:
Most Complex QueryIt is the one that:
Detects Relevant Threat
Uses Reliable Data
Produces Useful Alert
Can Be Tested
Can Be Investigated
Can Be MaintainedPractical Exercise 1 — Create a Detection Use Case
Section titled “Practical Exercise 1 — Create a Detection Use Case”Build:
DET-IAM-001Potential Password SprayDocument:
Threat
Observable Behavior
Telemetry
Fields
Logic
Time Window
Severity
Confidence
False Positives
Investigation StepsPractical Exercise 2 — Build a Brute-Force Detection
Section titled “Practical Exercise 2 — Build a Brute-Force Detection”Design a detection using:
User
Failed Login
Count
Time WindowThen explain why the same logic may not detect password spraying.
Practical Exercise 3 — Build a Sigma Rule
Section titled “Practical Exercise 3 — Build a Sigma Rule”Create a Sigma-style rule for:
PowerShellwithEncoded CommandInclude:
Title
Log Source
Selection
Condition
False Positives
ATT&CK
SeverityPractical Exercise 4 — Improve the Sigma Rule
Section titled “Practical Exercise 4 — Improve the Sigma Rule”Add:
Parent Process
Critical Asset
Network Activityas contextual enrichment.
Practical Exercise 5 — Build an Identity Correlation
Section titled “Practical Exercise 5 — Build an Identity Correlation”Detect:
Multiple MFA Denials ↓Successful MFA ↓New Admin Rolewithin:
30 MinutesPractical Exercise 6 — Build a Cloud Detection
Section titled “Practical Exercise 6 — Build a Cloud Detection”Create:
DET-CLD-001Cloud Logging DisabledDocument:
Telemetry
Event
Fields
Severity
ATT&CK
Investigation StepsPractical Exercise 7 — Build a Detection Test
Section titled “Practical Exercise 7 — Build a Detection Test”For your cloud rule define:
Positive Test
Negative Test
Expected Telemetry
Expected Alert
Pass CriteriaPractical Exercise 8 — Detection Gap Analysis
Section titled “Practical Exercise 8 — Detection Gap Analysis”Create coverage for:
Credential Dumping
Scheduled Task
Remote Services
Cloud Role Assignment
Data Exfiltrationclassifying:
Covered
Partial
Detection Gap
Telemetry GapPractical Exercise 9 — Detection Tuning
Section titled “Practical Exercise 9 — Detection Tuning”Given:
500 DailyPowerShell Alertsdesign a tuning plan using:
Parent Process
Command Line
User
Asset Criticality
Known AutomationDo not simply disable the rule.
Practical Exercise 10 — Build Detection Inventory
Section titled “Practical Exercise 10 — Build Detection Inventory”Create at least:
15 Detectionsacross:
Identity
Endpoint
Network
Cloud
Emailwith IDs, owners, ATT&CK mapping and lifecycle status.
Knowledge Check
Section titled “Knowledge Check”-
What is detection engineering?
-
How is detection engineering different from SOC monitoring?
-
How is detection engineering different from threat hunting?
-
What is the detection engineering lifecycle?
-
Why should detection design begin with a threat?
-
What is a detection use case?
-
What is a detection requirement?
-
What is an observable?
-
Why must telemetry be validated before building a detection?
-
What is a telemetry gap?
-
What is a detection gap?
-
What is threshold detection?
-
Why does event grouping matter?
-
How does password-spray detection differ from brute-force detection?
-
What is correlation detection?
-
What is sequence detection?
-
What is behavior-based detection?
-
What is risk-based detection?
-
What is detection severity?
-
What is detection confidence?
-
Why should severity and confidence remain separate?
-
Why map detections to MITRE ATT&CK?
-
Why should ATT&CK over-mapping be avoided?
-
What is detection coverage?
-
Why does coverage not prove effectiveness?
-
What is detection validation?
-
What is a positive test?
-
What is a negative test?
-
Why should both be performed?
-
What is a false positive?
-
What is a benign true positive?
-
What is a false negative?
-
What can cause false negatives?
-
What is detection tuning?
-
Why can broad exclusions be dangerous?
-
Why should exclusions be governed?
-
What makes an alert actionable?
-
What should investigation guidance contain?
-
What is detection debt?
-
What is detection rationalization?
-
What is detection-as-code?
-
Why is version control useful for detections?
-
What is Sigma?
-
Why is Sigma useful?
-
Does Sigma eliminate the need for testing?
-
What information should a Sigma rule contain?
-
What is detection latency?
-
What is telemetry latency?
-
What is detection health?
-
How can incidents improve detections?
-
How can threat hunts improve detections?
-
How can forensic findings improve detections?
-
How can Purple Team exercises validate detections?
-
How can AI support detection engineering?
-
Why must AI-generated detection rules be validated?
Key Takeaways
Section titled “Key Takeaways”Detection engineering follows:
Threat ↓Behavior ↓Observable ↓Telemetry ↓Detection Logic ↓Alert ↓InvestigationThe engineering lifecycle is:
Design ↓Build ↓Test ↓Deploy ↓Monitor ↓Tune ↓ReviewRemember:
Rule Exists ≠Rule WorksTelemetry Exists ≠Detection ExistsDetection Exists ≠Coverage ProvenCoverage Exists ≠Detection EffectiveSigma Rule ≠Production-Ready Ruleand:
AI-Generated Query ≠Validated DetectionA mature detection engineering program creates the feedback loop:
Threat Intelligence ↓Threat Hunting ↓Detection ↓Incident ↓Forensics ↓Detection ImprovementCareer Connection
Section titled “Career Connection”Detection engineering skills are valuable for:
Detection Engineers
SOC Analysts
Senior SOC Analysts
Threat Hunters
Blue Team Analysts
SIEM Engineers
Incident Responders
Security EngineersDuring interviews, you should be able to explain:
How You Identifya Detection Requirement
How You SelectTelemetry
How You WriteDetection Logic
How You UseSigma
How You Mapto ATT&CK
How You Testa Rule
How You TuneFalse Positives
How You IdentifyDetection Gaps
How You Managethe Detection LifecycleThe key professional skill is not simply:
WritingSIEM QueriesIt is building a defensible chain:
Threat ↓Telemetry ↓Detection ↓Testing ↓Investigation ↓Continuous ImprovementWhat’s Next?
Section titled “What’s Next?”➡️ Next: 08 — Purple Team Operations
You now know how to design, build and validate detections.
But the strongest question is:
Can OurDetections IdentifyRealistic AttackerBehavior?In the next module, you will connect offensive and defensive teams through:
Purple TeamOperationsYou will learn how to:
Select Attack Techniques
Design Safe Simulations
Map ATT&CK Techniques
Define Expected Telemetry
Validate Logging
Validate Detection
Test SOC Investigation
Measure Detection Gaps
Improve Detection Logic
Retest ControlsThe workflow becomes:
Attack Technique ↓Controlled Simulation ↓Telemetry ↓Detection ↓SOC Investigation ↓Gap Analysis ↓Detection Improvement ↓RetestYou will move from:
We Builta Detectionto:
We Testedthe Detection
We KnowWhat Works
We KnowWhat Fails
and
We KnowHow to Improve It➡️ Next: 08 — Purple Team Operations