agentleFS
Bizaza-devsBizaza-devs/Claude-PurpleTeam/skills/caldera-operations/SKILL.md

caldera-operations

Skill0 starsChanged 4 days agoMITView on GitHub

Operator guide for MITRE Caldera in defensive purple-team work: server setup in an isolated lab network, config hygiene (replace default credentials and API keys, no --insecure outside a throwaway lab, never Internet-exposed), Sandcat agents deployed only to authorised hosts, abilities and adversary profiles, planners (atomic, batch, buckets), facts, fact sources and DENY/ALLOW rules to scope targets, operations (manual vs autonomous, jitter, visibility, plain-text obfuscator), defender plugins (Atomic, Stockpile, Response, Debrief, Training, Compass), cleanup and agent removal, and exporting the operation report for scoring. Use when asked to \"run a Caldera operation\", set up Caldera for a purple exercise, deploy a Sandcat agent, or turn Caldera results into detection gaps.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

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

    Not for: operations against systems outside a written scope, building custom implants, or using Caldera as a C2 framework for a red-team …

    line 19
  2. Distinctive:

    The server is a C2 server: Treat it like one: isolated lab network, no Internet exposure, non-default credentials, access limited to named …

    line 31
  3. Distinctive:

    Agents only on authorised hosts: Every agent is inventoried (host, paw, group, deploy time, removal time).

    line 33
  4. Very specific:

    No evasion features: Use the plain-text obfuscator.

    line 35
  5. Distinctive:

    Facts and rules: create a fact source with lab values and DENY-by-default rules for targets (hosts, IPs, users) outside scope.

    line 53
  6. Very specific:

    Use a dedicated agent group (e.g.

    line 104
  7. Distinctive:

    Mode: start with manual approval (each link waits for the operator to approve or discard) for the first run of any profile.

    line 170
  8. Distinctive:

    Verify by hand on each host: files, registry values, scheduled tasks, services, accounts created by abilities are gone.

    line 222
  9. Distinctive:

    Remove the agents from the server's agent list.

    line 227

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

MITRE Caldera operations for purple teams

When to use

  • A purple exercise (adversary-emulation-planning, /exercise) needs a chain of published procedures run against lab or approved hosts with a central record of what ran, where and when.
  • Regression runs of a fixed adversary profile after sensor, parser or rule changes.
  • Training defenders on what a known procedure chain looks like in their telemetry (Training plugin, Response plugin blue agents).
  • Turning a CTID Adversary Emulation Library plan into a repeatable lab operation (emu plugin, where installed).

Not for: operations against systems outside a written scope, building custom implants, or using Caldera as a C2 framework for a red-team engagement. Single atomic tests are simpler with atomic-red-team; cloud control-plane techniques with stratus-red-team-cloud. Scoring and RoE: purple-team-validation; result tracking: purple-exercise-tracking.

Ground rules

  • Authorisation gate. A lab, or production hosts named in a written authorisation plus change ticket with the adversary profile (every ability listed), the agent group, time window, operator and abort contact. The profile is reviewed ability by ability before the window, not at run time.
  • The server is a C2 server. Treat it like one: isolated lab network, no Internet exposure, non-default credentials, access limited to named operators, logs kept.
  • Agents only on authorised hosts. Every agent is inventoried (host, paw, group, deploy time, removal time). An agent that cannot be accounted for is an incident.
  • No evasion features. Use the plain-text obfuscator. Do not use obfuscators, masquerading binary names, UAC-bypass or defence-impairment abilities to defeat controls. A blocked ability is a blocked result, recorded with the protection event.
  • Snapshot, cleanup, verify. Snapshot lab hosts before the operation; let the operation run its cleanup; verify by hand; kill and delete agents; revert.
  • SOC deconfliction. The SOC lead knows agent hosts, the server IP, operator accounts and the window (or approved a declared no-notice test). Beaconing to the server is expected; anything else is triaged as real.
  • Evidence per link. Each executed link (ability on an agent) is scored with its command, timestamp, host, the raw telemetry and the alert ID or documented absence.

Workflow

  1. Gate: scope, change ticket, SOC notified, exercise ID (e.g. PX-2026-007).
  2. Server: deploy or refresh in the lab segment; confirm config hygiene (below).
  3. Profile review: export the adversary profile's ability list (ID, name, tactic, technique, executor command, cleanup). Remove anything destructive, evasive or out of scope; record the reviewed list in the plan.
  4. Facts and rules: create a fact source with lab values and DENY-by-default rules for targets (hosts, IPs, users) outside scope.
  5. Expectations: per ability, expected telemetry, expected detection and the sibling hunt skill, written before the run.
  6. Agents: snapshot hosts, deploy Sandcat to the in-scope hosts only, confirm each checks in to the intended group.
  7. Operation: manual-approval mode first; plain-text obfuscator; planner and jitter chosen deliberately; visibility set; auto-close off while observing.
  8. Observe and score each link against SIEM/EDR data.
  9. Cleanup: finish the operation (cleanup runs), verify, kill agents, delete the binaries, revert snapshots.
  10. Export the report and event logs; record outcomes in purple-exercise-tracking.

Server setup and config hygiene

  • Install from the official mitre/caldera repository per its documentation (Python server; recent versions also build a web UI, which needs Node.js). Pin the release tag in the exercise plan. Run python3 server.py --help for your version's flags (verify).
  • --insecure starts with the default config and well-known credentials. Use it only on a throwaway, disconnected VM. Normal start uses a local config (in recent versions generated with random secrets on first start; verify), which you then review.
  • In the config file (conf/local.yml in typical installs; verify) replace or confirm: user passwords for the red and blue accounts, api_key_red, api_key_blue, encryption_key, crypt_salt; set host to the lab interface, not 0.0.0.0 on a routed network; enable only the plugins you need.
  • Network: bind to the lab segment, host firewall allowing the UI/API port (8888 by default; verify) from the operator jump host and agent contact ports from lab hosts only. No port forwards, no public IP, no tunnelling services.
  • Contacts: use HTTP(S) to the lab server. Leave contacts that reach third-party services (for example GitHub Gist or Slack contacts) disabled: they route test traffic through external platforms.
  • Store the server's own logs and the operation exports as exercise evidence; restrict who can read the config (it holds keys).
# Lab server sanity checks (Linux; adjust port and paths)
ss -ltnp | grep -E ':8888|:7010|:7011|:7012'          # which listeners are up (contact ports vary by config)
grep -nE 'api_key|password|encryption_key|crypt_salt|host:' conf/local.yml   # confirm non-default values (do not paste them anywhere)

Agents (Sandcat)

  • Generate the deploy command in the UI (Agents, deploy an agent, Sandcat, platform, app.contact.http set to the lab server). Do not paste deploy one-liners into tickets or chat; store them with the exercise evidence.
  • Rename the agent binary to an unmistakable lab name (e.g. pt-sandcat-PX-2026-007.exe). Some default deploy commands name the binary after a legitimate product; that is masquerading and confuses real investigations.
  • Deploy as the test account the plan names (standard user unless the plan needs admin); record privilege level, because coverage often differs.
  • Use a dedicated agent group (e.g. px-2026-007), never the default group shared with other operations.
  • Agent settings: beacon interval (sleep min/max), watchdog (agent exits after N seconds without contact) and untrusted timer. A watchdog is a good safety net in labs: an orphaned agent dies on its own.
  • Agent deployment itself is telemetry (download, process create, outbound HTTP to the server). Score it separately as ingress/C2 (hunt-c2-beaconing) and do not count it as the procedure under test.

Abilities and adversary profiles

  • An ability is one ATT&CK-mapped procedure: ID, name, tactic, technique ID, executors per platform (psh, pwsh, cmd, sh), optional payloads, parsers (extract facts from output), requirements and cleanup commands.
  • An adversary profile is an ordered list of abilities (atomic_ordering). Stockpile ships stock profiles (for example "Discovery" and "Hunter"; confirm names in your install); the Atomic plugin imports Atomic Red Team tests as abilities.
  • Review each ability's command and cleanup in the UI (or the YAML in the plugin's data/abilities/<tactic>/ folder). Reference abilities in plans by name, technique and the ID shown in your install; never copy an ability ID from memory.
  • Build exercise profiles by copying a stock profile and removing abilities, not by writing new offensive abilities. A custom ability is acceptable only for benign markers (create a labelled file or registry value, then delete it), reviewed by a second person.
  • Exclude from production profiles: credential dumping to disk, shadow-copy or backup deletion (T1490), encryption or wiping (T1486, T1485), disabling security tools (T1562.001), UAC bypass, and exfiltration to anything but the lab server.

