agentleFS
Bizaza-devsBizaza-devs/Claude-PurpleTeam/skills/adversary-emulation-planning/SKILL.md

adversary-emulation-planning

Skill0 starsChanged 4 days agoMITView on GitHub

Turn threat intelligence into an authorised, safe purple-team test plan. Covers picking relevant threats (sector reporting, CISA joint advisories, vendor reports, own incidents), extracting TTPs to MITRE ATT&CK with TRAM-style assisted mapping and confidence levels, prioritising by prevalence, impact and current coverage from /coverage, CTID Adversary Emulation Library full and micro emulation plans, choosing the executor per technique (Atomic Red Team, Caldera, Stratus Red Team), the test-case card, rules of engagement and authorisation fields, lab design with snapshot-able VMs and test AD such as GOAD, and the SOC deconfliction plan. Use when asked to plan a purple exercise, emulate a threat actor or advisory, build test cards from a report, or /exercise.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not for: building new attack tooling, testing systems you are not responsible for, or production testing without the gate below.

    line 25
  2. Very specific:

    Published procedures only: Every card references Atomic Red Team tests, Caldera abilities or adversary profiles, Stratus Red Team …

    line 34
  3. Distinctive:

    Every TTP has a source and a confidence: No technique enters the plan without the report name, date, the passage it came from and a …

    line 41
  4. Very specific:

    No defence evasion for its own sake: No card disables, blinds or excludes EDR/AV/logging.

    line 46
  5. Distinctive:

    Read the report end to end, then map sentence by sentence.

    line 94
  6. Distinctive:

    Follow CISA's "Best Practices for MITRE ATT&CK Mapping": map the behaviour described, to the most specific sub-technique the text supports.

    line 98
  7. Distinctive:

    Prefer the executor whose telemetry is easiest to separate from the harness.

    line 166
  8. Distinctive:

    Promotion to production: only for cards that ran cleanly in the lab with verified cleanup, and only if the RoE covers production.

    line 242
  9. Distinctive:

    Tagging: every execution log line has test ID, UTC start/end, host, account and operator.

    line 249
  10. Very specific:

    No suppression: do not mute rules or close alerts as "purple" in bulk.

    line 256
  11. Distinctive:

    Stand-down: after the window, the white cell confirms every alert raised is linked to a test ID or escalated.

    line 258

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adversary emulation planning

From "this actor matters to us" to a signed plan of test cards that an operator can run and a SOC can score. The plan lives in the exercise folder created by scripts/new-exercise.ps1 / scripts/new-exercise.sh (roe.md, plan.md, results.csv, findings.md, scorecard.md, evidence/). The operating model (lifecycle, roles, outcome scale, metrics) is in purpleteam-methodology; recording and scoring is in purple-exercise-tracking. For a single rule or technique, purple-team-validation (/purple) is the shorter path.

When to use

  • A threat-intel report, CISA advisory or own incident should be replayed as tests: "emulate the TTPs from this advisory", "are we ready for actor X?".
  • Planning the next quarterly or threat-driven exercise (/exercise).
  • Turning coverage gaps from /coverage into concrete test cards.
  • Writing rules of engagement, an authorisation request, a lab design or a deconfliction plan for an emulation window.

Not for: building new attack tooling, testing systems you are not responsible for, or production testing without the gate below.

Ground rules

