agentleFS
Bizaza-devsBizaza-devs/Claude-PurpleTeam/skills/purple-exercise-tracking/SKILL.md

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.

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
  1. Very specific:

    After an exercise: scoring, building the ATT&CK Navigator heatmap, writing the management summary (/scorecard).

    line 20
  2. Very specific:

    Use one outcome vocabulary: blocked, alerted, logged, not seen, partial, plus the non-outcomes not run and inconclusive.

    line 35
  3. Very specific:

    Never overwrite a result. A retest is a new row with the same test_id.

    line 37
  4. Very specific:

    Before the window: load the cards from plan.md into VECTR or pre-fill results.csv (exercise_id, test_id, technique, procedure_source, …

    line 46
  5. Distinctive:

    Test-case fields cover both sides: technique (ATT&CK ID), procedure and command reference, operator, source and target, attack start/stop …

    line 64
  6. Very specific:

    Put the bundle test_id in the test-case name so CSV, evidence folder and VECTR line up.

    line 70
  7. Very specific:

    Keep results.csv as the export of record in the exercise folder even when VECTR is the working tool.

    line 74
  8. Distinctive:

    Add one variant procedure (another published test for the same technique) for high-priority techniques, recorded as its own card.

    line 262
  9. Distinctive:

    Keep it to one page of prose plus tables.

    line 287

≈ “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

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.

  1. Each row in results.csv has an evidence reference that someone else can open: alert ID and time, query plus record IDs, or the empty searches for not seen. Rows without evidence are scored inconclusive.
  2. Outcomes are scored by the SOC analyst (observer), confirmed by the facilitator; the operator never scores their own run alone.
  3. Use one outcome vocabulary: blocked, alerted, logged, not seen, partial, plus the non-outcomes not run and inconclusive.
  4. Never overwrite a result. A retest is a new row with the same test_id; the latest row by executed_utc_start is current, earlier rows are history.
  5. A gap is closed only when a retest row for the same card shows the expected outcome. Ticket status alone does not close it.
  6. Results expire: a card whose latest run is older than the agreed regression interval is reported as unknown, not as covered.

Workflow

  1. Before the window: load the cards from plan.md into VECTR or pre-fill results.csv (exercise_id, test_id, technique, procedure_source, target).
  2. During each run: operator fills times and operator; observer fills outcome, evidence and detection_name live; save exports into evidence/<test_id>/.
  3. Same day: review every row against the scoring rules; resolve inconclusive rows (rerun or mark not run with reason).
  4. Open a gap for every row not meeting its card's pass criteria; fill gap, owner, due_date, retest_status=pending; describe it in findings.md.
  5. Build the Navigator layer and KPIs (script below) and write scorecard.md.
  6. Track gaps weekly; when a fix lands, schedule the retest and append the row.
  7. 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 partial as the nearest lower outcome plus a note "partial: <what was seen>".
  • Put the bundle test_id in the test-case name so CSV, evidence folder and VECTR line up; attach evidence or link to evidence/.
  • 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.csv as 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
ColumnContentExample
exercise_idFrom the scaffolderEX-2026-11-ransomware
test_idCard ID from plan.md, stable across retestsEX-2026-11-ransomware-T07
techniqueMost specific ATT&CK ID testedT1053.005
procedure_sourceProject, test name or GUID, versionatomic T1053.005 "<test name>" @<sha>
targetHost / account / cloud accountLAB-SRV19-02 / lab\pt-svc01
executed_utc_start / _endISO 8601 UTC from the execution log2026-11-20T10:14:05Z
operatorWho ran it<name>
outcomeblocked, alerted, logged, not seen, partial, not run, inconclusivealerted
evidenceKey=value pairs separated by ;alert=<id>;alert_utc=2026-11-20T10:19:40Z;ref=evidence/T07/
detection_nameRule or control that fired, or empty<rule name>
gapGap ID from findings.md, or emptyG-04
ownerGap owner (person or team)detection-team
due_dateGap due date, ISO date2026-12-15
retest_statusnone (met criteria), pending, passed, failedpending

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

OutcomeScore whenEvidence that must be in evidenceNot enough
blockedA preventive control stopped the procedure before its objectiveblock= event from the control, procedure output showing failure; note whether an alert reached the SOCThe test "did not work" with no block event (that is inconclusive)
alertedAn alert tied to the procedure's behaviour reached the watched queue within the card's thresholdalert=, alert_utc=, detection_nameA harness alert, or an alert found only by searching later in a console nobody watches
loggedTelemetry for the behaviour exists in SIEM/EDR, no alertquery= and records= pointing at the raw events"The EDR timeline probably shows it"
not seenNo telemetry for the behaviour in the searchable storeThe searches run, sources and time window, all emptySearching one table only
partialSome steps seen and others not, or alert generic / wrong severity / later than thresholdWhat was seen, what was not, the alert and why it falls shortRounding up to alerted
not runGated out, tabletop only, aborted before executionReason (gate item, abort)Leaving the row blank
inconclusiveExecuted but failed for test reasons (prerequisite, typo, harness error)Error outputScoring 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:

ScoreOutcomeColour
4blocked#2c7bb6
3alerted#1a9641
2partial#fdae61
1logged#ffffbf
0not seen#d7191c
nonenot 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

KPIFormula (latest row per test_id, non-stale)Read it as
Detection coverage(alerted + blocked with alert) / scored cardsShare of prioritised procedures the SOC would see in its queue
Prevention rateblocked / scored cardsSeparate from detection; never added to it
Visibility(logged + alerted + partial + blocked with telemetry) / scored cardsTelemetry health; low means logging-coverage work
Time to detect (exercise)median and worst of alert_utc - executed_utc_startPipeline and rule-schedule latency, not analyst speed
Gap closure rategaps closed by passing retest in period / (open at start + opened in period)Whether the loop actually closes
Overdue gapsgaps past due_date with retest_status=pendingOwnership problem, escalate
Regression ratecards that previously met criteria and now do not / cards rerunDrift from agent, parser or rule changes
Stale sharecards whose latest run is older than the interval / all cardsCoverage 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):

