purple-exercise-tracking
Skill0 starsChanged 4 days agoMITView on GitHub
Record, score and report purple-team exercise results so they turn into closed gaps. Covers VECTR (assessments, campaigns, test cases, outcomes), the bundle's results.csv fallback schema, outcome scoring rules with the evidence each outcome needs (blocked / alerted / logged / not seen / partial), ATT&CK Navigator layers (layer format 4.5, domain enterprise-attack, score and colour legend), KPIs and trends across retests (coverage, time to detect, gap closure, regression), a gap backlog with owners and due dates feeding detection-engineering and hardening skills, retest criteria, the management summary, and avoiding vanity metrics. Use when asked to score an exercise, build the heatmap or scorecard, track gaps, compare retests, or /scorecard.
In this repository52 other files it gives its agents.
- adversary-emulation-planningSkill
- 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
- 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
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
After an exercise: scoring, building the ATT&CK Navigator heatmap, writing the management summary (/scorecard).
- Very specific: line 35
Use one outcome vocabulary: blocked, alerted, logged, not seen, partial, plus the non-outcomes not run and inconclusive.
- Very specific: line 37
Never overwrite a result. A retest is a new row with the same test_id.
- Very specific: line 46
Before the window: load the cards from plan.md into VECTR or pre-fill results.csv (exercise_id, test_id, technique, procedure_source, …
- Distinctive: line 64
Test-case fields cover both sides: technique (ATT&CK ID), procedure and command reference, operator, source and target, attack start/stop …
- Very specific: line 70
Put the bundle test_id in the test-case name so CSV, evidence folder and VECTR line up.
- Very specific: line 74
Keep results.csv as the export of record in the exercise folder even when VECTR is the working tool.
- Distinctive: line 262
Add one variant procedure (another published test for the same technique) for high-priority techniques, recorded as its own card.
- Distinctive: line 287
Keep it to one page of prose plus tables.
≈ “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
Purple exercise tracking
Results that are not recorded with evidence are anecdotes; gaps that are not in
a backlog with an owner are never fixed. This skill is the record-keeping and
scoring half of the purple loop described in purpleteam-methodology. Test
cards come from adversary-emulation-planning; execution from /emulate and
the executor skills. Results go into the exercise folder created by
scripts/new-exercise.ps1 / .sh: results.csv (one row per run),
findings.md (gaps), scorecard.md (summary), evidence/ (exports,
screenshots, query output).
When to use
- During an exercise: logging each run and its observed outcome as it happens.
- After an exercise: scoring, building the ATT&CK Navigator heatmap, writing the
management summary (
/scorecard). - Managing the gap backlog: owners, due dates, retest scheduling, closure.
- Comparing cycles: "did we improve since last quarter?", "what regressed?".
- Choosing or setting up a tracker (VECTR, or the CSV fallback).
Ground rules
No outcome without evidence, no closed gap without a passing retest.
- Each row in
results.csvhas anevidencereference that someone else can open: alert ID and time, query plus record IDs, or the empty searches fornot seen. Rows without evidence are scoredinconclusive. - Outcomes are scored by the SOC analyst (observer), confirmed by the facilitator; the operator never scores their own run alone.
- Use one outcome vocabulary:
blocked,alerted,logged,not seen,partial, plus the non-outcomesnot runandinconclusive. - Never overwrite a result. A retest is a new row with the same
test_id; the latest row byexecuted_utc_startis current, earlier rows are history. - A gap is closed only when a retest row for the same card shows the expected outcome. Ticket status alone does not close it.
- Results expire: a card whose latest run is older than the agreed regression interval is reported as unknown, not as covered.
Workflow
- Before the window: load the cards from
plan.mdinto VECTR or pre-fillresults.csv(exercise_id, test_id, technique, procedure_source, target). - During each run: operator fills times and operator; observer fills outcome,
evidence and detection_name live; save exports into
evidence/<test_id>/. - Same day: review every row against the scoring rules; resolve
inconclusiverows (rerun or marknot runwith reason). - Open a gap for every row not meeting its card's pass criteria; fill
gap,owner,due_date,retest_status=pending; describe it infindings.md. - Build the Navigator layer and KPIs (script below) and write
scorecard.md. - Track gaps weekly; when a fix lands, schedule the retest and append the row.
- At the next cycle, compare KPIs with the previous one and report the trend.
VECTR
VECTR (Security Risk Advisors) is a free tracker for red/purple activity. Structure, top down: environment, assessment (an exercise or programme period), campaign (a threat, phase or day), test case (one procedure).
- Test-case fields cover both sides: technique (ATT&CK ID), procedure and command reference, operator, source and target, attack start/stop times; blue fields for outcome, detecting tools/rules, detection time and notes.
- Map the bundle scale to VECTR's outcome picklist (for example Blocked,
Alerted, Logged, Not Detected; confirm the values in your version). Record
partialas the nearest lower outcome plus a note "partial:<what was seen>". - Put the bundle
test_idin the test-case name so CSV, evidence folder and VECTR line up; attach evidence or link toevidence/. - VECTR can import test-case templates and produce ATT&CK heatmaps; check the import/export options in your version rather than relying on a fixed format.
- Keep
results.csvas the export of record in the exercise folder even when VECTR is the working tool; it is what the scripts and other skills read.
results.csv schema
Header used across the bundle (do not reorder or rename; add context in
evidence or findings.md, not in new columns):
exercise_id,test_id,technique,procedure_source,target,executed_utc_start,executed_utc_end,operator,outcome,evidence,detection_name,gap,owner,due_date,retest_status| Column | Content | Example |
| exercise_id | From the scaffolder | EX-2026-11-ransomware |
| test_id | Card ID from plan.md, stable across retests | EX-2026-11-ransomware-T07 |
| technique | Most specific ATT&CK ID tested | T1053.005 |
| procedure_source | Project, test name or GUID, version | atomic T1053.005 "<test name>" @<sha> |
| target | Host / account / cloud account | LAB-SRV19-02 / lab\pt-svc01 |
| executed_utc_start / _end | ISO 8601 UTC from the execution log | 2026-11-20T10:14:05Z |
| operator | Who ran it | <name> |
| outcome | blocked, alerted, logged, not seen, partial, not run, inconclusive | alerted |
| evidence | Key=value pairs separated by ; | alert=<id>;alert_utc=2026-11-20T10:19:40Z;ref=evidence/T07/ |
| detection_name | Rule or control that fired, or empty | <rule name> |
| gap | Gap ID from findings.md, or empty | G-04 |
| owner | Gap owner (person or team) | detection-team |
| due_date | Gap due date, ISO date | 2026-12-15 |
| retest_status | none (met criteria), pending, passed, failed | pending |
Evidence convention: alert= and alert_utc= for alerts, query= for a saved
query name, records= for event record IDs, block= for the control's block
event, ref= for the evidence folder. Time to detect is computed from
alert_utc - executed_utc_start.
Scoring rules and required evidence
| Outcome | Score when | Evidence that must be in evidence | Not enough |
blocked | A preventive control stopped the procedure before its objective | block= event from the control, procedure output showing failure; note whether an alert reached the SOC | The test "did not work" with no block event (that is inconclusive) |
alerted | An alert tied to the procedure's behaviour reached the watched queue within the card's threshold | alert=, alert_utc=, detection_name | A harness alert, or an alert found only by searching later in a console nobody watches |
logged | Telemetry for the behaviour exists in SIEM/EDR, no alert | query= and records= pointing at the raw events | "The EDR timeline probably shows it" |
not seen | No telemetry for the behaviour in the searchable store | The searches run, sources and time window, all empty | Searching one table only |
partial | Some steps seen and others not, or alert generic / wrong severity / later than threshold | What was seen, what was not, the alert and why it falls short | Rounding up to alerted |
not run | Gated out, tabletop only, aborted before execution | Reason (gate item, abort) | Leaving the row blank |
inconclusive | Executed but failed for test reasons (prerequisite, typo, harness error) | Error output | Scoring it as blocked |
Silent blocks (blocked with no alert to the SOC) open a visibility gap.
not run and inconclusive rows never count in coverage numerators or
denominators; report their count separately.
ATT&CK Navigator layer
Score per technique = worst current outcome across its prioritised cards (conservative: one missed procedure keeps the cell red). Legend:
| Score | Outcome | Colour |
| 4 | blocked | #2c7bb6 |
| 3 | alerted | #1a9641 |
| 2 | partial | #fdae61 |
| 1 | logged | #ffffbf |
| 0 | not seen | #d7191c |
| none | not run / inconclusive / stale | #bdbdbd |
Minimal layer (format 4.5, enterprise domain). Set versions.attack to the
ATT&CK version you mapped against and versions.navigator to the Navigator you
open it in; the Navigator warns on mismatches.
{
"name": "EX-2026-11-ransomware - outcomes",
"versions": { "attack": "18", "navigator": "5.1.0", "layer": "4.5" },
"domain": "enterprise-attack",
"description": "Worst current outcome per technique; latest run per test_id; stale results grey",
"techniques": [
{ "techniqueID": "T1053", "showSubtechniques": true },
{ "techniqueID": "T1053.005", "score": 3, "color": "#1a9641",
"comment": "T07 alerted (TTD 5 min)", "enabled": true }
],
"legendItems": [
{ "label": "4 blocked", "color": "#2c7bb6" }, { "label": "3 alerted", "color": "#1a9641" },
{ "label": "2 partial", "color": "#fdae61" }, { "label": "1 logged", "color": "#ffffbf" },
{ "label": "0 not seen", "color": "#d7191c" }, { "label": "not run / stale", "color": "#bdbdbd" }
],
"showTacticRowBackground": false,
"hideDisabled": false
}Technique entries without a tactic field apply to every tactic the technique
appears under. Parent entries with showSubtechniques: true make tested
sub-techniques visible.
# results.csv -> Navigator layer + KPI lines. Usage: python score.py <exercise-folder> [stale_days]
# Tune: stale_days (regression interval), ATT&CK/Navigator versions, outcome scores.
import csv, json, sys
from datetime import datetime, timezone
folder = sys.argv[1]; stale_days = int(sys.argv[2]) if len(sys.argv) > 2 else 90
SCORE = {"blocked": 4, "alerted": 3, "partial": 2, "logged": 1, "not seen": 0}
COLOR = {4: "#2c7bb6", 3: "#1a9641", 2: "#fdae61", 1: "#ffffbf", 0: "#d7191c"}
ts = lambda s: datetime.fromisoformat(s.replace("Z", "+00:00"))
rows = list(csv.DictReader(open(f"{folder}/results.csv", newline="", encoding="utf-8")))
latest = {}
for r in rows:
if r["executed_utc_start"] and (r["test_id"] not in latest or
ts(r["executed_utc_start"]) > ts(latest[r["test_id"]]["executed_utc_start"])):
latest[r["test_id"]] = r
now = datetime.now(timezone.utc)
scored = [r for r in latest.values() if r["outcome"] in SCORE
and (now - ts(r["executed_utc_start"])).days <= stale_days]
tech = {}
for r in scored:
tech.setdefault(r["technique"], []).append(r)
entries = []
for t, rs in sorted(tech.items()):
s = min(SCORE[r["outcome"]] for r in rs)
entries.append({"techniqueID": t, "score": s, "color": COLOR[s], "enabled": True,
"comment": "; ".join(f'{r["test_id"]}={r["outcome"]}' for r in rs)})
if "." in t:
entries.append({"techniqueID": t.split(".")[0], "showSubtechniques": True})
layer = {"name": f"{rows[0]['exercise_id'] if rows else folder} - outcomes",
"versions": {"attack": "18", "navigator": "5.1.0", "layer": "4.5"},
"domain": "enterprise-attack", "techniques": entries}
json.dump(layer, open(f"{folder}/navigator_layer.json", "w", encoding="utf-8"), indent=2)
n = len(scored); det = [r for r in scored if r["outcome"] == "alerted" or
(r["outcome"] == "blocked" and "alert=" in r["evidence"])]
ttd = sorted((ts(dict(p.split("=", 1) for p in r["evidence"].split(";") if "=" in p)["alert_utc"])
- ts(r["executed_utc_start"])).total_seconds() / 60
for r in det if "alert_utc=" in r["evidence"])
print(f"cards scored {n}, detection coverage {len(det)}/{n}",
f"blocked {sum(r['outcome'] == 'blocked' for r in scored)}/{n}",
f"median TTD {ttd[len(ttd)//2]:.1f} min, worst {ttd[-1]:.1f} min" if ttd else "no TTD data",
f"excluded (not run/inconclusive/stale) {len(latest) - n}", sep="\n")KPIs and trend over retests
| KPI | Formula (latest row per test_id, non-stale) | Read it as |
| Detection coverage | (alerted + blocked with alert) / scored cards | Share of prioritised procedures the SOC would see in its queue |
| Prevention rate | blocked / scored cards | Separate from detection; never added to it |
| Visibility | (logged + alerted + partial + blocked with telemetry) / scored cards | Telemetry health; low means logging-coverage work |
| Time to detect (exercise) | median and worst of alert_utc - executed_utc_start | Pipeline and rule-schedule latency, not analyst speed |
| Gap closure rate | gaps closed by passing retest in period / (open at start + opened in period) | Whether the loop actually closes |
| Overdue gaps | gaps past due_date with retest_status=pending | Ownership problem, escalate |
| Regression rate | cards that previously met criteria and now do not / cards rerun | Drift from agent, parser or rule changes |
| Stale share | cards whose latest run is older than the interval / all cards | Coverage you can no longer claim |
Trend table for scorecard.md (one column per cycle, same card set where
possible; state when the card set changed):
| KPI | Cycle N-1 | Cycle N | Change |
| Detection coverage | 9/24 | 15/24 | +6 cards |
| Median / worst TTD | 22 / 240 min | 8 / 45 min | faster |
| Gap closure rate | - | 7/12 | first cycle with retests |
| Regressions | - | 1/9 | T1003.001 card, after parser change |
The numbers above illustrate the format only.
Gap backlog (findings.md)
| Gap | Test / technique | Outcome | Root cause | Fix owner (skill) | Owner | Due | Retest |
| G-04 | T07 / T1053.005 | logged | Rule exists, schedule lookback too short | detection-engineering | detection-team | 2026-12-15 | pending |
Root-cause categories and where they go:
| Root cause | Hand-off |
| No telemetry (source missing, policy off, parser drops field) | logging-coverage |
| Telemetry, no rule or rule logic misses the procedure | detection-engineering (+ sigma-rules, query skills) |
| Alert fires but is generic, mis-severitised or not routed to the queue | detection-engineering, SOC lead |
| Alert reached the queue but triage missed or closed it | alert-triage playbook update, SOC lead |
| Procedure should have been prevented | hardening-windows-ad, hardening-m365-entra, hardening-linux, hardening-cloud |
Priority = card priority score from plan.md times outcome severity (not seen
before logged before partial). Every gap has one named owner and a due date;
gaps with no owner go to the sponsor.
Retest criteria
- Trigger: gap fix deployed; EDR agent, policy, parser or rule-set change touching the technique; or the regression interval elapsed.
- Same card: same procedure source and version, same host class and account type, same expected telemetry and pass criteria. Changing the procedure makes it a new card, not a retest.
- Add one variant procedure (another published test for the same technique) for high-priority techniques, recorded as its own card.
- Pass: outcome meets the card's pass criteria with evidence, cleanup verified.
Then set
retest_status=passedon the new row and close the gap infindings.md. Fail:retest_status=failed, gap stays open, root cause revisited.
Management summary (scorecard.md)
# Scorecard - <EX-ID> - <threat(s)> - <dates>
## Bottom line
Of <n> prioritised procedures from <threat>, the SOC would have been alerted to <a>,
<b> were prevented, <c> were visible only in logs, <d> were not seen. <x> gaps are open
with owners; <y> closed since last cycle by retest.
## What changed since last cycle
Trend table (coverage, TTD, gap closure, regressions).
## Top risks
3-5 gaps that matter most: technique, what an attacker could do unseen, owner, due date.
## Decisions needed
Funding, log-source onboarding, policy changes, risk acceptances (with approver).
## Next
Retest dates, next exercise threat, scope changes.
Appendix: Navigator layer, results.csv, findings.md, RoE reference.Keep it to one page of prose plus tables; no screenshots of raw alerts.
Avoiding vanity metrics
| Vanity metric | Why it misleads | Report instead |
| Number of tests run | Activity, not defence; easy to inflate with cheap tests | Detection coverage of prioritised procedures |
| Number of new rules | Untested rules can be silent or noisy | Gaps closed by passing retest |
| % of all ATT&CK techniques green | Most techniques are irrelevant to your threats; one procedure is not a technique | Coverage per prioritised threat, with procedure counts |
| Best-case technique colour | Hides missed procedures | Worst-case per technique, with card list in comments |
| "100% detected" in the lab | Lab may differ from production | Lab and production reported separately |
False positives & benign look-alikes
| Observation | Risk | Scoring decision |
| Harness alert (module import, agent beacon, remoting) | Counts tooling as detection | Not evidence; score on the procedure's own alert |
| Generic alert on every card | Inflated alerted | partial, gap for specific detection |
| Alert found later by searching | Looks alerted | logged (or partial if late alert); queue matters |
| Block on prerequisite download | Looks blocked | inconclusive; fix prerequisite in lab |
| Alert from a real event during the window | Real incident mis-scored | White cell confirms test ID; else incident-response |
Pitfalls
- Editing old rows to show the fixed state; trends and regression history vanish.
- Free-text outcomes ("kind of detected") that no script can count.
- Evidence stored in a personal mailbox or chat instead of
evidence/. - Gaps owned by "the SOC" or "IT": no person, no fix.
- Mixing lab and production rows without a target that shows which is which.
- Presenting the Navigator heatmap without the denominator and card counts.
- Letting stale results stay green.
Output
results.csvcomplete, one row per run, evidence references resolvable.findings.mdgap backlog with root cause, owner, due date, retest status.navigator_layer.json(format 4.5, enterprise-attack) with the legend above.scorecard.mdmanagement summary with KPI trend.- Hand-offs: gaps to
detection-engineering,logging-coverageand the hardening skills; retests via/emulateor/purple; next exercise planning viaadversary-emulation-planningand/exercise;/coverageconsumes the layer;/scorecarddrives this skill end to end.
References
- Security Risk Advisors: VECTR documentation
- MITRE ATT&CK Navigator: layer format documentation (v4.5) and https://attack.mitre.org/
- MITRE Center for Threat-Informed Defense: Adversary Emulation Library and threat-informed defense resources
- SCYTHE: Purple Team Exercise Framework (PTEF)
- MITRE ATT&CK Evaluations methodology (detection categories)
- DeTT&CT (data source and detection coverage scoring) as an alternative model
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.