Scope gate (opens every plan). Targets are a lab, or production under a written authorisation plus change ticket naming systems, techniques, time window and an abort contact. A plan without this is a draft, and no card in it runs.

  1. Published procedures only. Every card references Atomic Red Team tests, Caldera abilities or adversary profiles, Stratus Red Team techniques, CTID Adversary Emulation Library steps or vendor BAS content, by ATT&CK ID and test name/number/GUID, with the project version pinned. The operator confirms the local index (Invoke-AtomicTest T#### -ShowDetailsBrief, stratus list). No new exploit code, malware, droppers or payloads, and no long command lines from outside those projects.
  2. Every TTP has a source and a confidence. No technique enters the plan without the report name, date, the passage it came from and a confidence level. Vendor "TTP lists" without procedure detail are low confidence.
  3. Expected before executed. Each card states expected telemetry, expected detection and pass criteria before approval; the approver signs the cards.
  4. No defence evasion for its own sake. No card disables, blinds or excludes EDR/AV/logging. If the actor used defence evasion, emulate it only with a published procedure in the lab, and score a block as blocked.
  5. Destructive and data-exposing techniques are lab-only (inhibit recovery, encryption for impact, wiping, real credential dumping to disk, exfiltration outside the organisation).
  6. Every card ends in a defensive artefact: expected detection (sibling detect/hunt skill), observed result, and for a gap a hand-off to detection-engineering, logging-coverage or a hardening skill.

Workflow

  1. Scaffold the exercise folder (scripts/new-exercise.ps1 or .sh).
  2. Pick threats (table below); write two sentences on why each matters to this organisation (sector, geography, technology, observed activity).
  3. Extract TTPs from each source to ATT&CK at procedure level, with confidence, into a mapping table.
  4. Merge and deduplicate across sources; note where several actors share a technique (prevalence).
  5. Pull current coverage with /coverage (detections per technique, data sources from logging-coverage, last test results).
  6. Prioritise with the matrix below; cut to what fits the window.
  7. Pick a procedure and executor per technique; prefer a CTID plan step where one exists for the actor.
  8. Write test cards into plan.md; peer-review with the detection engineer and system owner.
  9. Write roe.md (rules of engagement and authorisation fields), the lab design and the deconfliction plan; get signatures and the change ticket.
  10. Dry-run in the lab, fix prerequisites and cleanup, then hand to /emulate card by card.

Picking threats

SourceWhat it givesWatch out for
Sector ISAC / national CERT reportingActors and campaigns hitting peersOften summary-level; ask for technical annexes
CISA and partner joint cybersecurity advisoriesTechnique tables mapped to ATT&CK, detection and mitigation adviceMapping granularity varies; read the narrative, not only the table
Vendor threat reports (EDR, IR firms, cloud providers)Procedure detail, command patterns, toolingVendor naming differs; map to ATT&CK Groups entries where possible
ATT&CK Groups and Software pagesCurated technique lists with cited procedure examplesLists accumulate over years; check the cited dates
Own incidents and post-incident reviews (post-incident-review)Exactly what got through hereHighest relevance; replay first
Red-team / pentest findingsPaths that worked in this estateConvert findings to techniques and published procedures
Threat intel platform (threat-intel-ioc)Sightings, actor profilesIOCs are not TTPs; do not plan around hashes

Rule of thumb: one to three threats per exercise. A plan that tries to emulate "all ransomware" tests nothing well.

Extracting TTPs to ATT&CK

  • Read the report end to end, then map sentence by sentence. CTID's TRAM (Threat Report ATT&CK Mapper) can suggest technique matches for report text; CISA's Decider walks an analyst to a technique by questions. Both are assistants: an analyst accepts or rejects every suggestion.
  • Follow CISA's "Best Practices for MITRE ATT&CK Mapping": map the behaviour described, to the most specific sub-technique the text supports; do not infer techniques the report does not describe.
  • Capture the procedure, not only the technique ID: "scheduled task created via schtasks for persistence on servers" drives a different test than T1053.005 alone.
  • Chain order matters for chained emulation; CTID Attack Flow can model the sequence.

Mapping table (plan.md, section "TTP mapping"):

Source (name, date)Passage (paraphrase or short quote)TechniqueProcedure notesConfidenceMapped by / reviewed by
<advisory name, date><what the actor did>T1053.005schtasks, SYSTEM, server targetsHigh<analyst> / <reviewer>
ConfidenceCriteria
HighProcedure described explicitly (tool, command pattern, artefact, target), or observed in own incident
MediumBehaviour described, technique clear, procedure detail missing
LowTechnique named without behaviour, listed in a table only, or inferred from a tool's capability

Low-confidence techniques may be tested, but say so in the report; they do not justify priority on their own.

Prioritising

Score each candidate technique 1-3 on each axis; sum, then sort. Adjust weights locally and write them in plan.md.

Axis123
PrevalenceOne source, one actorSeveral sources or actorsCommon across relevant actors and own incidents
Impact / positionLate, low-impact step with other chances to catchMid-chain enablerChoke point many intrusions pass through, or reaches crown jewels
Coverage gap (/coverage)Tested recently and alertedDetection exists, untested or staleNo detection, or data source missing
TestabilityLab-only, heavy prerequisitesPublished test with prerequisitesPublished test, clean cleanup, lab ready
ConfidenceLowMediumHigh

CTID's Top ATT&CK Techniques work uses similar ideas (prevalence, choke points, actionability); cite it when explaining the method to management. Techniques with no data source (not seen expected) still go in: the finding is the log gap.

CTID Adversary Emulation Library

Plan typeContentUse it for
Full emulation plans (for example APT29, FIN6, FIN7, menuPass, Carbanak, Sandworm, Wizard Spider)Intelligence summary, operational flow, step-by-step procedures, often infrastructure assumptionsChained emulation in the lab when the actor is in your threat list
Micro emulation plans (for example web shells, process injection, named pipes, AD enumeration)Compound behaviours packaged as small, repeatable runsRegression and unit-style tests across many actors
  • Pin the library version (git commit) in plan.md; step numbers are the card reference ("plan <name>, step <n>").
  • Respect the plan's prerequisites and infrastructure assumptions; components such as C2 servers stand up inside the lab only.
  • Caldera's emu plugin can load CTID plans; see caldera-operations.
  • Where a plan step needs a procedure the bundle cannot run safely, keep the step as a tabletop card (not run with reason) rather than improvising.

Choosing the executor

SituationExecutorSkill
One endpoint technique, unit test, quick regressionAtomic Red Team (Invoke-AtomicTest)atomic-red-team
Chained sequence, adversary profile, scheduled repeat runs, CTID plan via emuMITRE Calderacaldera-operations
AWS, Azure, GCP or Kubernetes control-plane techniqueStratus Red Team (stratus list, warmup, detonate, cleanup)stratus-red-team-cloud
Windows endpoint chains (execution, persistence, credential access)Atomic and Caldera content composed per cardemulate-windows-endpoint
Active Directory and identity (Kerberos, directory enumeration, delegation)Published tests in a test domain, validated one detection at a timepurple-team-validation + hunt-ad-identity-attacks
Command and control, network discovery, exfiltration over the wirePublished procedures in an isolated networkemulate-network-c2-exfil
No published procedure existsNone: tabletop the step, or replay public sample logs (OTRF Security-Datasets, EVTX-ATTACK-SAMPLES) into a test index to test detection logicdetection-engineering

Prefer the executor whose telemetry is easiest to separate from the harness; note the harness artefacts (module load, agent beacon, remoting) on the card.

Test-case card

One card per procedure, in plan.md. The test ID is what the operator logs and what results.csv uses.

### <EX-ID>-T07 - T1053.005 Scheduled Task: create task for persistence
- Technique / tactic: T1053.005 / persistence, execution
- Threat link: <source name, date, mapping row>; confidence: High
- Priority score: 13 (prevalence 3, impact 2, gap 3, testability 3, confidence 2)
- Procedure source: Atomic Red Team T1053.005, test "<test name>" (GUID <auto_generated_guid>), atomics commit <sha>
  (operator confirms with: Invoke-AtomicTest T1053.005 -ShowDetailsBrief)
- Executor: atomic-red-team    Target: LAB-SRV19-02 (server build, prod EDR policy)
- Account: lab\pt-svc01 (test account, local admin on target only)
- Preconditions: snapshot <name> taken; -CheckPrereqs passes; EDR in block mode as prod; log forwarding verified
- Expected telemetry: Security 4698 (task created, if audit policy enabled); Sysmon 1 schtasks.exe with /create;
  Microsoft-Windows-TaskScheduler/Operational 106; DeviceProcessEvents / DeviceEvents (MDE) for the task creation
- Expected detection: "<rule name>" (see `hunt-windows-persistence` for the hunt query), severity Medium, entities host + account
- Pass criteria: outcome alerted (or blocked with alert) within <agreed minutes>; alert names the task and the account
- Cleanup: Invoke-AtomicTest T1053.005 -TestNames "<test name>" -Cleanup; verify task absent (schtasks /query); revert snapshot
- Abort if: task creation affects other tasks, service degradation, activity outside scope
- Owner: operator <name>; observer (SOC) <name>; detection owner <name>
- Gap hand-off: no telemetry -> `logging-coverage`; telemetry, no alert -> `detection-engineering`; prevention wanted -> `hardening-windows-ad`

Card review checklist: published reference with version, expected telemetry names real event IDs or tables available in this estate, expected detection names an existing rule (or "none, expected gap"), cleanup is the project's own step plus a verification, abort conditions present.

Rules of engagement and authorisation (roe.md)

FieldContent
Exercise ID and title<EX-ID>, threat(s) emulated
Sponsor and approverNames, roles; approver is not an operator
System ownersPer target system, with approval recorded
In scopeHosts, OUs, cloud accounts/subscriptions/projects, IP ranges, test accounts
Out of scopeProduction data, customer systems, third-party and SaaS services not owned, everything not listed
TechniquesCard list with ATT&CK IDs and procedure references (from plan.md)
Excluded techniquesDestructive and data-exposing procedures, lab-only list
Time windowStart/end with time zone; blackout dates (change freezes, peak business)
Notice typeAnnounced, or no-notice with SOC lead approval and named white cell
OperatorsNames, operator accounts, source hosts
CommunicationsExercise channel, white cell contact, escalation path
AbortAbort contact (name, phone), abort criteria, abort procedure (stop, cleanup, notify)
Change ticketNumber and approval status (production)
SafetySnapshot/backup confirmation, cleanup responsibility, baseline verification by system owner
Data handlingTest data only; evidence stored in evidence/, retention, access
ReportingWho receives results, by when, classification
SignaturesApprover, system owners, SOC lead, date

Lab design

  • Mirror production telemetry, not production data. Same OS builds, same EDR product and policy (block mode where production blocks), same audit policy and Sysmon config, same log forwarding to a test workspace/index or a tagged production pipeline. A lab with a different policy proves nothing.
  • Snapshot-able VMs (hypervisor snapshots or cloud images) with a named baseline snapshot per host; revert after each card or batch.
  • Test Active Directory built for the lab; intentionally vulnerable lab domains such as GOAD (Game of Active Directory) are for the lab only, never joined to, trusted by or routed to the corporate domain.
  • Cloud sandbox: dedicated accounts/subscriptions/projects under a separate organisational unit, with the same audit logging as production (CloudTrail, Azure Activity and Entra logs, GCP Cloud Audit Logs), budget alerts, no production credentials.
  • Network isolation with controlled, logged egress; any C2 or exfiltration receiver stays inside the lab.
  • Time sync (one NTP source) across lab, SIEM and operator hosts so the execution log lines up with telemetry.
  • Test identities with a naming convention (for example pt- prefix) and a registry of who owns them; disable them after the exercise.
  • Promotion to production only for cards that ran cleanly in the lab with verified cleanup, and only if the RoE covers production.

Deconfliction plan

  • Who knows: SOC lead always; for announced tests the on-shift analysts; for no-notice tests only the white cell, who holds the schedule.
  • Tagging: every execution log line has test ID, UTC start/end, host, account and operator; the white cell gets it in near real time.
  • Verification route: an analyst who sees suspicious activity asks the white cell through the agreed channel; the white cell answers "in scope: test ID" or "not ours". Until confirmed, it is worked as real.
  • Out-of-scope activity (other hosts, accounts, techniques, times) is a real incident: stop the exercise and hand to alert-triage / incident-response.
  • No suppression: do not mute rules or close alerts as "purple" in bulk; close each with the test ID so purple-exercise-tracking can link evidence.
  • Stand-down: after the window, the white cell confirms every alert raised is linked to a test ID or escalated.

False positives & benign look-alikes

SituationRiskHandling
Vendor report lists a technique without behaviourOver-weighting a low-confidence TTPMap as Low; test only if cheap; flag in report
Same activity under different vendor actor namesDuplicate cards, inflated prevalenceMerge via ATT&CK Groups associated names; count once
Tool capability mapped as actor behaviourTesting what the actor never didMap only behaviours described in use
Expected detection is a generic catch-all ruleCard passes without a specific detectionName the specific rule, or mark "expected gap"
Real alert during the window on an in-scope hostDismissed as the exerciseWhite cell confirms test ID before closing

Pitfalls

  • Planning around IOCs (hashes, domains) instead of behaviours; they are not tests of detection logic.
  • Choosing techniques because a test exists rather than because the threat uses them; testability is one axis, not the whole score.
  • Unpinned procedure versions: test numbers change between atomics releases, so retests silently run something else. Pin commits and prefer names/GUIDs.
  • Writing expected detection after the run.
  • A lab that differs from production in EDR policy or log pipeline.
  • Over-scoping the window; leave time for cleanup, observation and live tuning.
  • Forgetting harness telemetry (remoting, agent) and scoring it as detection.

Output

  • plan.md: threat rationale, TTP mapping table with confidence, prioritisation matrix with weights, pinned procedure versions, and the test cards.
  • roe.md: rules of engagement and authorisation fields, signed; change ticket reference for production.
  • Lab design notes and the deconfliction plan (white cell, channel, tagging).
  • Hand-offs: /emulate and the executor skills (atomic-red-team, caldera-operations, stratus-red-team-cloud, emulate-windows-endpoint, emulate-network-c2-exfil) to run cards; purple-exercise-tracking and /scorecard to record and score; detection-engineering and logging-coverage for expected gaps; purpleteam-methodology for the lifecycle and roles.

References

  • MITRE ATT&CK: https://attack.mitre.org/ (techniques, Groups, Software, Navigator)
  • MITRE Center for Threat-Informed Defense: Adversary Emulation Library, Micro Emulation Plans, TRAM (Threat Report ATT&CK Mapper), Attack Flow, Top ATT&CK Techniques
  • CISA: "Best Practices for MITRE ATT&CK Mapping"; Decider; joint cybersecurity advisories
  • Red Canary: Atomic Red Team and Invoke-AtomicRedTeam wiki; MITRE Caldera documentation (emu plugin); DataDog Stratus Red Team documentation
  • Orange Cyberdefense: GOAD (Game of Active Directory) lab project
  • OTRF Security-Datasets; EVTX-ATTACK-SAMPLES
  • NIST SP 800-115 (Technical Guide to Information Security Testing and Assessment)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.