# Soc Adversary Emulation Caldera

> Use when planning and running adversary emulation with MITRE Caldera against systems you are authorized to test. Covers turning a threat profile into an emulation plan, selecting abilities mapped to MITRE ATT&CK tactics and techniques, building adversaries and operations, gathering facts during execution, and reporting results as detection gaps rather than as exploits. Use when a purple team exercise, a detection validation, or an authorized red team engagement needs repeatable, technique-by-technique emulation with full logging and defender visibility.

- Skill: `mizazhaider-ceh/soc-adversary-emulation-caldera` (Agent Skill)
- Install (CLI): `npx get-skill add mizazhaider-ceh/soc-adversary-emulation-caldera`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mizazhaider-ceh/soc-adversary-emulation-caldera/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: mizazhaider-ceh (https://skillmd.com/u/mizazhaider-ceh)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/mizazhaider-ceh/soc-adversary-emulation-caldera

---


Adversary emulation replays how a real threat actor behaves, technique
by technique, so defenders can measure whether they would see it.
MITRE Caldera automates that replay. An ability is one atomic action
mapped to an ATT&CK technique, an adversary is an ordered profile of
abilities, facts are values learned during execution that steer later
abilities, and an operation runs an adversary against a group of
agents. This skill covers emulation only on systems covered by written
authorization, with the blue team watching and every step logged.
Emulation is a measurement tool, not a way to break into anything
outside scope, and anything it finds becomes a detection task.

## Quick Workflow

1. Confirm written authorization, scope, and the stop conditions with
   the engagement lead before touching any target.
2. Pick a threat profile and list the ATT&CK techniques it uses, in
   the order the actor uses them.
3. Map each technique to a Caldera ability, checking platform,
   executor, and payload requirements.
4. Build or select an adversary profile and order its abilities into
   a realistic chain, kill chain order first, then lateral movement.
5. Define the facts the operation must gather, such as host names,
   users, and domain details, and which abilities consume them.
6. Run the operation against a lab agent group first, with defenders
   watching EDR and SIEM consoles live.
7. Record per-ability results, timestamps, and which detections fired
   or stayed silent, then retest after tuning.
8. Report coverage honestly, technique by technique, with detection
   recommendations for every gap.

## 1. From threat profile to emulation plan

Start from a named threat actor or a threat report, never from a random
ability list. Extract the techniques, order them as the actor executes
them, and note the platforms each step needs. A plan that cannot name
its source profile is just noise, and noise teaches defenders nothing.

```yaml
# emulation-plan.yaml - one plan per engagement, kept with the report
emulation:
  profile: "FIN7-style intrusion chain (public reporting)"
  authorization_ref: "AUTH-2026-114"
  scope: "lab hosts in agent group lab-win only"
  phases:
    - phase: "initial access"
      techniques: ["T1566.001", "T1204.002"]
    - phase: "execution and persistence"
      techniques: ["T1059.001", "T1547.001"]
    - phase: "credential access"
      techniques: ["T1003.001"]
    - phase: "discovery"
      techniques: ["T1083", "T1018"]
  stop_conditions:
    - "any production host appears in agent list"
    - "a detection triggers an incident ticket"
    - "the engagement lead calls a halt"
```

```bash
# Sanity check the plan before building anything in Caldera:
# - every technique has a source report reference
# - every technique has a target platform in scope
# - every phase has a defender check (which console, which rule)
grep -c "techniques" emulation-plan.yaml
grep "scope" emulation-plan.yaml
```

## 2. Selecting and vetting abilities

Caldera ships stock abilities, and you can write custom ones. Vet every
ability before it runs, especially custom ones. Read the command, check
what it changes on the host, confirm it cannot escape scope, and test
it once on a disposable lab host. An ability that deletes, encrypts,
or exfiltrates data has no place in an emulation unless the engagement
explicitly authorizes that effect and the lab can be rebuilt.

```yaml
# ability example - discovery via host enumeration (read-only)
- id: 9a1b2c3d-0000-4000-8000-000000000001
  name: Discover local users
  description: Lists local user accounts for discovery mapping
  tactic: discovery
  technique:
    attack_id: T1087.001
    name: Local Account
  platforms:
    windows:
      psh:
        command: Get-LocalUser | Select-Object Name, Enabled
        parsers:
          - property: host.user.name
            trait: host.user.name
```

```bash
# List stock abilities for a technique through the Caldera API.
# Replace CALDERA_KEY with the key from conf/local.yml on the server.
curl -s -H "KEY: CALDERA_KEY" \
  "http://localhost:8888/api/v2/abilities" | \
  python3 -c "import json,sys; data=json.load(sys.stdin); \
    print('\n'.join(a['name'] for a in data if a.get('technique_id')=='T1087'))"
```

## 3. Building the adversary profile

An adversary profile orders abilities the way the actor would run
them, with facts linking steps together. For example, a discovery
ability that learns usernames feeds a later ability that targets a
specific account. Keep the chain short and legible. Ten well-chosen
abilities that tell a story beat fifty disconnected ones, and the
report should read like the actor's playbook, not a scan dump.

```json
{
  "name": "Lab emulation - discovery to credential access",
  "description": "Read-only discovery chain followed by authorized credential access test in the lab",
  "atomic_ordering": [
    "9a1b2c3d-0000-4000-8000-000000000001",
    "T1083-file-discovery",
    "T1003-credential-access-test"
  ]
}
```

```bash
# Start an operation from the API once the adversary exists.
# agent_group must match only in-scope lab agents.
curl -s -X POST -H "KEY: CALDERA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "emulation-run-01", "adversary_id": "ADVERSARY_ID",
       "agent_group": "lab-win", "auto_close": true}' \
  "http://localhost:8888/api/v2/operations"
```

## 4. Facts, reporting, and detection notes

Facts are the operation's memory. A fact has a trait (what kind of
value it is, such as host.user.name) and a value, and abilities declare
which facts they need before they run. During the run, watch facts
accumulate, because they show what an actor would learn at each step.
After the run, export the operation report and translate every silent
technique into a detection task with the exact telemetry it produced.

