Goal. By the end you can say what a detection is, name the stages one goes through, and explain how detection engineering differs from monitoring alerts, hunting and responding to incidents.
Why it matters#
Most detection problems are not clever-query problems. They are lifecycle problems. Nobody wrote down why the rule exists, nobody tested it, and nobody noticed when the log source behind it stopped sending data. So the rule either fires all day or never fires at all, and the SOC learns to ignore it. Seeing the whole lifecycle first gives you a frame for everything that follows in this roadmap.
What you will learn#
What a detection is#
A detection is logic that turns telemetry (logs, events, network records) into an alert about a specific behaviour. Written down properly it has:
- a purpose: the behaviour it looks for and why that matters here;
- the data it needs;
- the logic itself;
- known false positives: harmless activity that looks the same;
- a severity; and
- a response: what the analyst should do when it fires.
Take this one: alert when a Microsoft Office program starts a command shell, because that is how macro-based malware commonly runs its payload. The behaviour is Office launching a shell. The data is process-creation events that record the parent process. The logic is "parent is an Office program and the child is a command shell". The false positives are some legitimate add-ins and scripts. The response is to look at the document and the user's recent activity. A search you typed once into a SIEM is not yet a detection. A maintained, documented, tested one is.
Where detection engineering sits#
| Role | The question they ask | What they produce |
|---|---|---|
| Detection engineer | How do I catch this reliably, automatically? | A tested, documented, maintained detection |
| SOC analyst | Is this alert real, and what do I do? | A triaged alert, escalated or closed |
| Threat hunter | Is something here that nothing alerted on? | A finding, and a detection requirement |
| Incident responder | What happened, and how do we contain it? | A contained incident and a timeline |
| Threat intelligence analyst | Who targets us, and how? | Intelligence and detection requirements |
| Red or purple team | Can the defences see this? | Test results and gaps |
In a small team one person wears several of these hats. What matters is knowing which hat you are wearing.
The detection lifecycle#
A detection goes through these stages, and then back to the start:
- Intake. A requirement arrives: a report, an incident, a hunt result or a coverage gap.
- Prioritise. Decide what is worth building first, by relevance, impact and whether you have the data.
- Research and design. Understand how the behaviour works and find what the attacker cannot avoid doing.
- Data validation. Confirm the logs you need exist, cover enough systems and carry the fields you need.
- Build. Write the logic, and its metadata, as code.
- Test. Prove it fires on the malicious case and stays quiet on benign lookalikes.
- Tune. Reduce noise without making yourself blind.
- Deploy. Roll out gradually, in log-only mode first, not straight to a paging alert.
- Document. Tell the analyst what it means and what to do.
- Monitor health. Notice when it silently stops working.
- Review and retire. Keep what earns its place and remove what does not.
Testing and health monitoring are the stages teams skip most often. Stage 6 and stage 8 of this roadmap are about them.
Where requirements come from#
- Threat intelligence reports about attackers who target your sector.
- Threat hunts that found something no alert caught.
- Incidents and their reviews: "we missed this" is a requirement.
- Red and purple team exercises that went undetected.
- Gaps against MITRE ATT&CK, found by measuring your coverage.
- A new log source, which makes new detections possible.
- Compliance rules that demand monitoring.
- Mass-exploitation events, where speed matters.
Each requirement becomes a ticket in a backlog: the technique, why it matters here, the data needed and a priority.
What "good" looks like#
- Precision. Of the alerts that fire, how many are real?
- Coverage. Of the behaviours that matter, how many can you actually detect? Count what you can see and what you alert on separately.
- Time to detect. How long after the behaviour does someone know?
- Health. Is the rule still running, and is its data still arriving?
You cannot have perfect precision and perfect coverage. Where a human is paged, favour precision. Where the output only feeds a hunt or a risk score, accept more noise.
Kinds of detection (a preview)#
| Kind | Looks for | Strength | Weakness |
|---|---|---|---|
| Indicator | A known hash, IP address or domain | Simple and fast | Easy for the attacker to change |
| Behavioural | A pattern such as parent and child processes | Hard to avoid | Needs good data and tuning |
| Statistical | A deviation from a baseline | Finds the unknown | Noisy, and needs baselines |
| Correlation or risk-based | Several weak signals together | Cuts alert fatigue | More moving parts |
Stage 2 explains why behaviour beats indicators, and stage 4 shows how to write each kind.
Do this#
- Read a real rule and label its parts (about 45 minutes). Open the
rules/windows/process_creationfolder of the SigmaHQ repository, pick any rule, and mark its title and description, log source, detection logic, listed false positives, level and ATT&CK tags. If you can say what each part is for, you understand the anatomy of a detection. - Trace one rule's history (30 minutes). On the same rule, open its history on GitHub. Read the commit messages. What was added or excluded, and why? This is tuning, done in public.
- Write a five-line requirement (30 minutes). Pick one technique from the ATT&CK site and write: the technique, why it matters to a typical company, the data you would need, the likely false positives, and who would respond.
- Sketch the lifecycle from memory (20 minutes). Mark where a rule you have seen would break if each stage were skipped.
Resources#
Free first
- MITRE ATT&CK: getting started - MITRE's own introduction to the matrix and how defenders use it. ATT&CK is updated regularly, so copy technique IDs from the live site.
- SigmaHQ rules repository - thousands of community detection rules in a vendor-neutral format. Your reading library for this whole roadmap.
- Sigma rule basics - the Sigma project's explanation of how a rule file is structured.
- Alerting and Detection Strategy framework - Palantir's template for documenting why a detection exists and how to handle its alerts. You will use the idea in stage 5.
- Detection Engineering Weekly - a free newsletter that curates research and tooling. Skim two issues to hear how practitioners talk.
- The Pyramid of Pain - David Bianco's short article on why behaviours beat indicators. Read it now and use it in stage 2.
Paid or needs an account
- None needed for this stage.
Checkpoint#
You are ready to move on when you can:
Go deeper (optional)#
- Read the technique page on the ATT&CK site for the technique you chose, especially its detection notes.
- Read the references listed in the Sigma rule you picked, to see where the rule's author learned the behaviour.
- See the neighbouring jobs from the inside: Threat Hunting stage 1 and SOC & Incident Response stage 1.