KPICycle N-1Cycle NChange
Detection coverage9/2415/24+6 cards
Median / worst TTD22 / 240 min8 / 45 minfaster
Gap closure rate-7/12first cycle with retests
Regressions-1/9T1003.001 card, after parser change

The numbers above illustrate the format only.

Gap backlog (findings.md)

GapTest / techniqueOutcomeRoot causeFix owner (skill)OwnerDueRetest
G-04T07 / T1053.005loggedRule exists, schedule lookback too shortdetection-engineeringdetection-team2026-12-15pending

Root-cause categories and where they go:

Root causeHand-off
No telemetry (source missing, policy off, parser drops field)logging-coverage
Telemetry, no rule or rule logic misses the proceduredetection-engineering (+ sigma-rules, query skills)
Alert fires but is generic, mis-severitised or not routed to the queuedetection-engineering, SOC lead
Alert reached the queue but triage missed or closed italert-triage playbook update, SOC lead
Procedure should have been preventedhardening-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=passed on the new row and close the gap in findings.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 metricWhy it misleadsReport instead
Number of tests runActivity, not defence; easy to inflate with cheap testsDetection coverage of prioritised procedures
Number of new rulesUntested rules can be silent or noisyGaps closed by passing retest
% of all ATT&CK techniques greenMost techniques are irrelevant to your threats; one procedure is not a techniqueCoverage per prioritised threat, with procedure counts
Best-case technique colourHides missed proceduresWorst-case per technique, with card list in comments
"100% detected" in the labLab may differ from productionLab and production reported separately

False positives & benign look-alikes

ObservationRiskScoring decision
Harness alert (module import, agent beacon, remoting)Counts tooling as detectionNot evidence; score on the procedure's own alert
Generic alert on every cardInflated alertedpartial, gap for specific detection
Alert found later by searchingLooks alertedlogged (or partial if late alert); queue matters
Block on prerequisite downloadLooks blockedinconclusive; fix prerequisite in lab
Alert from a real event during the windowReal incident mis-scoredWhite 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.csv complete, one row per run, evidence references resolvable.
  • findings.md gap backlog with root cause, owner, due date, retest status.
  • navigator_layer.json (format 4.5, enterprise-attack) with the legend above.
  • scorecard.md management summary with KPI trend.
  • Hand-offs: gaps to detection-engineering, logging-coverage and the hardening skills; retests via /emulate or /purple; next exercise planning via adversary-emulation-planning and /exercise; /coverage consumes the layer; /scorecard drives 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

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.