Thirty real cases from 2014 to 2025, each written as a short course: the concepts first, the story in plain language, the attack step by step with the attacker’s reasoning, the defense with the defender’s reasoning, and detection rules you can run.
Every case is anchored to primary sources and mapped to MITRE ATT&CK, the public catalog of attacker techniques that the industry uses as its shared vocabulary (and to MITRE ATLAS, its counterpart for AI systems, for the AI cases). Expand any card to open it. The colored chips below are the 11 attack surfaces, meaning the part of an organization an attack comes through (identity, cloud, the supply chain and so on); click a surface chip to filter.
Why this case — what the case teaches and why it was chosen. Concepts first — the building blocks explained for a programmer, so nothing later is magic. The story — the incident in plain language.
ATT&CK chips — between the story and the attack chain sits a row of chips such as T1558.003 Kerberoasting. MITRE ATT&CK is a free public catalog of the methods real attackers use, grouped by the attacker’s goal at each stage (its “tactics”: initial access, persistence, lateral movement, exfiltration and so on). Each method is a “technique” with an ID (Txxxx, with a suffix such as .003 for a more specific variant), so you can look it up at attack.mitre.org and compare it with what your tools claim to detect. Phone and industrial cases use ATT&CK’s separate Mobile and ICS catalogs, and the AI cases use MITRE ATLAS, the equivalent catalog for attacks on AI systems (IDs beginning AML.); those chips carry a label saying so.
Attack chain — each numbered step shows the ATT&CK phase, what the attacker did, why they did it that way, the tool, and the trace it left in telemetry. Telemetry is everything your systems record about what happens on them (logs, process and network events, cloud audit trails); the trace is the specific record this step leaves there, which is what a detection can key on. Above the list, a rail replays the chain once: the attacker’s dot moves from step to step, and each step’s trace drops into a telemetry lane. Each marker is labeled TRACE (a record a rule can key on), FAINT (a trace exists, but ordinary monitoring will not surface it) or NO SIGNAL (nothing stands out from normal activity), and the tag next to it says where it lands: the log or sensor to look in. An amber diamond, NOTICED, marks the step at which the victim first found out (or, on technique cards, the first step the card’s own detection catches), or sits past the arrow when the news came from outside. Detail stays at published-threat-intelligence depth: enough to understand and detect, never a how-to.
Defense — five blocks with reasoning: Detection (the signal and why it is the right one), Tooling (which product category sees it and why), Investigation (steps and why in that order), Response (contain, eradicate, recover, and why), Hardening (what would have prevented it, and the trade-off).
Detection in practice — the detection engineering for that case, in the format that fits the data source: Sigma for logs (a vendor-neutral YAML rule format that converts into the query language of your SIEM, the central platform that collects logs and runs rules over them), YARA for files (patterns of strings and bytes that recognize a malware file), KQL for Microsoft Sentinel / Defender hunting (the query language of Microsoft’s security tools), Falco for containers (rules over what Linux processes do at runtime), and shell / MVT for inventory and forensics (plain commands that answer “do we run the vulnerable version?”, and the Mobile Verification Toolkit, which checks a phone backup for spyware traces). These are starting points, not drop-in production rules: each one carries the logic of the detection, but field names, thresholds and exclusions depend on your environment. Every one needs baselining and false-positive tuning first. Your baseline is what normal activity looks like on your systems; a false positive is an alert on harmless activity; to tune a rule is to add exclusions and adjust thresholds until false positives are rare enough that each alert still gets a serious look, re-testing each time that the rule still catches the attack. Run a new rule in audit mode first (it records matches without alerting anyone). Atomic indicators (specific IPs, file hashes, domains) are trivial for an attacker to change, so they rotate; prefer the behavioral logic. Several cases are deliberately not a SIEM rule and say so: xz-utils and Heartbleed are dependency inventory, Rapid Reset is defended at the CDN edge, Pegasus is mobile forensics, the insider case is behavioral analytics, the deepfake case is a finance control. Heartbleed is undetectable by construction, so its card shows what to do when no rule can help.
Deep dives — two cards carry a full worked method inside them. Card 10 builds one detection end to end (the blue loop: hypothesis, emulation with Atomic Red Team, tuning v1→v4, measuring, documenting). Card 12 runs the offensive mirror (the red / purple loop: authorized adversary emulation and evasion, every concept paired with its defensive counter).
What actually happened — the real outcome with dates and numbers. Lessons and Check yourself — three takeaways and a few questions with hidden answers. Unfamiliar term? Words with a dotted underline show their definition when you hover, focus or tap them, and every one is in the glossary; the Field Map foundations cover the basics.
Every acronym, product class, and term of art used above, in plain language.
On the Field Map’s loop, this deep dive sits at stage 08, New detection.
This is the detection engineer’s actual day-job, worked end to end on one technique: Kerberoasting (T1558.003). Form a hypothesis, confirm you even collect the data, emulate the attack to get ground truth, write the rule, watch it fire, then do the hard part — tune out the false positives until it’s deployable. Every command and rule is here to run.
Lab only. The emulation steps generate real attack telemetry in Active Directory. Run them only in a test domain you own or are explicitly authorized to test — never in production, never without permission.
New to this? Read this first
A detection engineer writes the rules that turn raw logs into alerts. Their raw material is telemetry (the logs every system emits) and their workplace is the SIEM (the platform that collects all logs and runs rules over them). A good rule has high precision: most of its alerts are real attacks, not false positives (alerts on harmless activity). The hard part is never writing the first rule — it is cutting the false positives until a human can actually act on what fires. This deep dive walks that whole job on the technique from this card. If any term here is unfamiliar, the Field Map foundations define the building blocks; the rest of this card is the attacker’s side of the same technique.
The Windows pieces, for a programmer. Active Directory (AD) is the central account database of a Windows enterprise, and the set of users and machines it governs is a domain. The servers that host it and answer every login are domain controllers (DCs). Logins use Kerberos, a ticket protocol that works much like signed, expiring tokens. You prove your password once to the KDC (Key Distribution Center, a service running on every DC) and receive a TGT (ticket-granting ticket; think refresh token). You then show the TGT to the KDC to get a service ticket for each service you want to reach (think an access token scoped to one audience). The part of the KDC that issues service tickets is the ticket-granting service, which is why a service ticket is usually just called a TGS. A service account is the non-human account a piece of server software runs as; its password was typically set by an administrator years ago and never changed since.
The measuring words. A true positive is an alert on a real attack, the opposite of a false positive. Recall is the share of real attacks a rule catches; precision and recall pull against each other, and Stage 07 shows how to measure each. A baseline is a measurement of what normal looks like in your own environment, taken before you decide what counts as abnormal. An allowlist is a reviewed list of known-good exceptions that a rule skips.
Before any code: what exactly am I detecting, what does the attacker do, and what observable does that leave behind?
The technique. In Active Directory, a service that accepts Kerberos logins registers a Service Principal Name (SPN) on the account it runs as. When that is an ordinary user account, its ticket is crackable, because a person chose the password and it may be short, guessable and years old. A machine account or a gMSA (group Managed Service Account) is not worth attacking: AD itself generates and rotates its long random password. Any authenticated domain user can ask the Kerberos KDC for a service ticket (TGS) to any SPN — that’s normal Kerberos: the KDC does not check whether you are allowed to use the service, it leaves that decision to the service itself. The ticket is encrypted with the service account’s password hash (a key derived from its password), so that the service can decrypt it without calling the KDC. The side effect is that anyone holding a ticket can test password guesses against it: derive a key from the guess, try to decrypt, and see whether the result is well-formed. An attacker requests tickets for privileged service accounts, then cracks them offline at their leisure, on their own hardware, with a GPU password cracker such as Hashcat. No exploit, no admin rights, and — critically — no failed logons on the network, because no guess is ever sent to the domain.
The observable. Every Windows machine keeps an audit trail called the Security event log, in which each kind of event has a numeric ID. Every TGS request is logged on domain controllers as Event ID 4769 (“A Kerberos service ticket was requested”). Attackers prefer tickets encrypted with the weak RC4 cipher (encryption type 0x17, the numeric code Kerberos uses for RC4-HMAC) because they crack far faster than AES: the RC4 key is a single unsalted, fast hash of the password, while the AES key is derived with a salt and 4,096 rounds of PBKDF2 (a deliberately slow key-derivation function), so every guess costs hundreds to thousands of times more. So the classic raw signal is: 4769 events requesting RC4 tickets — but as we’ll see, that alone is nearly useless. The real signal is behavioral.
2026 changed the ground under this technique
Microsoft’s Kerberos hardening for CVE-2026-20833 (KB5073381) arrived in three steps: audit-only warnings from January 2026, AES-only tickets by default from April 2026, and no rollback from the July 2026 updates. On a patched domain controller, an account with no explicit msDS-SupportedEncryptionTypes (the AD attribute that lists which ciphers the account accepts) now gets AES tickets only; RC4 roasting still works only against accounts explicitly configured for RC4, and against unpatched DCs. Three consequences for this deep dive: (1) in a patched estate (an organization’s whole fleet), a successful 0x17 ticket for a user SPN is anomalous on its own; (2) the attacker’s fallback is roasting AES tickets (much slower to crack, still crackable when the password is weak), so volume and the honeytoken (a decoy account, built in Stage 06) carry the detection, not the encryption type; (3) your lab has to recreate the legacy RC4 case on purpose (Stage 03), or v1–v3 below will return nothing and you will think the pipeline is broken.
The most-skipped step, and the one that quietly kills detections. You cannot detect what you don’t log.
Event 4769 fires only on domain controllers (the KDC is the only party that sees a ticket request; neither the user’s workstation nor the target service logs it), and only if Kerberos service-ticket auditing is on. Windows does not log everything by default: the audit policy decides which categories of event are written at all, separately for successes and failures. auditpol is the built-in command that reads and sets that policy on one machine. Group Policy is AD’s configuration management: settings defined once, pushed to every machine in the domain and periodically re-applied, which is why a setting made there survives a rebuild and one typed by hand does not. Confirm it first:
# Is the audit subcategory enabled for Success and Failure? auditpol /get /subcategory:"Kerberos Service Ticket Operations" # Enable it if not (Group Policy is the durable way): # Computer Config > Policies > Windows Settings > Security Settings > # Advanced Audit Policy > Account Logon > # "Audit Kerberos Service Ticket Operations" = Success and Failure
Also confirm the events actually reach your SIEM from all DCs — a single un-forwarded DC is a blind spot an attacker can request tickets through, because any DC can answer a ticket request and the event is written only on the DC that answered.
For a picture of where this event comes from, the Field Map figure A remote login leaves two records plays one login end to end: 4769 on the domain controller that issued the ticket, and 4624 (a successful logon) on the server the user logged in to.
The fields on 4769 that matter:
TargetUserName in the event XML and in the queries below, in the form user@DOMAIN) — the user requesting the ticket (your prime suspect).ServiceName) — the service account the ticket is for (on failed requests it can hold the SPN string instead). Ends in $ for machine accounts (mostly benign noise).0x17 = RC4 (attacker-preferred), 0x12 = AES256, 0x11 = AES128.Status) — 0x0 = ticket issued; 0xE = no common encryption type (for example an RC4-only request the KDC refused). You only see failures if Failure auditing is on.IpAddress in the queries: the machine the request came from) — for context and pivoting. The address usually arrives as ::ffff:10.x.x.x.You can’t tune a detection against an attack you’ve never seen. Atomic Red Team (Red Canary’s open-source library of small scripted tests, each mapped to one ATT&CK technique and each called an “atomic”) runs the technique safely so you get real, labeled telemetry.
Why emulate before writing the rule. It is test-driven development for detections: the emulated attack is the failing test. Without it you are writing the rule against your idea of what the attack logs, and the usual bugs (a field that is named differently in your SIEM, an audit setting that is off, a value in an unexpected format) all produce the same symptom: a rule that never fires, which is indistinguishable from a network with no attackers. Running the technique first gives you events you know are malicious, from an account and at a time you chose (that is what “labeled” means), so every later stage can be checked against them. The atomics imitate the tools real intruders use for this step: Rubeus (a C# Kerberos toolkit), Invoke-Kerberoast (a PowerShell script) and Impacket (a Python toolkit that speaks Windows protocols from a non-Windows machine). All three do the same thing: ask the KDC for service tickets and write them out in a format a password cracker accepts.
Lab prerequisite. A fresh lab domain has nothing to roast: the only SPNs belong to machine accounts and krbtgt (the KDC’s own account), which every rule below filters out. Create about fifteen lab service accounts (ordinary user objects), register an SPN on each with setspn -S (the built-in command that attaches an SPN to an account), and set msDS-SupportedEncryptionTypes to RC4 only (0x4) on at least ten of them to reproduce the legacy case (see the 2026 note in Stage 01). Ten matters because the v3 rule in Stage 06 counts distinct RC4-ticketed service accounts against a threshold of 10. RC4 only matters because the KDC issues the strongest type that both the client and the service account support, so an account that lists AES as well gets an AES ticket from these PowerShell atomics. Leave the rest at the default so you also see the AES case. Give them long random passwords; you are generating telemetry, not practicing cracking.
IEX (IWR 'https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1' -UseBasicParsing) Install-AtomicRedTeam -getAtomics
# See what's available and its prerequisites Invoke-AtomicTest T1558.003 -ShowDetailsBrief # Install prereqs (e.g., downloads Rubeus for the tool-based test) Invoke-AtomicTest T1558.003 -GetPrereqs # The T1558.003 atomics (checked Sept 2026 — numbering drifts, so run by name): # 1 Request for service tickets (downloads Invoke-Kerberoast at run time) # 2 Rubeus kerberoast # 3 Extract all accounts in use as SPN using setspn (LDAP lookup only: no 4769) # 4 Request A Single Ticket via PowerShell (KerberosRequestorSecurityToken) # 5 Request All Tickets via PowerShell (the "roast everything" case) # 6 WinPwn - Kerberoasting (downloads WinPwn at run time) # 7 WinPwn - PowerSharpPack - Kerberoasting Using Rubeus Invoke-AtomicTest T1558.003 -TestNames "Request A Single Ticket via PowerShell","Request All Tickets via PowerShell" # Clean up afterwards Invoke-AtomicTest T1558.003 -Cleanup
Test numbers/contents change over time — -ShowDetailsBrief shows the current set, or read the atomic definition. “Request A Single Ticket via PowerShell” is what a careful attacker does; “Request All Tickets via PowerShell” sprays every SPN, which is also what Invoke-Kerberoast and Rubeus do (the “Request for service tickets” and “Rubeus kerberoast” atomics) — you want telemetry for both, because they need different detections: the spray can be caught by counting, the single request cannot. Two cautions: the single-ticket atomic as shipped asks for the domain controller’s own HTTP/ SPN, a machine account that the $ filter below drops, so for the single-ticket case request a ticket for one of your lab service accounts (or the honeytoken from Stage 06) instead; and “Request for service tickets” and the two WinPwn atomics download offensive scripts from GitHub at run time, so keep them to an isolated lab.
Start simple, then let reality punish you. This is the version every beginner writes.
The rule is written in Sigma, an open, vendor-neutral YAML format for log detections: logsource names the log to search and detection lists the field values to match. A converter then compiles it into the query language of whichever SIEM you run, so one rule file serves many back ends.
title: Kerberoasting - RC4 Service Ticket Requested (naive)
logsource: {product: windows, service: security}
detection:
selection:
EventID: 4769
TicketEncryptionType: '0x17'
condition: selection
level: lowIt will fire on the atomic test. In any estate that still allows RC4, which until 2026 meant nearly all of them, it will also fire hundreds or thousands of times a day on legitimate RC4 traffic — old apps, printers, non-AES clients. The arithmetic is what sinks it: a domain issues service tickets all day for every user and every service, while real Kerberoasting happens a handful of times in years, so a rule keyed on a property the attack shares with ordinary traffic produces alerts that are, to a rounding error, all false. As a production alert this is a pager that never stops, and a pager that never stops gets muted, taking the one real hit with it. (In a fully AES-only estate the same rule falls nearly silent and becomes useful again; v4 in Stage 06 comes back to that.) That’s the point: detection is an iteration problem, not a one-shot.
Confirm the true positive before you fight the false positives. If the rule doesn’t catch your own emulation, nothing else matters.
The queries from here on are written for Microsoft Sentinel, Microsoft’s cloud SIEM. Its query language, KQL (Kusto Query Language), is a pipeline read top to bottom: each | stage filters or reshapes the rows from the stage before, like Unix pipes over a table. SecurityEvent is the table where Windows Security-log events land, one row per event, with the event’s raw XML in the EventData column. Any SIEM can express the same logic; only the syntax changes.
SecurityEvent
| where TimeGenerated > ago(1h)
| where EventID == 4769
// SecurityEvent has no TicketEncryptionType column: pull it out of EventData
| parse EventData with * 'TicketEncryptionType">' TicketEncryptionType '<' *
| parse EventData with * 'Status">' Status '<' *
| where Status == "0x0" and TicketEncryptionType == "0x17"
| where ServiceName !endswith "$" and ServiceName !~ "krbtgt"
| summarize tickets = count(), svcAccounts = dcount(ServiceName),
svcList = make_set(ServiceName, 25)
by TargetUserName, IpAddress
| order by svcAccounts descIf you collect through the newer WindowsEvent table (fed by the Azure Monitor Agent, AMA, or by Windows Event Forwarding, WEF), the same values are under EventData.TicketEncryptionType. No rows on a patched DC? Check that your lab accounts are explicitly set to RC4 only (Stage 03), or drop the 0x17 condition to see the AES tickets.
You should see your test account requesting RC4 tickets — one service account for the single-ticket test, many for “Request All Tickets”. That row is your labeled true positive: the shape the detection must catch and the false positives (FPs) must not look like.
Move from “any RC4 event” to “the behavior of roasting,” cutting false positives at each step. This iteration is what detection engineering actually is.
Any 4769 with RC4
Precision ≈ 0. Every legacy RC4 negotiation alerts. Unshippable.
Filter the obvious noise
Exclude machine accounts (ServiceName ending $), krbtgt, and failed requests. Resist the popular trick of pinning TicketOptions 0x40810000, a flag combination that older write-ups treat as a roasting-tool fingerprint: normal Windows clients send that value too, and other tooling sends different ones (the Impacket toolkit uses 0x40810010), so the pin only loses recall: it lets real attacks through without removing any noise. Keep it as an enrichment field. Better — but RC4-heavy shops still drown.
Detect the behavior, not the event
The key move. Aggregate: alert when one account requests RC4 tickets for many distinct service accounts in a short window. That’s the “roast everything” pattern (Request All Tickets / Rubeus / Invoke-Kerberoast) and it looks nothing like normal use. Why count per requesting account: a legitimate user or application asks for tickets to the few services it actually uses, and asks for the same ones again tomorrow. A roaster does not know in advance which service account has the weak password, so it asks for all of them. The number of distinct service accounts per requester is the one figure that separates the two, and it holds whatever tool was used, because it measures the attacker’s goal rather than a tool’s habits.
Enrich & allowlist
Allowlist the benign sources you actually find: monitoring, backup, or application servers that legitimately touch many service-account-backed services (a SQL fleet), authorized assessment tools, and breach-and-attack-simulation (BAS) agents, products that replay attack techniques on a schedule to test defenses. Allowlist by account and source host, never by account alone, and review the list. Every allowlist entry is a hole in the detection: an entry keyed on the account alone means anyone who compromises that account can roast from any machine without an alert. Raise severity when the source host isn’t an admin workstation. In an AES-only estate — the default on patched DCs since 2026 — invert the logic: any successful RC4 ticket for a user SPN is suspicious on its own, and the volume rule should drop the encryption-type condition entirely.
let window = 10m;
let svcThreshold = 10; // tune to your environment's baseline
SecurityEvent
| where EventID == 4769
| parse EventData with * 'TicketEncryptionType">' TicketEncryptionType '<' *
| parse EventData with * 'Status">' Status '<' *
| where Status == "0x0" // tickets actually issued
| where TicketEncryptionType == "0x17" // RC4; remove this line in an AES-only estate
| where ServiceName !endswith "$" and ServiceName !~ "krbtgt"
| where TargetUserName !contains "$@" // ignore machine accounts as requesters
| summarize distinctSvcAccounts = dcount(ServiceName),
services = make_set(ServiceName, 30),
firstSeen = min(TimeGenerated)
by TargetUserName, IpAddress, bin(TimeGenerated, window)
| where distinctSvcAccounts >= svcThreshold
| project firstSeen, TargetUserName, IpAddress, distinctSvcAccounts, servicesSigma expresses this with a correlation rule, a second rule that matches no events itself but counts, or puts in sequence, the matches of another rule over a time window (type: value_count on field: ServiceName, group-by: TargetUserName, timespan: 10m, condition: gte: 10) that references the base 4769 rule — same idea, SIEM-portable. Fixed bin() windows are an approximation: a burst that straddles a boundary is split in two, so schedule the rule every 5 minutes over a 10-minute lookback. The threshold is a dial: too low re-floods, too high misses a careful attacker. Baseline your own 4769 volume to set it: run the query without the final threshold line over a few weeks of normal traffic, look at the highest per-account counts that turn out to be benign, and set the threshold just above them.
Advanced move — deception
Create a decoy service account with a tempting name (svc-sql-admin), a real SPN, and no legitimate use. Give it a 30+ character random password and no real privileges (it only has to look valuable: the name, a plausible description, an aged password date) — a weak-password decoy called “admin” is a genuine liability. Nobody should ever request its ticket, so alert on any 4769 for it, whatever the encryption type or ticket options. That is a near-zero-false-positive alert, and it catches the careful single-ticket attacker that volume rules miss. The hits you will see come from authorized roasting tools: benign true positives (the rule was right that roasting happened; the roasting was permitted), not rule failures. This kind of decoy is called a honeytoken, and a honeytoken beats a threshold for a structural reason: a threshold is a guess about how fast the attacker will go, and the attacker controls the speed. The decoy has no legitimate traffic at all, so there is nothing to tune and one event is enough; and since a well-made decoy looks like any other service account in the directory, the attacker learns which one was the trap only by requesting its ticket, which is the act that gets logged.
“Good enough” is a number, not a vibe. Define acceptance before you deploy.
Write the acceptance criteria down: “Fires on Rubeus, on Request All Tickets, and on the honeytoken; ≤ 5 benign alerts/week in prod, each with a known cause.” If it misses, iterate — that’s the loop, not a failure.
A detection nobody can understand or respond to is noise. The Alerting & Detection Strategy (ADS) format, a template that Palantir’s security team published openly, makes it usable and maintainable: a fixed set of headings that every detection must fill in before it ships, so that the analyst woken by the alert knows what it means, what it cannot see, and what to do next.
0x17 in legacy estates; any encryption type where AES-only is enforced) for many distinct non-machine service accounts in a short window, plus a honeytoken SPN for the single-ticket case.Response playbook — when it fires
1) Identify the requesting account + source host; confirm it isn’t an allowlisted scanner. 2) List the targeted SPN accounts — treat their passwords as compromised: the cracking happens offline where you cannot see it, so you cannot know which ones fell. 3) Reset those service-account passwords (long/random, or migrate to gMSA). 4) Investigate the requesting account for prior compromise (initial access). 5) Hunt for follow-on authentication using any cracked credential (lateral movement).
A detection isn’t “done.” Attackers adapt, your environment drifts, and rules decay. Plan for it.
0x12/0x11 tickets instead of RC4 — slipping past the 0x17 filter — and since the 2026 hardening that is the only option against most accounts. Counter: baseline anomalous TGS volume regardless of encryption type, and alert on RC4 downgrade attempts (a client that offers only RC4, hoping to be handed the weaker ticket) against accounts that do support AES: compare the 4769 MSDS-SupportedEncryptionTypes and Advertized Etypes fields, and watch for bursts of 0xE failures from one client.And then the loop closes: the AES blind spot is a new hypothesis — back to Stage 01 for the next detection.
Kerberoasting is a Windows/AD example, but the loop is identical for the cloud and identity detections in the codex — the surface just changes:
Emulate with the cloud-native equivalents (Stratus Red Team for AWS, Azure, GCP, Kubernetes and Entra ID; Leonidas, a similar AWS-only toolkit; or Atomic Red Team’s own cloud atomics) instead of the Windows atomics used here. Author against CloudTrail (the AWS audit log of every API call) or the Entra ID sign-in and audit logs (Entra ID is Microsoft’s cloud identity service) instead of 4769. Tune the same way — the MFA-fatigue and OAuth-consent rules in card 06 and card 13 are exactly a v1→v3 journey from “any failed MFA” to “denials-then-success from a new device.” The honeytoken idea becomes a canary IAM key (a cloud access key that nothing legitimate ever uses) or a decoy S3 bucket whose access is always malicious.
Master this one loop and you can build — and, more importantly, critique — any detection rule in this codex. Its offensive mirror, the red/purple loop, is the deep dive in card 12.
References: MITRE ATT&CK T1558.003 · Atomic Red Team T1558.003 · Palantir ADS Framework · Stratus Red Team (cloud emulation) · Microsoft KB5073381: Kerberos RC4 changes (CVE-2026-20833) · Microsoft: detect and remediate RC4 in Kerberos · Microsoft Sentinel: Potential Kerberoasting rule. Emulation is for authorized lab use only.
On the Field Map’s loop, this deep dive spans stages 06–07, Emulate → Find the gap.
The mirror of the detection lifecycle in card 10: how an authorized red team emulates a real adversary and evades detection — and how every move feeds back into better blue-team detections. This is purple teaming: the offense exists to find the gaps, and the gaps become the next detection. Evasion here is shown as concept plus counter — what the operator does and why, and the telemetry it leaves for the defender.
Framing. Everything here describes authorized testing against systems you own or are contracted to assess. The methodology, tools, and evasion concepts are the ones taught in red-team training and threat-hunting courses — kept at the level that builds understanding and detection, not an operational attack manual. The one line that separates this profession from a crime is Stage 01.
New to this? Read this first
Blue team defends; red team attacks with permission to test the defense; purple team is the two working together in one room. Adversary emulation means faithfully copying the behavior of a specific real threat actor, so you test the defenses against what you actually face, not a generic checklist. Everything here is authorized testing against systems you own or are contracted to assess (Stage 01). If a term is unfamiliar, the Field Map foundations and its disciplines section explain the roles and tools.
Vocabulary you will need. TTPs (tactics, techniques and procedures) are an attacker’s habits: what they are after, the methods they use, and the exact way they carry them out. ATT&CK is MITRE’s public catalog of those techniques, each with an ID such as T1566. A payload is the code an attacker wants to run on a victim machine; an implant is a payload that stays resident and periodically calls home to the operator’s C2 (command-and-control) server for instructions. On the defending side, EDR (endpoint detection and response) is the agent installed on every workstation and server that records what processes do (starts, file writes, network connections, memory operations) and alerts or blocks on suspicious behavior; it displaced signature antivirus (AV), which only compared files against known-bad patterns. One operating-system fact underlies Stage 05: code runs either in user mode (ordinary processes, which can rewrite their own memory but not the system’s) or in the kernel (the OS core and its drivers, which can see and change everything). Much of evasion and counter-evasion is a contest over which side of that boundary the sensor sits on.
The tradecraft is identical to a criminal’s. The only thing that makes it a profession is written permission and disciplined scope.
Before a single packet is sent, a red team has a signed Rules of Engagement (RoE): what’s in scope (the exact networks, systems and accounts the team may attack), what’s explicitly off-limits (production databases, safety systems, third-party assets), the testing window, emergency contacts, and a “get-out-of-jail” authorization letter the operators carry. There’s a deconfliction channel so if the blue team spots the activity and can’t tell it’s the test, someone can confirm before a real incident response spins up. It protects in both directions: it stops a real incident response from burning a weekend on a drill, and it stops defenders from waving off a genuine intruder as “probably the red team”.
This isn’t bureaucracy — it’s the whole ballgame. An operator without authorization is a criminal; with it, they’re the most valuable input the defense has. For you as a builder: any emulation you run belongs in an isolated lab or an explicitly authorized test environment, never against systems you don’t own.
“Red teaming” in the mature sense isn’t random hacking. The most disciplined form is adversary emulation: faithfully reproducing the TTPs (tactics, techniques and procedures: the documented habits) of a specific, relevant threat actor.
Four words people mix up. A pentest finds as many vulnerabilities as it can in a scoped target, usually announced. A red team engagement is objective-based and usually covert, testing detection and response (people, process, technology). Adversary emulation is a red- or purple-team exercise constrained to one real actor’s documented TTPs. Simulation (breach-and-attack simulation, BAS) is automated, repeatable execution of technique test cases with no human operator.
You choose based on threat intelligence (reporting from government agencies, security vendors and industry sharing groups on who attacks whom, and how): which groups actually target your sector? A bank emulates a financially-motivated ransomware crew; a defense contractor emulates a nation-state APT (advanced persistent threat: a patient, well-funded, usually government-backed group). You then pull that actor’s documented behaviors from ATT&CK and public reporting — MITRE’s Center for Threat-Informed Defense maintains the Adversary Emulation Library, with ready-made emulation plans (APT29, FIN6, menuPass, Sandworm, and more) that lay out the real sequence of techniques the group uses.
The goal is realism: if you test against techniques your actual adversary never uses, you’ve validated the wrong things: detection effort is finite, and every hour spent on a technique nobody will use against you is an hour not spent on one they will. Emulation makes the exercise threat-informed rather than a generic pentest.
Turn the chosen actor into an ordered chain of ATT&CK techniques — the same map the blue side uses, read in the other direction.
The emulation plan sequences techniques across the kill chain (the ordered phases of an intrusion, from getting in to doing damage): initial access (say, T1566 phishing) → execution → persistence → privilege escalation → credential access (e.g. T1558.003 Kerberoasting — the very technique whose detection is built in card 10’s deep dive) → lateral movement → collection → exfiltration or impact. Each step lists the technique, the tool, the expected artifact (the log event, file or network trace it should leave behind), and — crucially for purple — the detection it should trigger.
That last column is what turns an attack plan into a test plan: every emulated step is a hypothesis about whether the defense will notice. Without that column, an undetected step teaches nothing, because nobody wrote down what should have happened.
The same emulation frameworks the defender used in card 10’s blue loop, now driving a full chain. These are purpose-built testing tools, not malware. The C2 frameworks are the exception that proves the rule: cracked copies of Cobalt Strike, and the open-source Sliver, are heavily abused by real intruders, which is why blue teams hunt for them by default and why the deconfliction channel from Stage 01 matters.
# Caldera runs an "adversary profile" (an ordered set of ATT&CK abilities) # against agents you've deployed on YOUR OWN test hosts. # 1. Deploy the Sandcat agent (the default Caldera agent) on a lab host # 2. Pick or build an adversary profile (e.g., "Discovery + Cred Access") # 3. Run the operation; Caldera executes each ability and logs results # Everything is scoped to lab agents you control.
# Purple-team tool by Datadog for validating cloud detections. stratus detonate aws.credential-access.ec2-steal-instance-credentials # ...run your detection check (see the Capital One card / CloudTrail rule)... stratus cleanup aws.credential-access.ec2-steal-instance-credentials
Notice these are the same tools a defender runs to test coverage — that overlap is purple teaming. The offensive and defensive uses of adversary emulation are the same activity viewed from two chairs.
Why operators evade, the categories they use, and — the whole reason this matters to you — the telemetry each one leaves for blue. Understanding the evasion is the detection.
Why
Scramble/encode a payload so static, signature-based AV won’t recognize it. A signature is a byte pattern taken from a known-bad file. A packer compresses or encrypts the program and wraps it in a small stub that unpacks it at run time, so the bytes on disk change completely while the behavior stays the same, and re-packing yields a never-seen file for every target.
Counter
Behavioral detection, not signatures: what the code does at runtime, plus entropy/anomaly analysis. Packing changes what the file looks like, not what it must do once unpacked (start processes, touch credentials, open connections), and those actions are what EDR records. The disguise is also a tell: encrypted or compressed content is statistically random (high entropy), which ordinary programs are not. This is why EDR beat AV.
Why
Run code in memory so nothing malicious touches disk for a scanner to find. File scanning is triggered when a file is written or opened; code that arrives over the network and is loaded straight into a running process never produces that trigger.
Counter
Suspicious memory allocations, script-block logging, AMSI, and parent-child process anomalies surface the activity anyway. The code still has to live somewhere and be started by something. Executable memory that corresponds to no file on disk is rare in normal software, and EDRs look for it. PowerShell’s script-block logging (Event 4104) records a script’s text after it has been decoded, just before it runs. AMSI (the Antimalware Scan Interface) hands that same decoded text to the antimalware engine for a verdict. And the process tree gives the delivery away: a word processor starting a shell is not normal.
Why
Blind the Windows telemetry sources (Antimalware Scan Interface, Event Tracing) that EDR relies on. ETW (Event Tracing for Windows) is the operating system’s built-in high-volume logging bus, which EDR sensors subscribe to. AMSI, much of ETW, and an EDR’s user-mode hooks (small patches the EDR places on sensitive system functions inside every process, so that it sees them being called) all live in the memory of the process being watched. Code already running in that process can overwrite them, the way a program can monkey-patch a library it has loaded: a sensor inside the attacker’s own process is advisory, not enforced.
Counter
User-mode tampering cannot reach kernel-sourced telemetry, because the kernel is a separate privilege boundary that an ordinary process cannot write to: the Threat-Intelligence ETW provider (readable only by protected anti-malware processes), kernel callbacks (functions the EDR’s driver registers so that the kernel itself notifies it of every process start, module load and handle request), and call-stack capture (recording which code issued each sensitive call, so a call that comes from memory backed by no file stands out). EDRs also integrity-check amsi.dll and ntdll (the system library through which every Windows process enters the kernel, and where the user-mode hooks live) in memory, flag memory-protection changes on those modules, catch the bypass script itself through AMSI before it runs, and alert when a process or host suddenly goes quiet (sensor-health monitoring). Without those, in-process patching is silent, which is exactly why it is worth emulating.
Why
Use trusted built-in tools (PowerShell, WMI, certutil: a certificate utility that can also download and decode files) so nothing looks foreign. These LOLBins (living-off-the-land binaries) are signed by Microsoft, present on every machine and used by administrators every day, so application allowlists trust them, no signature flags them, and blocking them outright would break IT.
Counter
Baseline normal use of those binaries; alert on anomalous command lines and unusual parent processes — the approach this card’s defense section takes to Conti. The binary is trusted but the usage is not: an administrator’s PowerShell is started from a console or a management agent and runs known scripts, while an intruder’s is started by an Office document or a web server and carries an encoded command or a download. Who launched it, with what arguments, on which machine, is the signal.
Why
Make beacon traffic blend in — sleep/jitter, HTTPS, mimicking real services — to defeat network detection. The implant checks in with its server on a timer. Wrapping the check-in in ordinary HTTPS hides the content, randomizing the interval (jitter) hides the clockwork, and imitating a well-known web service’s URLs and headers hides the purpose.
Counter
NDR (network detection and response: sensors that analyze traffic metadata rather than host logs) beacon analysis (regular call-home timing), TLS fingerprinting (JA4/JA4S and JARM: a fingerprint is a hash of the unencrypted handshake parameters, which identifies the software that opened the connection whatever it carries inside; JA4 covers the client’s hello, JA4S the server’s reply, and JARM actively probes a server and fingerprints its answers. The older JA3 is degraded by browsers randomizing their TLS extensions, and C2 that uses the Windows TLS stack shares its client fingerprint with legitimate apps, so pair client and server fingerprints), and rare-destination scoring catch the pattern under the disguise. Jitter randomizes each gap, but over hours the check-ins stay smaller, more regular and longer-lived than human browsing, and they go to a destination almost no other machine in the company talks to.
Why
Spread actions over days to stay under volume thresholds (exactly the Kerberoasting evasion). A volume rule fires only when a count crosses a threshold inside one time window; stretch the same actions across enough windows and no single window ever holds enough of them.
Counter
Long-window baselining and honeytokens that need no threshold — one touch of a decoy is enough. Longer windows cost more to compute and let in more benign activity, so they only go so far; a decoy (an account or credential with no legitimate use) sidesteps counting altogether, because its benign rate is zero.
Why
Load a signed-but-flawed driver to disable EDR from the kernel (a move Scattered Spider, many ransomware crews and state actors have all used). BYOVD is “bring your own vulnerable driver”. Windows loads kernel drivers only if they carry a valid signature, so instead of writing one, an intruder who is already administrator on the machine installs a legitimate vendor’s old driver that has a known bug, and uses the bug to act with kernel privileges: the one place from which an EDR’s kernel callbacks can be removed or its process killed.
Counter
HVCI / memory integrity (hypervisor-protected code integrity: the hypervisor, a layer beneath the kernel, enforces that only approved, signed code runs in kernel mode) plus Microsoft’s vulnerable-driver blocklist (on by default since Windows 11 22H2, but it lags newly abused drivers), the attack-surface-reduction (ASR) rule that stops applications writing known-vulnerable signed drivers to disk (ASR rules are Microsoft Defender policy switches that each block one risky behavior; this one does not stop a driver already present from loading, which is the blocklist’s job), alerting on new or rare kernel-driver loads (Sysmon Event 6 or EDR driver-load events; Sysmon is Microsoft’s free add-on service that writes detailed process, network and driver-load events to the Windows event log), and sudden EDR sensor silence. The logic: the driver has to be loaded before it can be abused, servers load new kernel drivers very rarely, and an agent that was reporting a minute ago and has gone quiet is an event the EDR’s cloud side can still alert on.
The pattern
Every evasion trades one kind of visibility for another. Kill the disk artifact and you create a memory artifact; blind AMSI and a defender with kernel telemetry or sensor-health monitoring sees the blinding; shape the C2 traffic and the shaping has a signature. Almost no move is silent everywhere — most are just moves the defender isn’t watching for yet. The rare ones that leave no collectable trace (the codex’s Heartbleed case, card 30) are answered with prevention, not detection. A red teamer’s successful evasion is simply the blue team’s next detection hypothesis.
The difference between a red team that dunks on the blue team and one that makes the org safer is this stage.
In a purple-team exercise, red and blue are in the same room. Red announces “I’m about to run T1558.003 now,” executes it, and blue immediately checks: did the detection fire? Announcing the step removes the ambiguity a covert test leaves behind: blue knows the exact minute, host and account, so a missing alert can only mean the detection failed. Three outcomes, each valuable:
This closes the two loops into one: the red team’s Stage 05 evasion is the input to the blue team’s Stage 01 hypothesis. That feedback is the entire point of purple teaming.
Emulation turns “are we secure?” into a measurable heatmap.
Map every technique you emulated onto an ATT&CK Navigator layer and color it by outcome. Navigator is MITRE’s free web tool that draws the ATT&CK matrix as a grid (tactics as columns, techniques as cells) and lets you color and score each cell; a saved coloring is a “layer”, a small JSON file in the same format as the attack-navigator-*.json coverage files that ship with this library. The three colors: detected, logged-but-no-alert, blind. The middle color matters: logged-but-no-alert means the telemetry already exists and the fix is only a rule, while blind means a new log source or sensor has to come first. The result is an honest coverage map (a heatmap of the matrix) — the blind cells are your prioritized detection backlog. Run it again next quarter and the map shows whether coverage actually improved. This is how a security program proves progress instead of asserting it.
The deliverable isn’t “we got domain admin” — it’s a prioritized, actionable path to a stronger defense.
A good report reads less like a trophy and more like a backlog. The findings become blue-team tickets and new detections — which the next emulation will re-test.
A once-a-year red team is a snapshot. Mature programs run the loop continuously.
Breach & Attack Simulation (BAS) tools automate the emulation on a schedule, so a broken log pipeline or a coverage regression surfaces in days, not at the next annual test. The manual red team then focuses on the creative, novel attack paths automation can’t imagine. Combined, they keep the coverage map honest as the environment and the threat landscape drift — and every new adversary technique in the wild becomes the next Stage 02.
You now have both halves and they interlock into one cycle: red emulates and evades → the gap is found → blue hypothesizes and builds the detection → red re-tests → coverage improves → repeat. Neither side is complete alone; the value is in the handshake.
The blue half of this cycle is built end to end in card 10’s deep dive; the zoomed-out view of who does this work is the Field Map.
That is the fluency this codex is for: not just following what a researcher does, but understanding why from both chairs — and knowing where the offense and defense meet. When you sit next to one on a real case, you’ll be able to keep up, and to ask the question that matters: “what would this miss, and how would we catch it?”
References: CTID Adversary Emulation Library · Apache Caldera · Stratus Red Team · Atomic Red Team · Microsoft vulnerable-driver blocklist. All emulation is for authorized testing only.