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.
In this repository52 other files it gives its agents.
- alert-triageSkill
- atomic-red-teamSkill
- blueteam-methodologySkill
- caldera-operationsSkill
- defender-mindsetSkill
- detection-engineeringSkill
- elastic-eql-esqlSkill
- emulate-network-c2-exfilSkill
- emulate-windows-endpointSkill
- evidence-handlingSkill
- hardening-cloudSkill
- hardening-linuxSkill
- hardening-m365-entraSkill
- hardening-windows-adSkill
- hunt-ad-identity-attacksSkill
- hunt-c2-beaconingSkill
- hunt-cloud-control-planeSkill
- hunt-credential-accessSkill
- hunt-dispatchSkill
- hunt-exfiltrationSkill
- hunt-k8s-runtimeSkill
- hunt-lateral-movementSkill
- hunt-linux-persistenceSkill
- hunt-lolbinsSkill
- hunt-webshellsSkill
- hunt-windows-persistenceSkill
- incident-responseSkill
- ir-azure-entraSkill
- ir-bec-m365Skill
- ir-cloud-awsSkill
- ir-insider-threatSkill
- ir-ransomwareSkill
- ir-report-writingSkill
- kql-sentinel-defenderSkill
- linux-forensicsSkill
- logging-coverageSkill
- malware-triageSkill
- memory-forensicsSkill
- network-detection-suricata-zeekSkill
- phishing-analysisSkill
- post-incident-reviewSkill
- purple-exercise-trackingSkill
- purpleteam-methodologySkill
- purple-team-validationSkill
- sigma-rulesSkill
- spl-splunkSkill
- stratus-red-team-cloudSkill
- threat-intel-iocSkill
- timeline-analysisSkill
- vuln-prioritizationSkill
- windows-forensicsSkill
- yara-rulesSkill
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
- Distinctive: line 25
Not for: building new attack tooling, testing systems you are not responsible for, or production testing without the gate below.
- Very specific: line 34
Published procedures only: Every card references Atomic Red Team tests, Caldera abilities or adversary profiles, Stratus Red Team …
- Distinctive: line 41
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 …
- Very specific: line 46
No defence evasion for its own sake: No card disables, blinds or excludes EDR/AV/logging.
- Distinctive: line 94
Read the report end to end, then map sentence by sentence.
- Distinctive: line 98
Follow CISA's "Best Practices for MITRE ATT&CK Mapping": map the behaviour described, to the most specific sub-technique the text supports.
- Distinctive: line 166
Prefer the executor whose telemetry is easiest to separate from the harness.
- Distinctive: line 242
Promotion to production: only for cards that ran cleanly in the lab with verified cleanup, and only if the RoE covers production.
- Distinctive: line 249
Tagging: every execution log line has test ID, UTC start/end, host, account and operator.
- Very specific: line 256
No suppression: do not mute rules or close alerts as "purple" in bulk.
- Distinctive: line 258
Stand-down: after the window, the white cell confirms every alert raised is linked to a test ID or escalated.
≈ “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.
Files
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
/coverageinto 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.
- 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. - 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.
- Expected before executed. Each card states expected telemetry, expected detection and pass criteria before approval; the approver signs the cards.
- 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. - Destructive and data-exposing techniques are lab-only (inhibit recovery, encryption for impact, wiping, real credential dumping to disk, exfiltration outside the organisation).
- 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-coverageor a hardening skill.
Workflow
- Scaffold the exercise folder (
scripts/new-exercise.ps1or.sh). - Pick threats (table below); write two sentences on why each matters to this organisation (sector, geography, technology, observed activity).
- Extract TTPs from each source to ATT&CK at procedure level, with confidence, into a mapping table.
- Merge and deduplicate across sources; note where several actors share a technique (prevalence).
- Pull current coverage with
/coverage(detections per technique, data sources fromlogging-coverage, last test results). - Prioritise with the matrix below; cut to what fits the window.
- Pick a procedure and executor per technique; prefer a CTID plan step where one exists for the actor.
- Write test cards into
plan.md; peer-review with the detection engineer and system owner. - Write
roe.md(rules of engagement and authorisation fields), the lab design and the deconfliction plan; get signatures and the change ticket. - Dry-run in the lab, fix prerequisites and cleanup, then hand to
/emulatecard by card.
Picking threats
| Source | What it gives | Watch out for |
| Sector ISAC / national CERT reporting | Actors and campaigns hitting peers | Often summary-level; ask for technical annexes |
| CISA and partner joint cybersecurity advisories | Technique tables mapped to ATT&CK, detection and mitigation advice | Mapping granularity varies; read the narrative, not only the table |
| Vendor threat reports (EDR, IR firms, cloud providers) | Procedure detail, command patterns, tooling | Vendor naming differs; map to ATT&CK Groups entries where possible |
| ATT&CK Groups and Software pages | Curated technique lists with cited procedure examples | Lists accumulate over years; check the cited dates |
Own incidents and post-incident reviews (post-incident-review) | Exactly what got through here | Highest relevance; replay first |
| Red-team / pentest findings | Paths that worked in this estate | Convert findings to techniques and published procedures |
Threat intel platform (threat-intel-ioc) | Sightings, actor profiles | IOCs 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) | Technique | Procedure notes | Confidence | Mapped by / reviewed by |
| <advisory name, date> | <what the actor did> | T1053.005 | schtasks, SYSTEM, server targets | High | <analyst> / <reviewer> |
| Confidence | Criteria |
| High | Procedure described explicitly (tool, command pattern, artefact, target), or observed in own incident |
| Medium | Behaviour described, technique clear, procedure detail missing |
| Low | Technique 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.
| Axis | 1 | 2 | 3 |
| Prevalence | One source, one actor | Several sources or actors | Common across relevant actors and own incidents |
| Impact / position | Late, low-impact step with other chances to catch | Mid-chain enabler | Choke point many intrusions pass through, or reaches crown jewels |
Coverage gap (/coverage) | Tested recently and alerted | Detection exists, untested or stale | No detection, or data source missing |
| Testability | Lab-only, heavy prerequisites | Published test with prerequisites | Published test, clean cleanup, lab ready |
| Confidence | Low | Medium | High |
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 type | Content | Use 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 assumptions | Chained 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 runs | Regression 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 runwith reason) rather than improvising.
Choosing the executor
| Situation | Executor | Skill |
| One endpoint technique, unit test, quick regression | Atomic Red Team (Invoke-AtomicTest) | atomic-red-team |
| Chained sequence, adversary profile, scheduled repeat runs, CTID plan via emu | MITRE Caldera | caldera-operations |
| AWS, Azure, GCP or Kubernetes control-plane technique | Stratus Red Team (stratus list, warmup, detonate, cleanup) | stratus-red-team-cloud |
| Windows endpoint chains (execution, persistence, credential access) | Atomic and Caldera content composed per card | emulate-windows-endpoint |
| Active Directory and identity (Kerberos, directory enumeration, delegation) | Published tests in a test domain, validated one detection at a time | purple-team-validation + hunt-ad-identity-attacks |
| Command and control, network discovery, exfiltration over the wire | Published procedures in an isolated network | emulate-network-c2-exfil |
| No published procedure exists | None: tabletop the step, or replay public sample logs (OTRF Security-Datasets, EVTX-ATTACK-SAMPLES) into a test index to test detection logic | detection-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)
| Field | Content |
| Exercise ID and title | <EX-ID>, threat(s) emulated |
| Sponsor and approver | Names, roles; approver is not an operator |
| System owners | Per target system, with approval recorded |
| In scope | Hosts, OUs, cloud accounts/subscriptions/projects, IP ranges, test accounts |
| Out of scope | Production data, customer systems, third-party and SaaS services not owned, everything not listed |
| Techniques | Card list with ATT&CK IDs and procedure references (from plan.md) |
| Excluded techniques | Destructive and data-exposing procedures, lab-only list |
| Time window | Start/end with time zone; blackout dates (change freezes, peak business) |
| Notice type | Announced, or no-notice with SOC lead approval and named white cell |
| Operators | Names, operator accounts, source hosts |
| Communications | Exercise channel, white cell contact, escalation path |
| Abort | Abort contact (name, phone), abort criteria, abort procedure (stop, cleanup, notify) |
| Change ticket | Number and approval status (production) |
| Safety | Snapshot/backup confirmation, cleanup responsibility, baseline verification by system owner |
| Data handling | Test data only; evidence stored in evidence/, retention, access |
| Reporting | Who receives results, by when, classification |
| Signatures | Approver, 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-trackingcan 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
| Situation | Risk | Handling |
| Vendor report lists a technique without behaviour | Over-weighting a low-confidence TTP | Map as Low; test only if cheap; flag in report |
| Same activity under different vendor actor names | Duplicate cards, inflated prevalence | Merge via ATT&CK Groups associated names; count once |
| Tool capability mapped as actor behaviour | Testing what the actor never did | Map only behaviours described in use |
| Expected detection is a generic catch-all rule | Card passes without a specific detection | Name the specific rule, or mark "expected gap" |
| Real alert during the window on an in-scope host | Dismissed as the exercise | White 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:
/emulateand the executor skills (atomic-red-team,caldera-operations,stratus-red-team-cloud,emulate-windows-endpoint,emulate-network-c2-exfil) to run cards;purple-exercise-trackingand/scorecardto record and score;detection-engineeringandlogging-coveragefor expected gaps;purpleteam-methodologyfor 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)
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
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.