Planners

PlannerBehaviourUse for
atomicRuns abilities one at a time in profile orderDefault for validation: clean, ordered telemetry per link
batchSends every ability whose requirements are met at onceFast regression when per-link timing matters less
bucketsGroups abilities by tactic and works bucket by bucketKill-chain shaped exercises, tactic-level scoring

Other planners may exist in your install (look-ahead and others; check plugin docs). For scoring, prefer atomic: overlapping links make it hard to tie an alert to one procedure.

Facts, fact sources and rules

  • Facts are trait/value pairs (e.g. host.user.name, remote.host.fqdn) that abilities consume (#{trait} in commands) and parsers produce from output.
  • A fact source seeds facts for an operation. Put lab-only values there (test user, lab share path, lab hostnames).
  • Rules on a fact source ALLOW or DENY fact values by trait and match. Use them as a scope fence: DENY all values for target traits, then ALLOW only lab subnets or hostnames, so parsed facts can never steer an ability at an out-of-scope host.
# Fact source rule sketch: deny every remote host, allow only the lab subnet (verify schema in your version)
rules:
  - trait: remote.host.ip
    action: DENY
    match: .*
  - trait: remote.host.ip
    action: ALLOW
    match: 10.66.10.*
  • Review collected facts after each operation: they can contain lab credentials or hostnames; treat the export as sensitive evidence.

Operations

  • Mode: start with manual approval (each link waits for the operator to approve or discard) for the first run of any profile; autonomous only for a profile that has already run cleanly in the lab.
  • Obfuscator: plain-text only. Encoded commands defeat the purpose of reading telemetry and blur scoring.
  • Jitter: the min/max seconds between agent check-ins for links (e.g. 4/8). Larger jitter spreads links apart, which makes per-link correlation easier.
  • Visibility: the operation's visibility score (default around 50; verify) compared with each ability's visibility; abilities rated more visible than the operation allows are skipped. Record the value; a "missing" link may have been skipped, not undetected.
  • Auto-close off while observing; close (finish) the operation deliberately so cleanup runs while agents are still alive.
  • Pause or stop immediately on an abort condition (unexpected impact, real incident, service degradation); the UI state buttons and the REST API both control state.
  • Record per link: ability name, technique, agent paw/host, command as executed, start and finish timestamps, status (success, failed, discarded, timeout).
// Sentinel / Defender XDR: telemetry on agent hosts during one operation (adjust hosts, server IP, window)
let hosts = dynamic(["lab-win11-03","lab-srv-01"]); let srv = "10.66.10.5";
let t0 = datetime(2026-11-27T13:00:00Z); let t1 = datetime(2026-11-27T14:30:00Z);
union
 (DeviceProcessEvents | where Timestamp between (t0 .. t1) and DeviceName has_any (hosts)
   | project Timestamp, DeviceName, Src="proc", FileName, ProcessCommandLine, InitiatingProcessFileName),
 (DeviceNetworkEvents | where Timestamp between (t0 .. t1) and RemoteIP == srv
   | summarize Beacons=count() by DeviceName, InitiatingProcessFileName | extend Src="c2"),
 (AlertEvidence | where Timestamp between (t0 .. t1) and DeviceName has_any (hosts)
   | project Timestamp, DeviceName, Src="alert", Title, AlertId)
| order by Timestamp asc

Plugins relevant to defenders

PluginDefender use
StockpileStock abilities, adversary profiles, planners, fact sources; the baseline content
AtomicImports Atomic Red Team tests as abilities; same review rules as atomic-red-team
ResponseBlue agents and defensive abilities/profiles; practise automated response actions in the lab
DebriefOperation report (PDF and JSON views: graph, steps, tactics and techniques, facts)
TrainingGuided exercises and flags for training red and blue users on Caldera itself
CompassExports ATT&CK Navigator layers from adversary profiles; import results into a scoring layer
emuCTID Adversary Emulation Library plans as profiles (lab only; respect plan prerequisites)
FieldmanualLocal documentation for your version

Enable plugins in the config's plugin list and restart. Leave disabled any plugin whose purpose is initial access or exploitation unless the plan explicitly covers it.

Cleanup and agent removal

  1. Finish the operation so ability cleanup commands run (verify in the operation view that cleanup links executed and succeeded).
  2. Verify by hand on each host: files, registry values, scheduled tasks, services, accounts created by abilities are gone.
  3. Kill each agent from the UI (or let the watchdog expire), then delete the agent binary and any payloads the abilities downloaded (check the operation's payload list and the agent working directory).
  4. Remove the agents from the server's agent list; confirm no beacons to the server IP in network telemetry after removal time.
  5. Revert lab snapshots after evidence export. On approved production hosts, the change ticket closes only after the verification above is recorded.

Exporting results and scoring

  • Download the operation report and event logs (JSON) from the operations page, or the Debrief PDF/JSON. REST API v2 exposes operations, links and reports; check your version's API docs (served by the server under /api/docs in recent versions; verify).
  • Map each link to an outcome (blocked / alerted / logged / not seen / inconclusive) with the evidence reference, in purple-exercise-tracking.
  • Skipped (visibility), discarded (manual) and failed links are inconclusive, not not seen.
Technique area (example stock abilities)Expected telemetryHunt / detect skill
Discovery (T1082, T1087, T1069, T1018)Sysmon 1 / 4688 bursts of whoami, net, nltest, systeminfohunt-lolbins, hunt-ad-identity-attacks
Persistence (T1547.001, T1053.005)Sysmon 13, 4698, TaskScheduler 106hunt-windows-persistence
Credential access (T1003)Sysmon 10 on lsass.exe, EDR alerthunt-credential-access
Lateral movement (T1021.002, T1569.002)4624 type 3, 7045, 5145hunt-lateral-movement
C2 and ingress (T1071.001, T1105)Periodic HTTP to server, downloadshunt-c2-beaconing, network-detection-suricata-zeek
Collection and exfiltration (T1560, T1041)Archive creation, upload to serverhunt-exfiltration
Linux persistence (T1053.003, T1543.002)auditd cron/systemd writeshunt-linux-persistence

False positives & benign look-alikes

  • Agent beacons and payload downloads alert on their own; they prove C2 detection, not detection of the ability's technique.
  • Parser-driven follow-on links can touch hosts you did not expect if rules are loose; an alert on such a host is a scoping failure to fix, not a win.
  • Legitimate admin tooling runs the same discovery commands; the detection must separate them by context, not by allowlisting the Caldera agent name.
  • Activity outside agent hosts, operator accounts or the window: stop and triage as real.

Pitfalls

  • Running --insecure or default credentials on a server reachable from the corporate network.
  • Using the default agent group or a stock profile without reading every ability.
  • Leaving a base64 or other obfuscator selected from a previous operation.
  • Autonomous mode on the first run of a profile.
  • Closing the operation after killing agents, so cleanup never runs.
  • Forgetting the agent binary on disk: it is a working C2 implant until deleted.
  • Scoring links skipped by visibility as "not detected".

Output

  • Reviewed adversary profile (ability list with commands and cleanup) attached to the exercise plan; fact source with scope rules.
  • Agent inventory: host, paw, group, privilege, deployed, killed, binary removed.
  • Operation report and event logs (JSON / Debrief PDF), optional Compass Navigator layer.
  • Per-link scoring recorded in purple-exercise-tracking; scorecard via /scorecard; gaps to detection-engineering or logging-coverage, hardening findings to hardening-windows-ad / hardening-linux. The purple-facilitator and emulation-operator agents use this skill.

References

  • MITRE Caldera documentation and plugin READMEs (Stockpile, Atomic, Response, Debrief, Training, Compass, emu).
  • MITRE ATT&CK, e.g. https://attack.mitre.org/techniques/T1082/
  • Center for Threat-Informed Defense: Adversary Emulation Library.
  • purple-team-validation for rules of engagement and outcome definitions.

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.