IdeaIntake, Hypothesis, Research
Section 8
Emulation
Remember
- Write the plan and get a second person's approval before you provision anything.
- Start from a believable foothold, with only the permissions an attacker would have at that point.
- Read field names from the raw event, because a field name taken from memory produces a detection that never fires.
- Never write a fixture by hand. Save each one from an emulation run, a research query, or an incident's missed events, and scrub credentials, tokens, and personal data out of it before you commit it.
- Record missing or late telemetry as a finding, and turn it into a log source request.
- Tag every resource and identity with the run tag. Destroy attacker-created leftovers before you tear down the provisioned infrastructure.
- In a cloud sandbox, Stratus Red Team marks every call with its run's uuid. Filter the telemetry by the mark, and never write the rule on it.
Emulation is how a detection gets its events. On an endpoint you can often detonate a sample and read the log. In cloud, SaaS, and identity there's no sample. You model the victim environment and the starting identity, provision a lab, run the behavior from that identity, and read what landed in the logs.
The research stage produces the fixtures you test a detection against and the field names you write it from. Both come out of an emulation run. For most endpoint techniques a scripted test does the job, and Atomic Red Team, from Red Canary, has one for many ATT&CK techniques. Cloud, SaaS, and identity techniques usually need the planned run described below.
On this page
8.1Starting a run
| Mode | The question it answers | What you start from | What to watch |
|---|---|---|---|
| Intelligence-driven | Can the behavior described in public research be reproduced? | A report, advisory, campaign writeup, or a CTID emulation plan | Stay faithful to the source. Don't invent victim details that make the run easier. |
| Detection-driven | Does a live detection fire on the behavior it claims to catch? | An existing detection | The detection names the API calls and fields. You infer identity, permissions, and environment, so flag those as assumptions. |
| Coverage-driven | Which techniques have no detection today? | An ATT&CK technique or log source gap | The gap goes straight to intake as a candidate. |
| Hypothesis-driven | Could an adversary realistically abuse this service or permission? | A threat model of a service or an IAM pattern | This start needs the most judgment. Model what an adversary would do from a stolen identity. |
8.2Scope
| Scope | What it covers | Effort | Use it for |
|---|---|---|---|
| Atomic | One technique, one signal question. | Hours | Proving a single call lands in the log with the fields you expect. |
| Micro | Two or three chained behaviors, for example discover, stage, exfiltrate. | Days | Detections that depend on sequence or on an artifact an earlier step creates. |
| Full | End to end, across planes and surfaces. | Weeks | Reproducing a published campaign, or testing a whole tactic chain before a board-level claim. |
The lifecycle is the same at every scope. Scope changes the source material and how much of the victim environment has to be real.
8.3Plan before you provision
Answer these, then get a second person to approve them:
- State the objective, and what the source says and leaves out.
- Describe the threat model: what the adversary is trying to achieve.
- Describe the victim model, with its resources, controls, identities, and network paths.
- Name the starting identity, and what the attacker has to earn later.
- Write the operational flow: each call, its actor, its target, the expected result, and the log it should land in.
- Estimate the cost if metered services are involved.
- Name the second person who will approve the plan before anything is provisioned.
Keep the plan with the detection, because it records why you ran each command.
8.4Keep the run realistic
- Start from the lowest privilege the hypothesis assumes: stolen long-term credentials, an assumed role, or compromised compute. An admin session is a believable start only for a hypothesis that begins with one, and the record has to say that.
- Use only the permissions that stage would have. Granting AdministratorAccess to make the run succeed invalidates the telemetry.
- Respect dependencies. Earlier actions enable later ones, and the artifacts they create are part of the trace.
- Keep the failures. A denied call during recon is often the exact event a detection should chase.
- No 0.0.0.0/0 ingress rules, even in a lab.
- Account for cloud timing. IAM is eventually consistent. Poll for readiness, and give logs a settle window before calling telemetry missing.
Give every run a unique tag, a name plus a short random id. Put it in resource names, identity names, and session names, so you can filter telemetry to the run and find leftovers during teardown. A resource tag alone won't appear in an ARN.
8.5Verify the telemetry
- Decide before the run which log should capture each step, and confirm that log is switched on. Data-access logging often ships off.
- Open the raw event and read the field names from it. Names taken from memory or documentation are often wrong, and then the detection can't fire.
- Look for what is late, partial, or absent as carefully as for what arrived.
- Ask the last question: does this data distinguish the attacker from normal activity?
A technique that leaves no useful trace is still a result, so record it. Score the candidate readiness 0 and turn it into a logging request.
8.6Test coverage against the exercise
Replay the run's events against the detections you already have, and read what fires and why:
| Outcome | What it means | What to do |
|---|---|---|
| Fires for the right reason | The detection matched the behavior it was written for. | Nothing. Record the run id in the detection's Validation section. |
| Fires on a different link in the chain | Something alerted, but on a different step. | Decide which step you meant to catch. The gap may still be open. |
| A different detection fires by accident | Coverage that depends on a detail the attacker can change. | Treat as uncovered. Score the candidate. |
| A mapped detection never touches this telemetry | Inventory coverage. The heatmap is green and the log is silent. | Retire or rewrite the detection. |
The most expensive outcome is a mapped detection that never touches the telemetry it claims to cover, because it was counted as coverage and passed an audit.
Not every gap becomes a detection. Pick the response that fits:
- Write a new detection.
- Tune an existing one, naming the exclusion.
- Request a logging change, because the data is absent or partial.
- Hunt, because the behavior is too rare or too variable to alert on.
- Run a wider emulation, because the question is still open.
8.7Teardown, and the run report
- Treat the lab as a state machine. Don't redeploy on top of a half-dead environment.
- Destroy attacker-created leftovers first: backdoor identities, keys, grants, topics. Infrastructure as code doesn't know about them.
- Then destroy what the code provisioned.
- Turn off any logging that was enabled only for the run.
- Verify the teardown by run tag, and let the check fail loudly.
Write the run up as a short engagement report:
- Objective, scope, and source material
- Threat model and ATT&CK mapping
- Victim model and assumptions, each with the date it was true
- Operational flow: action, API call, identity, result
- Observations, including denials and identity progression
- Telemetry that appeared, and telemetry that did not
- Coverage outcome per detection that fired
- Infrastructure summary and teardown status
- Recommendation: new detection, tune, logging change, hunt, or more research
Date the environmental claims. When a detection gets noisy six months later, somebody will ask what normal meant when you wrote it. If nobody can answer, the comfortable move is to raise the threshold until it goes quiet.
8.8Automation
Automate:
- Drafting the threat and victim model from a source
- Provisioning and tagging
- Executing with the right identity
- Tracking orphans
- Checking fields against real events
- Searching existing coverage
- Writing the run up and verifying teardown
Keep with the engineer:
- Whether the scenario is realistic
- Whether the assumptions are true
- Whether existing coverage is equivalent
- Whether the behavior is worth detecting at all
Adapted from Elastic Security Labs, "Cloud Threat Emulation on Autopilot: Context is Everything", Terrance DeJesus and Bryan Porras Blanch, 21 September 2026. The plan-first shape comes from the MITRE Center for Threat-Informed Defense Adversary Emulation Library.
8.9Practical emulation in the cloud with Stratus Red Team
Stratus Red Team, from Datadog, is Atomic Red Team for the cloud. It is one Go binary, under the Apache 2.0 license, that carries its attack techniques. Each is one step an attacker has been documented taking, with its prerequisites, its detonation, and its cleanup. In this lifecycle a technique is an atomic run (8.2), and it fits the detection-driven and coverage-driven starts (8.1). Its warm-up provisions, so the plan of 8.3 and its second approver come first, as for any run.
At commit df3316f of 2026-11-04 it carried 103 techniques: 46 for AWS, 25 for GCP, 15 for Azure, 8 for Kubernetes, 7 for Entra ID, 2 for EKS. Every technique names its ATT&CK tactic, and 16 also name an ATT&CK technique id. 89 provision prerequisites with Terraform, 61 can revert their detonation, and 36 ship with a detonation log, a real event from one of the project's runs. The catalog those counts come from is published beside this site as emulation/stratus.json, and the weekly library job rereads it from the source.
One command set covers six platforms. A team with an AWS account, an Azure subscription, and a Kubernetes cluster runs the same research stage on each, with the same record lines and the same teardown check. What changes per platform is how you authenticate, which log receives the detonation, the field that names the action, and where the run's mark lands.
| Platform | Techniques | You authenticate with | The detonation lands in | The field that names the action | Where the run's mark lands |
|---|---|---|---|---|---|
| AWS | 46 | AWS credentials in the environment or a profile, for example through aws-vault | CloudTrail | eventSource and eventName | userAgent, as stratus-red-team_ followed by the run's uuid, on the warm-up's Terraform calls and the detonation alike. Resource names carry the uuid's first 8 characters, and every Terraform resource is tagged StratusRedTeam. |
| GCP | 25 | gcloud auth application-default login, and GOOGLE_PROJECT | Cloud Audit Logs, Admin Activity | protoPayload.methodName | requestMetadata.callerSuppliedUserAgent, with the same prefix and uuid. Resource names carry the short id. |
| Azure | 15 | az login, and AZURE_SUBSCRIPTION_ID | The Activity Log | operationName.value | The SDK sends the uuid as its application id, and the Activity Log records no user agent. The run's resource group and resource names carry the short id, and they are the mark. |
| Entra ID | 7 | az login | Entra ID audit logs | The activity type, such as Add application | As for Azure. The applications, credentials, and users the run creates carry the tool's name or the short id in their display names. |
| Kubernetes | 8 | The current kubectl context; the tool does not create a cluster | The API server audit log | verb and objectRef.resource | userAgent, with the same prefix and uuid. The names of the pods, roles, and bindings carry the short id. |
| EKS | 2 | AWS credentials and the cluster's kubeconfig; the tool refuses a cluster that is not EKS | The control plane audit log, in CloudWatch, once audit logging is switched on | As for Kubernetes | As for Kubernetes. |
The run, step by step, on one AWS technique. Each step names the command and the line of the record it fills.
| Step | Command | What happens | What the record gets |
|---|---|---|---|
| Choose | stratus list --platform aws |
The list has one platform's techniques with their tactics, and stratus show prints a technique's warm-up and detonation as steps. For an AWS technique with a published detonation log, read the log first. The field names then come from a real event before anything is provisioned. | The technique id, and the field names, in the Technical Context. |
| Plan | The plan of 8.3, with the technique's warm-up and detonation as its operational flow. The tool runs as the identity you authenticate, so that identity is the starting identity, with the permissions the hypothesis assumes and no more. A second person approves. | Plan approved by: who, and when. | |
| Set the run tag | export STRATUS_RED_TEAM_CORRELATION_ID=$(uuidgen) |
The tool makes a uuid for every run and puts it in the mark. Setting it yourself records it before the run, and keeps the run's state apart from another run of the same technique. | Run tag: the uuid. |
| Warm up | stratus warmup aws.defense-evasion.cloudtrail-stop |
Terraform creates the prerequisites, named with the tool's prefix and the short id. Nothing attacks yet, and stratus status reads WARM. | Nothing yet. |
| Detonate | stratus detonate aws.defense-evasion.cloudtrail-stop |
The technique's calls run as the authenticated identity, each with the mark. Give the log its settle window before calling telemetry missing; CloudTrail delivers in minutes. | The time of the detonation. |
| Read the events | a query on the log for the mark, in the run's window |
Open the raw events and read the field names from them. The detonation's events are the positive fixtures. The warm-up's calls carry the same mark and make the first negative fixtures: the same identity and window, a different action. | Fixtures in tests/events.jsonl, scrubbed of account ids, principals, and addresses, each with the run's uuid as its fixture_source. |
| Revert, then clean up | stratus revert aws.defense-evasion.cloudtrail-stop && stratus cleanup aws.defense-evasion.cloudtrail-stop |
Revert undoes the detonation's side effect where it has one. Cleanup destroys the prerequisites, and cleanup with --all cleans every technique that can be cleaned. | Nothing. |
| Verify the teardown | stratus status, then the same query after the cleanup |
Status must read COLD. The log must show the deletes with the mark, and a search by the short id and the StratusRedTeam tag must return nothing. | Teardown verified: the date, and the query that returned nothing. |
The event a rule is written from, as the project published it for aws.defense-evasion.cloudtrail-stop, with the account, key, principal, user, and address scrubbed the way a fixture is before it is committed:
{
"eventSource": "cloudtrail.amazonaws.com",
"eventName": "StopLogging",
"eventTime": "2024-07-31T13:06:24Z",
"eventType": "AwsApiCall",
"awsRegion": "<region>",
"readOnly": false,
"requestParameters": {"name": "stratus-red-team-ct-stop-trail-buykxbqejv"},
"responseElements": null,
"sourceIPAddress": "<address>",
"userAgent": "stratus-red-team_c97089f1-1ae3-4ecc-b006-f5e8fd0f2571",
"userIdentity": {
"type": "IAMUser",
"arn": "arn:aws:iam::<account>:user/<user>",
"accountId": "<account>",
"accessKeyId": "<key>",
"principalId": "<principal>",
"userName": "<user>"
}
}
The rule is written on eventSource and eventName, and on nothing the run put there. The trail name and the user agent are the run's, and a rule that matched on either would fire on nothing real. The kit's lint fails such a rule.
The four lines the record's Technical Context needs after such a run, with made-up names:
Plan approved by: R. Second, 2026-10-16, for aws.defense-evasion.cloudtrail-stop in the sandbox account, from an IAM user with cloudtrail:StopLogging and nothing wider.
Run tag: 6c1f0a2e-7b3d-4c58-9e21-5f0d8a7b4c13. Resources stratus-red-team-ct-stop-6c1f0a2e-*; the mark is stratus-red-team_6c1f0a2e-7b3d-4c58-9e21-5f0d8a7b4c13 in userAgent.
Baseline: StopLogging events in production CloudTrail, 2026-10-09 to 2026-10-15: 0 rows.
Teardown verified: 2026-10-16. stratus status reads COLD; DeleteTrail and DeleteBucket were seen with the mark; a search for the short id and the StratusRedTeam tag returned nothing.
What the tool leaves to you:
- Point it at a sandbox account, subscription, project, or cluster, and never at production. Its own documentation says so, and the plan's approver is the person who checks the account id in the plan.
- Never write the rule on the mark. The kit's lint fails a rule whose values contain the tool's mark or the record's run tag, because such a rule fires on nothing real.
- Pick the identity. The tool runs as whoever you authenticated, and 8.4 says that is the lowest privilege the hypothesis assumes. The record names the identity and its permissions.
- Detonate once unless the technique is idempotent. 59 of the 103 techniques can be detonated again without a revert. The rest need stratus revert first, and --force on one that has a side effect leaves two side effects to clean.
- The published detonation logs are the project's, from its own runs, and for AWS only. They give you the field names early. The fixture still comes from your run, in your tenant, with your identity.
- The list is the tool's. A technique it lacks still goes through the planned run of 8.3, or becomes a contribution to the tool.
- The warm-up has a bill. Some techniques launch instances or create a cluster's worth of resources, so the plan's cost estimate covers the warm-up as well as the detonation.
- A config file at ~/.stratus-red-team/config.yaml adds a prefix and tags to the AWS resources, so teams sharing a sandbox can tell their runs apart.
No technique has been detonated from this repository. The commands and flags here were run offline against a binary built from the source: list, show, and each command's help. The fields and the marks come from the source and from the published detonation logs, and the outside checks page lists this as untested.