```bash
# Pull operation results and facts for the report.
curl -s -H "KEY: CALDERA_KEY" \
  "http://localhost:8888/api/v2/operations/OPERATION_ID" | \
  python3 -m json.tool | head -n 80
curl -s -H "KEY: CALDERA_KEY" \
  "http://localhost:8888/api/v2/operations/OPERATION_ID/potential-links" | \
  python3 -m json.tool | head -n 40
```

```python
#!/usr/bin/env python3
"""Summarize an emulation run as detection coverage."""
results = [
    {"technique": "T1087.001", "ran": True, "detected": False,
     "telemetry": "PowerShell Get-LocalUser, Event 4104"},
    {"technique": "T1083", "ran": True, "detected": True,
     "telemetry": "dir sweep, Sysmon Event 11"},
    {"technique": "T1003.001", "ran": True, "detected": True,
     "telemetry": "LSASS access, EDR alert"},
]
for r in results:
    status = "covered" if r["detected"] else "GAP - write detection"
    print(f"{r['technique']}: {status} ({r['telemetry']})")
gaps = [r for r in results if not r["detected"]]
print(f"coverage: {len(results) - len(gaps)}/{len(results)} techniques detected")
```

## Edge cases

- An ability fails on the target platform. Check the executor and
  platform fields first, then run the command by hand on a lab host
  to see the real error, and swap in an equivalent ability rather
  than forcing it.
- Facts do not flow between steps. An ability that needs a fact will
  sit unexecuted until a parser produces it, so verify the parser
  trait name matches the consuming ability's requirement exactly.
- The operation touches a host outside scope. Stop the operation
  immediately, remove the agent, report the excursion to the
  engagement lead, and do not rerun until scope is re-confirmed.
- Defenders see nothing at all. That is a finding, not a failed run.
  Record the telemetry that should have existed and hand it to
  detection engineering as the gap.
- The emulation looks too clean. Real actors make noise and mistakes,
  so a zero-alert run against a mature stack usually means the
  agents or the logging, not the defenses, need checking first.

## Key references

- MITRE ATT&CK framework at https://attack.mitre.org
- MITRE Caldera documentation at https://caldera.readthedocs.io
- Related skills in this repo: soc-caldera-operations for day-to-day
  server and agent handling, soc-red-team-planning for scope and
  rules of engagement, purple-team-exercises for the joint
  red and blue loop, detection-as-code for turning gaps into rules.

