Tracing a Real Breach Through ATT&CK
Take the steps described in a published joint advisory on Scattered Spider, map each one to MITRE ATT&CK v20.1 with a script that reads the official STIX data, fix the mapping errors it finds, and attach a CIA impact plus a preventive and a detective control to every step.
Contentsand lesson path
On this page
- Goal and setup
- Step 1: turn the advisory into a timeline
- Step 2: map the steps with the official data
- Step 3: fix the mapping
- Step 4: test the mapper against common mistakes
- Step 5: add impact and controls to every step
- Check your understanding
- Apply it
- Review prompt
Lessons of Security Foundations & Threat Landscape
- Security Goals and the Controls That Serve Them Concept · 20 min
- Rating Risk with Likelihood and Impact Worked example · 20 min
- Threat Actors and the Shape of an Attack Concept · 20 min
- Tracing a Real Breach Through ATT&CK Lab · 25 min
- Authorization, Law and Professional Ethics Concept · 15 min
- Foundations Check Knowledge check · 8 questions
What you will learn
- Map the attacker actions in a published incident report to MITRE ATT&CK tactics and identify where a defender could have intervened.
- Classify the impact of a security event on confidentiality, integrity and availability and name the control category and type that would address it.
01. Goal and setup
Incident reports are written as stories: first the attacker did this, then that. Defenders need the same story in a structured form, so they can compare incidents, check which steps their detections would catch, and decide where to spend money. MITRE ATT&CK provides that structure. Each tactic is an attacker goal, such as Initial Access or Credential Access, and each technique is a way of reaching it, with an ID like T1621.
In this lab you work from a real document: joint cybersecurity advisory AA23-320A, Scattered Spider, published by the FBI, CISA and partner agencies in the UK, Canada and Australia, first in November 2023 and updated on 29 July 2025. Read its "Technical Details" section on the CISA website or the FBI's IC3 copy linked in the references before you start. The group mostly attacks people and identity systems, not software bugs, which makes it a good case for seeing where ordinary controls could have changed the outcome.
You will map twelve steps from the advisory to ATT&CK with a script that reads MITRE's official data, fix the errors it reports, and then add an impact rating and two controls to each step. The advisory cites ATT&CK IDs from the version current when it was written; ATT&CK has changed since, and catching that drift is part of the job.
You need: Python 3.10 or newer (standard library only), curl and about 60 MB of disk space for the ATT&CK Enterprise v20.1 data in STIX 2.1 format, the machine-readable version of the ATT&CK website.
mkdir attack-lab && cd attack-lab
curl -sSLo enterprise-attack-20.1.json \
https://raw.githubusercontent.com/mitre-attack/attack-stix-data/master/\
enterprise-attack/enterprise-attack-20.1.json
sha256sum enterprise-attack-20.1.json | cut -c1-64539a843a7b53ed9749740b2123dddae3726b1a4831841c32aca740b011b910b5The checksum is a small integrity control of its own: a versioned release file never changes, so the same file gives the same SHA-256 on every machine. If yours differs, the download is incomplete or is not v20.1.
02. Step 1: turn the advisory into a timeline
Each row is one attacker action in our own words, the technique ID that the advisory cites for it, and the tactic an analyst first wrote down. The tactic column uses ATT&CK short names (lower case with hyphens), which is how the STIX data names them. Rows 2 and 3 are copied exactly as the advisory cites them, which will matter in a moment.
step,summary,technique,claimed_tactic
1,Collects staff names and roles from social and business sites,T1593.001,reconnaissance
2,Takes over staff phone numbers by SIM swapping,T1451,initial-access
3,Phones the help desk posing as an employee over several calls,T1656,defense-evasion
4,Persuades the help desk to reset the password and move MFA,T1566.004,initial-access
5,Floods a user with MFA push prompts until one is approved,T1621,credential-access
6,Registers its own MFA device on the taken-over account,T1556.006,persistence
7,Installs a legitimate remote access tool for ongoing control,T1219,command-and-control
8,Searches SharePoint for VPN and credential documentation,T1213.002,collection
9,Finds passwords stored in documents and files,T1552.001,credential-access
10,Moves into existing cloud virtual machines,T1021.007,lateral-movement
11,Copies large volumes of data out to cloud storage,T1567.002,exfiltration
12,Encrypts VMware ESXi servers with ransomware,T1486,impact03. Step 2: map the steps with the official data
The script loads the STIX bundle, indexes every technique by its ATT&CK ID, follows revoked-by relationships to find replacements, and reads the tactic order from the Enterprise matrix object. For each row it checks that the ID exists in Enterprise ATT&CK, is not revoked or deprecated, and that the claimed tactic is one the technique really belongs to. It then prints the attack as a chain in tactic order and exits with code 1 while any row still needs fixing, so you could run it in a pipeline.
"""Map incident steps to MITRE ATT&CK Enterprise using the official STIX data."""
import csv
import json
import sys
BUNDLE = "enterprise-attack-20.1.json"
def ext_id(obj: dict) -> str | None:
for ref in obj.get("external_references", []):
if ref.get("source_name") == "mitre-attack":
return ref.get("external_id")
return None
def load(path: str = BUNDLE) -> dict:
objects = json.load(open(path, encoding="utf-8"))["objects"]
by_stix = {o["id"]: o for o in objects}
matrix = next(o for o in objects if o["type"] == "x-mitre-matrix")
tactics = [by_stix[ref] for ref in matrix["tactic_refs"]] # matrix order
techniques = {ext_id(o): o for o in objects if o["type"] == "attack-pattern"}
revoked_by = {by_stix[r["source_ref"]]["id"]: by_stix[r["target_ref"]]
for r in objects if r["type"] == "relationship"
and r["relationship_type"] == "revoked-by"}
return {"tactics": tactics, "techniques": techniques, "revoked_by": revoked_by,
"order": {t["x_mitre_shortname"]: i for i, t in enumerate(tactics)},
"names": {t["x_mitre_shortname"]: t["name"] for t in tactics}}
def lookup(att: dict, technique: str, claimed: str) -> dict:
if technique.startswith("mobile:"):
return {"status": "noted: Mobile ATT&CK, outside this matrix", "mobile": True}
tech = att["techniques"].get(technique)
if tech is None:
return {"status": "not in Enterprise (typo, or Mobile/ICS?)"}
if tech.get("revoked"):
new = att["revoked_by"].get(tech["id"])
if new is None:
return {"status": "revoked"}
return {"status": f"revoked: use {ext_id(new)} {new['name']}"}
if tech.get("x_mitre_deprecated"):
return {"status": "deprecated: pick a current technique"}
tactics = [p["phase_name"] for p in tech["kill_chain_phases"]]
status = "ok" if claimed in tactics else f"claimed tactic {claimed} not listed"
return {"status": status, "name": tech["name"], "tactics": tactics}
if __name__ == "__main__":
att = load()
rows = list(csv.DictReader(open(sys.argv[1], encoding="utf-8")))
print(f"ATT&CK Enterprise: {len(att['tactics'])} tactics,",
sum(not t.get("revoked") and not t.get("x_mitre_deprecated")
for t in att["techniques"].values()), "active techniques")
chain: dict[str, list[str]] = {}
problems = 0
for row in rows:
r = lookup(att, row["technique"], row["claimed_tactic"])
name = r.get("name", "?")[:30]
print(f"{row['step']:>2} {row['technique']:<12} {name:<30} {r['status']}")
if r["status"] == "ok":
chain.setdefault(row["claimed_tactic"], []).append(row["step"])
elif not r.get("mobile"):
problems += 1
print("chain in ATT&CK tactic order:")
for short, name in att["names"].items():
print(f" {name:<22} {', '.join(chain.get(short, [])) or '-'}")
print(f"{problems} row(s) to fix")
sys.exit(1 if problems else 0)python3 attack_map.py incident.csv; echo "exit=$?"ATT&CK Enterprise: 15 tactics, 706 active techniques
1 T1593.001 Social Media ok
2 T1451 ? not in Enterprise (typo, or Mobile/ICS?)
3 T1656 ? revoked: use T1684.001 Impersonation
4 T1566.004 Spearphishing Voice ok
5 T1621 Multi-Factor Authentication Re ok
6 T1556.006 Multi-Factor Authentication ok
7 T1219 Remote Access Tools ok
8 T1213.002 Sharepoint ok
9 T1552.001 Credentials In Files ok
10 T1021.007 Cloud Services ok
11 T1567.002 Exfiltration to Cloud Storage ok
12 T1486 Data Encrypted for Impact ok
chain in ATT&CK tactic order:
Reconnaissance 1
Resource Development -
Initial Access 4
Execution -
Persistence 6
Privilege Escalation -
Stealth -
Defense Impairment -
Credential Access 5, 9
Discovery -
Lateral Movement 10
Collection 8
Command and Control 7
Exfiltration 11
Impact 12
2 row(s) to fix
exit=1Ten rows map cleanly. Two do not, for two different reasons. T1451, SIM Card Swap, is a real technique, but it lives in the separate Mobile ATT&CK matrix, because the attack happens at the phone carrier rather than on the victim's computers. T1656, Impersonation, was correct when the advisory was written, but it has since been revoked and replaced by T1684.001. In April 2026, ATT&CK v19 also split the old Defense Evasion tactic into two: Stealth (hiding by blending in) and Defense Impairment (breaking or disabling security tools). That is why Enterprise ATT&CK now has 15 tactics. An analyst who maps from memory, or from an old report, will make exactly these mistakes.
04. Step 3: fix the mapping
Keep the SIM swap in the timeline, because it happened, but mark it as a Mobile technique so the script records it as a note. Replace the revoked ID with its successor and run the script again.
sed -i -e 's/,T1451,/,mobile:T1451,/' \
-e 's/,T1656,defense-evasion/,T1684.001,defense-evasion/' incident.csv
python3 attack_map.py incident.csv | head -4ATT&CK Enterprise: 15 tactics, 706 active techniques
1 T1593.001 Social Media ok
2 mobile:T1451 ? noted: Mobile ATT&CK, outside this matrix
3 T1684.001 Impersonation claimed tactic defense-evasion not listedThe new ID is valid, but the tactic is still the old name. Impersonation is now under Stealth, so fix the claimed tactic too and confirm that the script exits cleanly.
sed -i 's/,T1684.001,defense-evasion/,T1684.001,stealth/' incident.csv
python3 attack_map.py incident.csv | tail -10; echo "exit=${PIPESTATUS[0]}" Stealth 3
Defense Impairment -
Credential Access 5, 9
Discovery -
Lateral Movement 10
Collection 8
Command and Control 7
Exfiltration 11
Impact 12
0 row(s) to fix
exit=0Read the chain from top to bottom and you have the shape of the attack: research the staff, talk the help desk into handing over an account, survive a password change by adding an MFA device, install a remote tool, find credentials and data, move across cloud machines, take the data out, and finally encrypt servers for ransom. Notice the empty rows too: this timeline has no Execution or Privilege Escalation step at all, because valid accounts and legitimate tools did the work.
Some techniques belong to several tactics. T1556.006 is listed under Persistence, Credential Access and Defense Impairment. You choose by what the attacker achieved at that step: here the new MFA device let them keep access after the victim reset their password, so the timeline says Persistence.
05. Step 4: test the mapper against common mistakes
A checking tool is only useful if it fails when it should. These tests feed it the errors analysts really make: a letter O typed instead of a zero, a revoked ID from an older report, a real technique under the wrong tactic, a correct row, and a Mobile technique.
"""Negative tests: the mapper must catch the mistakes analysts really make."""
from attack_map import load, lookup
att = load()
CASES = [
("T1O78", "initial-access", "not in Enterprise"), # letter O, not zero
("T1562.001", "defense-evasion", "revoked: use T1685"),
("T1078", "impact", "claimed tactic impact not listed"),
("T1078", "initial-access", "ok"),
("mobile:T1660", "initial-access", "noted: Mobile"),
]
for technique, claimed, want in CASES:
got = lookup(att, technique, claimed)["status"]
print(f"{'PASS' if got.startswith(want) else 'FAIL'} {technique:<13} {got}")python3 test_map.pyPASS T1O78 not in Enterprise (typo, or Mobile/ICS?)
PASS T1562.001 revoked: use T1685 Disable or Modify Tools
PASS T1078 claimed tactic impact not listed
PASS T1078 ok
PASS mobile:T1660 noted: Mobile ATT&CK, outside this matrix06. Step 5: add impact and controls to every step
Mapping says what happened; the point of the exercise is where a defender could have intervened. For each step, record which part of the CIA triad it harms (C for confidentiality, I for integrity, A for availability, - when the step only prepares the attack) and name one preventive control, which stops the step, and one detective control, which notices it. Many controls come straight from the advisory's mitigations section, such as phishing-resistant MFA, application controls for remote access tools and offline backups.
step,cia,preventive,detective
1,-,Limit staff details published online,Monitor for lookalike domains
2,C,Carrier SIM-swap PIN on staff numbers,Alert when a staff number is ported
3,-,Help desk call-back to a known number,Review calls that ask for resets
4,C+I,Manager approval for MFA resets,Alert on password and MFA reset together
5,C,Phishing-resistant MFA instead of push,Alert on denied pushes then an approval
6,I,New MFA devices only from managed devices,Alert on new MFA method registration
7,I,Application control for remote tools,EDR alert on new remote access software
8,C,Least privilege on SharePoint sites,Alert on bulk searches for VPN or password
9,C,Keep credentials in a vault and scan files,Alert on reads of files flagged as secret
10,C+I,Narrow cloud roles and approve SSM use,Alert on instance sessions from odd roles
11,C,Block unapproved cloud storage uploads,Alert on unusual outbound data volume
12,A,Offline tested backups; isolate ESXi admin,Alert on mass file changes on ESXi"""Every mapped step needs a CIA impact, one preventive and one detective control."""
import csv
import sys
VALID_CIA = {"-", "C", "I", "A", "C+I", "C+A", "I+A", "C+I+A"}
steps = {r["step"] for r in csv.DictReader(open(sys.argv[1], encoding="utf-8"))}
controls = {r["step"]: r for r in csv.DictReader(open(sys.argv[2], encoding="utf-8"))}
errors = []
for step in sorted(steps, key=int):
row = controls.get(step)
if row is None:
errors.append(f"step {step}: no controls row")
continue
if row["cia"] not in VALID_CIA:
errors.append(f"step {step}: CIA impact {row['cia']!r} is not valid")
for kind in ("preventive", "detective"):
if not row[kind].strip():
errors.append(f"step {step}: missing {kind} control")
impact = {p: sum(p in r["cia"] for r in controls.values()) for p in "CIA"}
print(f"{len(steps)} steps, {len(controls)} control rows; steps touching", impact)
for e in errors:
print("ERROR", e)
sys.exit(1 if errors else 0)python3 controls_check.py incident.csv controls.csv; echo "exit=$?"
sed 's/,Alert on new MFA method registration$/,/' controls.csv > controls-gap.csv
python3 controls_check.py incident.csv controls-gap.csv; echo "exit=$?"12 steps, 12 control rows; steps touching {'C': 7, 'I': 4, 'A': 1}
exit=0
12 steps, 12 control rows; steps touching {'C': 7, 'I': 4, 'A': 1}
ERROR step 6: missing detective control
exit=1Now look for the earliest point where one control breaks the chain. Steps 3 and 4 are the hinge: once the help desk resets the password and moves the MFA to the attacker, every later step uses a valid account. A call-back to a number already on file, or a manager's approval for MFA resets, stops the attack before it starts, and phishing-resistant MFA (step 5) would stop the push-fatigue route. If those fail, an alert on a new MFA registration (step 6) is the next cheap chance to catch it, long before any data leaves. The late controls still matter, because no early control is perfect: that layering is defence in depth. Seven of the twelve steps harm confidentiality and only the last one harms availability, which matches the advisory's point that data theft for extortion often comes before encryption.
07. Check your understanding
08. Apply it
This is the skill's practice task on a smaller scale. Pick another advisory from the CISA advisories page, preferably a #StopRansomware one, and build incident.csv and controls.csv for it from scratch. Run both scripts until they exit with code 0, then add a risk column with a short likelihood and impact rating for a mid-sized organisation, using the method from Rating Risk with Likelihood and Impact.
09. Review prompt
Without looking back: explain the difference between a tactic and a technique, name the two tactics that replaced Defense Evasion in ATT&CK v19, give two reasons a cited technique ID can fail to map, and say how you decide which tactic to record for a technique that belongs to several.
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.