From Threat Reports to Defensive Action
Read a threat advisory the way a defender does: pull out indicators and behaviours with a small script, rank them with the pyramid of pain, structure the intrusion with the Diamond Model, and decide which items become blocks, detections or hunts, each with a review date.
Contentsand lesson path
On this page
- Why it matters
- Pulling indicators and behaviours out of an advisory
- Ranking with the pyramid of pain
- Structuring the intrusion with the Diamond Model
- Deciding what to block, detect and hunt
- Check your understanding
- Apply it
- Review prompt
Lessons of Threat Intel & Malware Triage
- From Threat Reports to Defensive Action Concept · 20 min
- Working a Reported Phishing Email Lab · 30 min
- Safe First Look at a Suspicious File Lab · 30 min
- Email Authentication from Monitor to Reject Worked example · 20 min
- Sharing and Operationalising Indicators Worked example · 20 min
- Threat Intel & Malware Triage Check Knowledge check · 8 questions
What you will learn
- Turn a published threat report or advisory into action: extract indicators and behaviours, rank them with the pyramid of pain, structure the intrusion with the Diamond Model, and decide which become blocks, detections or hunts.
01. Why it matters
A threat advisory is a report from a government team, a vendor or a sharing group about attacks it has seen. It lists addresses, file hashes and a description of how the attackers worked. Reading it does not protect you. The value comes from the decisions you take afterwards: what you block today, what you search for in last month's logs, and what you turn into a detection that still works next year.
Cyber threat intelligence (CTI) is information about attackers, analysed so that someone can act on it. Strategic intelligence is for leaders (who targets our sector, and what it means for risk). Operational intelligence describes campaigns and how groups operate. Tactical intelligence is the detail that machines and analysts use: indicators and techniques. This lesson works at the tactical and operational levels, from one fixed advisory that you can process yourself.
An indicator of compromise (IOC) is an observable value that points to malicious activity, such as a file hash, an IP address or a domain name. A TTP (tactics, techniques and procedures) describes behaviour: how the attacker gets in, stays in and reaches the goal. The main skill in this lesson is keeping those two apart, because they age at very different speeds.
02. Pulling indicators and behaviours out of an advisory
Create a folder called intel and save the advisory below as intel/advisory.txt. It is fictional, but it is written in the style of real public advisories. It uses documentation addresses (RFC 5737) and reserved domain names (RFC 2606), so nothing in it points to a real system.
Notice the defanged values: hxxps instead of https and [.] instead of a dot, so that nobody clicks them by mistake. Keep indicators defanged in documents and tickets; refang them only inside tools that need the real value.
LAB-CERT ADVISORY LC-2026-014 (fictional, for training) TLP:CLEAR 2026-11-09
Group: SILVER QUAY. Targets: finance teams in logistics firms.
Invoice-themed emails link to hxxps://billing-portal[.]northwind-pay[.]test/inv/7731
and deliver invoice_7731.zip (SHA-256
e179b7a760d7f59ab136d67838dd6ad5b268ee5a573b6dd097bdd565941c793b). The archive
holds a loader (SHA-256
1ae844a07dc660e002ba232ff51d7cf1c0896c348a6e654ee0acff440cf5ae85) that calls
home to update-cdn[.]example on 198[.]51[.]100[.]23 with the User-Agent
"SQ-Updater/2.1", then adds the registry value
HKCU\Software\Microsoft\Windows\CurrentVersion\Run\OneDriveSync.
For persistence the group installs a commercial remote-management (RMM) tool
(T1219.002). Days later it copies a Windows system utility under a new name
(T1036.003) and uses it to dump LSASS memory (T1003.001).The script below refangs the text in memory, then uses one regular expression per indicator type. It also gives each type a level from the pyramid of pain, which the next section explains. Save it as intel/extract.py. It uses only the Python standard library (Python 3.10 or later; tested with 3.12.13).
"""Pull indicators and technique IDs out of an advisory and rank them."""
import re
import sys
PAIN = {"sha256": 1, "ipv4": 2, "domain": 3, "url": 4, "user-agent": 4,
"registry": 4, "technique": 6}
LABEL = {1: "trivial", 2: "easy", 3: "simple", 4: "annoying", 5: "challenging",
6: "tough"}
PATTERNS = {
"url": r"https?://[^\s\"]+",
"sha256": r"\b[a-f0-9]{64}\b",
"ipv4": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b(?:[a-z0-9-]+\.)+(?:example|test)\b",
"user-agent": r"User-Agent\s+\"([^\"]+)\"",
"registry": r"HK(?:CU|LM)\\\S+",
"technique": r"\bT\d{4}(?:\.\d{3})?\b",
}
def refang(text):
"""Undo defanging so the patterns can match. Never refang a document you send on."""
return text.replace("hxxp", "http").replace("[.]", ".")
def extract(text):
text = refang(text)
found = []
for kind, pattern in PATTERNS.items():
for value in dict.fromkeys(re.findall(pattern, text)):
found.append((PAIN[kind], kind, value.rstrip(".")))
urls = [v for _, k, v in found if k == "url"]
# A domain that only appears inside a URL is reported with the URL.
found = [f for f in found
if not (f[1] == "domain" and any(f[2] in u for u in urls))]
return sorted(found, key=lambda f: (-f[0], f[1], f[2]))
if __name__ == "__main__":
for level, kind, value in extract(open(sys.argv[1]).read()):
print(f"{level} {LABEL[level]:<9} {kind:<10} {value}")cd intel
python3 extract.py advisory.txt6 tough technique T1003.001
6 tough technique T1036.003
6 tough technique T1219.002
4 annoying registry HKCU\Software\Microsoft\Windows\CurrentVersion\Run\OneDriveSync
4 annoying url https://billing-portal.northwind-pay.test/inv/7731
4 annoying user-agent SQ-Updater/2.1
3 simple domain update-cdn.example
2 easy ipv4 198.51.100.23
1 trivial sha256 1ae844a07dc660e002ba232ff51d7cf1c0896c348a6e654ee0acff440cf5ae85
1 trivial sha256 e179b7a760d7f59ab136d67838dd6ad5b268ee5a573b6dd097bdd565941c793bThe script found three technique IDs, three artefacts, one domain, one IP address and two hashes. MITRE ATT&CK is a public catalogue of attacker techniques: T1036.003 is "Masquerading: Rename Legitimate Utilities" and T1003.001 is "OS Credential Dumping: LSASS Memory". With these IDs, your detections and your partners' reports name a behaviour the same way.
Two things show the limits of regular expressions. The file name invoice_7731.zip was not reported as a domain only because the pattern accepts just .example and .test; a general pattern would match it, since .zip is a real top-level domain. And no pattern found the tool: a commercial remote-management (RMM) product installed for persistence. Tools and behaviours are written in sentences, so an analyst has to read for them. A script like this is a first pass, not the analysis.
03. Ranking with the pyramid of pain
David Bianco's pyramid of pain ranks indicator types by how much it costs the attacker when you detect and deny them. From the bottom: hash values (trivial to change), IP addresses (easy), domain names (simple), network and host artefacts (annoying), tools (challenging) and TTPs (tough). The numbers 1 to 6 in the script follow that order.
The ranking is about cost, not accuracy. A SHA-256 hash is very precise: it names one exact file. But one changed byte gives a new hash, and many malware builders produce a new file for every victim. An IP address can be swapped for another rented server in minutes, and a domain costs a few dollars. Artefacts are more annoying: the User-Agent SQ-Updater/2.1 and the OneDriveSync Run key are written into the attacker's code or scripts, so changing them means editing and redeploying. If you detect the RMM product they rely on, they must find and learn a different tool. At the top, TTPs describe how they work: abusing remote-management software for persistence, renaming a system utility, reading LSASS memory to steal credentials. To get past a good behaviour detection, the group has to change its methods and retrain its people.
Low indicators are not useless. They are cheap and precise for a short time, which makes them good for quick blocks and for searching old logs. The pyramid tells you where effort pays off for longer.
04. Structuring the intrusion with the Diamond Model
The Diamond Model of Intrusion Analysis (Caltagirone, Pendergast and Betz, 2013) describes each intrusion event with four connected features. The adversary is the actor behind it. The capability is what they use: malware, tools, exploits and techniques. The infrastructure is how capability is delivered and controlled: domains, servers, IP addresses, email accounts. The victim is the person, organisation or system attacked. Because the features are connected, you can pivot from any one of them to the others.
The script records three events. E1 comes from the advisory; E2 and E3 are imaginary cases from your own and a partner's investigations. Save it as intel/diamond.py and run it.
"""Three intrusion events as Diamond Model records, and a pivot across them."""
EVENTS = [
{"id": "E1", "adversary": "SILVER QUAY (per LC-2026-014)",
"capability": ["loader 1ae844a0", "RMM tool"],
"infrastructure": ["update-cdn.example", "198.51.100.23"],
"victim": "our finance team"},
{"id": "E2", "adversary": "unknown",
"capability": ["credential phishing page"],
"infrastructure": ["login.northwind-pay.test", "198.51.100.23"],
"victim": "partner payroll team"},
{"id": "E3", "adversary": "unknown",
"capability": ["loader 1ae844a0"],
"infrastructure": ["files.cdn-mirror.test"],
"victim": "our accounts team"},
]
def pivot(value):
"""Events that share this capability or infrastructure value."""
return [e["id"] for e in EVENTS
if value in e["capability"] + e["infrastructure"]]
for e in EVENTS:
print(f'{e["id"]} adversary={e["adversary"]}; victim={e["victim"]}')
print(f' capability: {", ".join(e["capability"])}')
print(f' infrastructure: {", ".join(e["infrastructure"])}')
print("pivot on infrastructure 198.51.100.23 ->", pivot("198.51.100.23"))
print("pivot on capability loader 1ae844a0 ->", pivot("loader 1ae844a0"))python3 diamond.pyE1 adversary=SILVER QUAY (per LC-2026-014); victim=our finance team
capability: loader 1ae844a0, RMM tool
infrastructure: update-cdn.example, 198.51.100.23
E2 adversary=unknown; victim=partner payroll team
capability: credential phishing page
infrastructure: login.northwind-pay.test, 198.51.100.23
E3 adversary=unknown; victim=our accounts team
capability: loader 1ae844a0
infrastructure: files.cdn-mirror.test
pivot on infrastructure 198.51.100.23 -> ['E1', 'E2']
pivot on capability loader 1ae844a0 -> ['E1', 'E3']Keep capability and infrastructure apart, because they answer different questions. The loader is capability; the server it calls home to is infrastructure. A pivot on infrastructure (the shared IP address) links E1 to a partner's payroll team, a victim you did not know about. A pivot on capability (the same loader) links E1 to another team in your own company.
A pivot is a lead, not a proof. One IP address can be a shared web host used by thousands of unrelated customers. That is why E2's adversary stays "unknown" until more features overlap, such as the same lure or the same tooling. Record how confident you are in each link, so that a weak pivot is not read later as an attribution.
05. Deciding what to block, detect and hunt
Each item now needs a decision. A block stops traffic or execution now; it suits precise, short-lived indicators. A detection is a rule that raises an alert when a behaviour or artefact appears; it is worth the effort for items high on the pyramid. A hunt is a search you start yourself, often back in time: did this already happen here? Save intel/plan.py next to extract.py, which it imports.
"""Turn ranked indicators into blocks, hunts and detections with review dates."""
import sys
from datetime import date, timedelta
from extract import extract
PUBLISHED = date(2026, 11, 9)
# kind: (action, where, days the action lives before review; None = no expiry)
POLICY = {
"sha256": ("hunt+block", "EDR file events, 90 days back", 90),
"ipv4": ("block+hunt", "egress firewall; check shared hosting", 14),
"domain": ("block+hunt", "DNS resolver and proxy logs", 30),
"url": ("block+hunt", "proxy; hunt the /inv/<digits> path", 30),
"user-agent": ("detect", "proxy logs rule", None),
"registry": ("detect", "EDR registry rule, Run key writes", None),
"technique": ("detect+hunt", "behaviour analytic and hunt hypothesis", None),
}
for level, kind, value in extract(open(sys.argv[1]).read()):
action, where, days = POLICY[kind]
review = (PUBLISHED + timedelta(days=days)).isoformat() if days else "rule review"
print(f"{value[:24]:<24} {action:<11} {review:<11} {where}")python3 plan.py advisory.txtT1003.001 detect+hunt rule review behaviour analytic and hunt hypothesis
T1036.003 detect+hunt rule review behaviour analytic and hunt hypothesis
T1219.002 detect+hunt rule review behaviour analytic and hunt hypothesis
HKCU\Software\Microsoft\ detect rule review EDR registry rule, Run key writes
https://billing-portal.n block+hunt 2026-12-09 proxy; hunt the /inv/<digits> path
SQ-Updater/2.1 detect rule review proxy logs rule
update-cdn.example block+hunt 2026-12-09 DNS resolver and proxy logs
198.51.100.23 block+hunt 2026-11-23 egress firewall; check shared hosting
1ae844a07dc660e002ba232f hunt+block 2027-02-07 EDR file events, 90 days back
e179b7a760d7f59ab136d678 hunt+block 2027-02-07 EDR file events, 90 days backEvery block has a review date because indicators decay. The group moves to new servers, and the old address is often rented by someone innocent; a permanent block then breaks legitimate traffic and nobody remembers why it exists. Fourteen days for the IP address and thirty for the domain are example values, not a standard. Choose your own and write them down.
The hunts matter as much as the blocks. The activity in the advisory may have reached you weeks before it was published. Searching 90 days of EDR file events for the two hashes, and your DNS and proxy logs for the domain and the URL path, tells you whether you are already a victim. EDR (endpoint detection and response) is the agent on each computer that records process, file and network activity.
The behaviours get detections with a regular rule review instead of an expiry. A rule that alerts when an RMM tool your IT team did not approve is installed, or when a renamed system utility opens LSASS memory, keeps working after the group changes every address and hash. Check first that you collect the data it needs, such as process creation events with command lines; Sharing and Operationalising Indicators shows how blocks and detections are fed and retired.
One filter comes before all of this: relevance. Keep a short list of priority intelligence requirements, the questions that matter most to your organisation, such as "who targets payment processes in logistics firms?". An advisory about a platform you do not run can be noted and filed.
06. Check your understanding
07. Apply it
Take a recent public advisory from CISA or your national CERT that covers a sector like yours, and work it the way this lesson did:
- Copy its indicators into a text file and run
extract.pyon it. Note what the patterns missed and what they matched wrongly, and extendPATTERNS(for example withipv6ormd5) if the advisory needs it. - Read the advisory for tools and behaviours, and list them with their ATT&CK technique IDs. Check each ID on attack.mitre.org.
- Write a Diamond record for the main event and name one pivot you could run in your own data.
- Write a one-page plan with blocks (each with a review date), hunts (each with the data source and time range) and one behaviour detection you would ask the detection engineers for. This is the first part of the skill project's case file.
08. Review prompt
Without looking back:
- Name the six levels of the pyramid of pain from bottom to top, and say why a hash is precise but low.
- What are the four features of the Diamond Model? Which one is a phishing domain, and which one is the malware it delivers?
- Why does every block in the plan have a review date, and why do behaviour detections not?
- What do you hunt for after an advisory, and why does the time range matter?
References
Your progress
Reading state
Sign in to save that you finished reading this lesson.
Prove this skill
8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.