Stage 2 of 10 · about 8–12 hours · beginner · checked 2026-11-22

Know the threat

Goal. By the end you can break an attack into a chain of behaviours, name each behaviour with MITRE ATT&CK, and decide which part of a behaviour a detection should key on.

Why it matters#

A detection is only as good as your understanding of the behaviour behind it. If all you know is that "this malware talks to that IP address", your rule dies the day the attacker changes the address. If you understand what the attacker has to do, and what they cannot avoid doing, you can write a rule that survives a change of tools. This stage gives you the vocabulary (ATT&CK) and two thinking tools (the Pyramid of Pain and the invariant) to do that.

What you will learn#

Attacks are chains of behaviours#

Intrusions differ in the details, but most follow a similar shape. Attackers do not always go in this order, and they skip steps, but each step leaves traces somewhere:

  1. Get in. A phishing email, stolen credentials, or an exposed service with a flaw.
  2. Run code. A script, a macro, or a built-in tool used for something it was not meant for.
  3. Stay. A scheduled task, a service, a start-up entry or a new account, so access survives a reboot.
  4. Get more power and steal credentials. Higher privileges, passwords, tokens and keys.
  5. Look around and move. Find out what is on the network, then reach other machines.
  6. Take or break. Copy data out, or encrypt and destroy it.

A detection engineer's job is to know which traces each step leaves, and which of those traces are cheap for the attacker to hide.

MITRE ATT&CK in practice#

MITRE ATT&CK is a public knowledge base of attacker behaviour built from real-world observations. It organises behaviour in three levels:

Level What it answers Example
Tactic Why: the attacker's goal at this step Persistence
Technique How: the method used to reach the goal Scheduled Task/Job (T1053)
Sub-technique The specific variant Command and Scripting Interpreter: PowerShell (T1059.001)

A technique page lists the groups and malware known to use it, ways to reduce the risk, and notes on how to detect it, often naming the data you need. The groups and software pages are a quick way to see which behaviours attackers who target your sector favour.

Four things to remember:

  • IDs and names change. As of 2026-11-22 the live site shows ATT&CK v20.1, and the project releases new versions regularly. Copy an ID from the live site, and note which version you mapped against.
  • Use the Enterprise matrix first. It covers Windows, macOS, Linux, cloud and SaaS. The mobile and industrial control system matrices are separate.
  • It is a map, not a to-do list. It describes what attackers do, not what you must detect. Not every technique can be caught by one rule, and some cannot be caught at all with the data you have.
  • A mapped rule is not a proven rule. Tagging a detection with a technique ID says what you intend to cover. Stage 6 is about proving it, and stage 8 about measuring coverage honestly.

The Pyramid of Pain#

David Bianco's Pyramid of Pain ranks the things you can detect by how much it hurts the attacker when you take them away:

Level Example What it costs the attacker to change it
Hash values The checksum of a malware file Trivial: change one byte
IP addresses A command server's address Easy: rent another
Domain names A phishing or command domain Simple: register another
Network and host artefacts A distinctive user-agent string or file path Annoying: change the tooling
Tools A specific attack framework Challenging: find or build another
Tactics, techniques and procedures How they actually operate Tough: change how they work

The lesson is to aim as high as your data allows. Indicators at the bottom are not useless: they are fast to deploy and good for scoping an incident ("which other machines contacted this address?"). But a detection built only on them has a short life.

Find the invariant#

The invariant is the thing an attacker must do for a technique to work, which they cannot change without breaking or abandoning the technique. A rule built on the invariant keeps working when the attacker swaps tools.

Behaviour A fragile thing to detect The invariant to detect instead
Stealing credentials from LSASS memory (T1003.001) A tool's file name A process opening the LSASS process with memory-read access
Exploiting a web server to run commands One exploit's URL pattern The web server's worker process starting a shell or script interpreter
Command-and-control beaconing One server's address Connections to one destination at regular intervals, even with some random jitter
Password spraying One attacker's source address One source failing against many different accounts in a short window
Ransomware preparation A ransomware family's name Commands that delete backups and shadow copies, followed by a burst of file changes

Finding the invariant is a research task: read how the technique works, then ask "what is the one step they cannot skip?" Stage 5 turns each one into a working detection.

From a report to behaviours#

Public incident write-ups are the best free training material a detection engineer has. Read them with a specific question: what did the attacker do, in order, and what would each step have looked like in my logs? For each step, note:

  • what happened, in one line;
  • the ATT&CK technique;
  • the data source that would show it (stage 3 covers these); and
  • whether the report's evidence is an indicator (an address, a hash) or a behaviour.

Be sceptical. A report describes one intrusion, and vendor reports also sell products. Take the behaviours, not the exact strings.

What to build first#

You cannot detect everything, so start with behaviours that show up in many intrusions and that are within reach of the data you have: abuse of valid accounts, code run from phishing attachments, scripting interpreters, persistence through scheduled tasks and services, credential theft, remote services used to move between machines, and the preparation that comes before ransomware. Stage 8 returns to this as a structured, threat-informed backlog.

Do this#

  1. Break down a real intrusion (2 to 3 hours). Pick a recent write-up from The DFIR Report. Make a table of each step: what the attacker did, the ATT&CK technique (copy the ID from the live site), and whether the evidence is an indicator or a behaviour.
  2. Draw it as a Navigator layer (45 minutes). Open ATT&CK Navigator in your browser (nothing to install), colour the techniques from exercise 1, and export the layer as a JSON file. Keep it; you will reuse the habit in stage 8.
  3. Climb the pyramid (45 minutes). From the same report, list ten indicators and place each on the Pyramid of Pain. Then pick three behaviours and write the invariant for each in one sentence.
  4. Compare a weak and a strong rule (45 minutes). In the SigmaHQ rules, find one rule that matches a specific file name or hash and one that matches a behaviour for a similar technique. Which would survive the attacker renaming their tool?

Resources#

Free first

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 detection and data-source notes on three technique pages, and compare them with the invariants you wrote.
  • Read two more DFIR Report posts and note which techniques recur across them.
  • Threat Modelling stage 7 shows how to decide which techniques matter to your organisation.
  • The Threat Intelligence roadmap teaches how to judge and write reports like the ones you broke down here.

0 / 6 checkpoints ticked

View this page on GitHub