agentleFS
Bizaza-devsBizaza-devs/Claude-PurpleTeam/skills/stratus-red-team-cloud/SKILL.md

stratus-red-team-cloud

Skill0 starsChanged 4 days agoMITView on GitHub

Operator guide for Stratus Red Team (DataDog) cloud and Kubernetes attack-technique emulation in a dedicated sandbox AWS account, Azure subscription, GCP project or lab cluster: technique lifecycle and state (warmup, detonate, revert, cleanup; COLD / WARM / DETONATED), stratus list with platform and tactic filters, stratus show, credentials and blast radius, cost notes, and mapping technique IDs to CloudTrail eventNames, AzureActivity operations, GCP audit methodName and Kubernetes audit verbs, then to GuardDuty / Defender for Cloud findings and hunts. Use when asked to \"run stratus\", \"detonate aws.defense-evasion.cloudtrail-stop\", test cloud detections, validate CloudTrail or k8s audit alerting, or verify no leftover IAM users or keys after cloud emulation.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Not for: attacking cloud accounts you do not own, testing a provider's own infrastructure, or offensive cloud exploitation frameworks.

    line 20
  2. Very specific:

    Cleanup is mandatory and verified: Every technique ends with stratus cleanup and a manual check for leftover IAM users, access keys, roles, …

    line 42
  3. Very specific:

    Revert: if you will re-detonate; otherwise cleanup (stratus cleanup <id>).

    line 61
  4. Distinctive:

    Do not delete it before cleanup, or Stratus loses track of what it created.

    line 77
  5. Distinctive:

    Use a dedicated operator principal (IAM role, service principal, service account) so audit queries can filter on it.

    line 111
  6. Very specific:

    Prefer tools designed for detection testing.

    line 243

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

Stratus Red Team: cloud and Kubernetes emulation

When to use

  • A cloud detection (CloudTrail, AzureActivity, GCP audit, k8s audit, GuardDuty, Defender for Cloud, Security Command Center) needs a true-positive test.
  • An exercise plan (adversary-emulation-planning, /exercise) includes cloud control-plane techniques: persistence via IAM, defence evasion of logging, credential access to secrets, exfiltration by resource sharing.
  • Regression after a change to the log pipeline, an organisation trail, a SIEM connector or a cloud detection rule.
  • Proving that a sandbox account's telemetry actually reaches the SIEM before real exercises start.

Not for: attacking cloud accounts you do not own, testing a provider's own infrastructure, or offensive cloud exploitation frameworks. Endpoint techniques: atomic-red-team; multi-host chains: caldera-operations. Hunting the results: hunt-cloud-control-plane, hunt-k8s-runtime; response playbooks: ir-cloud-aws, ir-azure-entra; fixes: hardening-cloud.

Ground rules

  • Dedicated sandbox only. A separate AWS account, Azure subscription, GCP project or lab cluster created for emulation, with no production data, no production workloads and no trust relationships into production. Never run Stratus with production or organisation-management credentials.
  • Authorisation gate. Written approval naming the sandbox account/subscription/ project/cluster, the technique IDs, the window, the operator identity and the abort contact. Cloud provider acceptable-use and testing policies apply; read them for your provider.
  • Read stratus show before every detonation. Know what warmup creates, what detonation does, what is shared externally, and how revert/cleanup undo it.
  • No evasion beyond the technique itself. Some techniques are defence evasion (stopping a trail, deleting flow logs). Run them only in the sandbox, only against the sandbox's own resources, and never against the organisation trail or central log archive. Do not disable detectors to make anything else "work".
  • Cleanup is mandatory and verified. Every technique ends with stratus cleanup and a manual check for leftover IAM users, access keys, roles, policies, shared snapshots/AMIs, instances and buckets.
  • SOC deconfliction. The SOC knows the sandbox account ID, operator principal and window, or the SOC lead approved a no-notice test.
  • Evidence per technique. The detonation timestamp, the audit records (event ID, eventName, principal), the finding or alert ID, or the documented absence of one.

Workflow

  1. Gate: approval, sandbox identifiers, exercise ID (e.g. PX-2026-011).
  2. Verify sandbox telemetry: the account's trail / diagnostic settings / audit sinks / cluster audit policy deliver to the SIEM (a harmless API call appears).
  3. Select techniques with stratus list filters; read stratus show <id>.
  4. Write expectations: audit events, the provider finding, the SIEM rule, the hunt skill (mapping table below).
  5. Warm up (stratus warmup <id>) and record what was created.
  6. Detonate (stratus detonate <id>); record UTC start/end.
  7. Observe: query audit logs and alerts for the window and principal.
  8. Revert if you will re-detonate; otherwise cleanup (stratus cleanup <id>).
  9. Verify leftovers with provider CLI checks (below); stratus status shows COLD.
  10. Score and record in purple-exercise-tracking; gaps to detection-engineering or logging-coverage.

Concepts and lifecycle

StepCommandEffectState after
Warm upstratus warmup <id>Creates prerequisite infrastructure (Terraform managed by Stratus)WARM
Detonatestratus detonate <id>Performs the attack technique (warms up first if needed)DETONATED
Revertstratus revert <id>Undoes the detonation, keeps prerequisites (not all techniques support it)WARM
Clean upstratus cleanup <id>Reverts if needed and destroys prerequisitesCOLD
  • stratus status lists technique states; state and Terraform files live in a local Stratus directory in the operator's home (e.g. ~/.stratus-red-team/; verify). Do not delete it before cleanup, or Stratus loses track of what it created.
  • stratus detonate <id> --cleanup detonates then cleans up in one go; --force re-detonates an already detonated technique (verify both with stratus detonate --help).
  • stratus cleanup --all cleans every warmed or detonated technique (verify flag).
  • Stratus can tag the resources it creates and set a recognisable user agent on its API calls; check the docs for your version, then use both to scope SIEM queries and leftover checks (verify).
  • Pin the Stratus version in the plan; stratus version prints it. Technique IDs and behaviour can change between releases.

Listing and inspecting techniques

stratus list                                    # all techniques with platform and tactic
stratus list --platform aws                     # aws | azure | gcp | kubernetes | eks | entra-id (confirm platforms with --help)
stratus list --mitre-attack-tactic persistence  # filter by ATT&CK tactic (verify flag name with stratus list --help)
stratus show aws.persistence.iam-backdoor-user  # description, warmup, detonation, revert, ATT&CK mapping
stratus status                                  # COLD / WARM / DETONATED per technique
  • Technique IDs in this skill are examples as of writing; confirm each with stratus list and stratus show on your pinned version.

Credentials and environment

  • AWS: standard SDK credential chain. Use a named profile for the sandbox account (AWS_PROFILE=stratus-sandbox) and confirm with aws sts get-caller-identity before every session. Set the region explicitly (AWS_REGION).
  • Azure: az login to the sandbox tenant/subscription and the subscription ID in the environment variable the docs specify (verify name, e.g. AZURE_SUBSCRIPTION_ID).
  • GCP: application default credentials for the sandbox project and the project ID in the environment variable the docs specify (verify name).
  • Kubernetes / EKS: the current kubeconfig context. Check kubectl config current-context before every run; Stratus acts on whatever cluster that points to.
  • Use a dedicated operator principal (IAM role, service principal, service account) so audit queries can filter on it. Remove its access after the exercise.
# Pre-flight: prove you are in the sandbox, not production (abort on mismatch)
aws sts get-caller-identity --query Account --output text   # must equal the approved sandbox account ID
az account show --query id -o tsv                           # must equal the approved sandbox subscription
gcloud config get-value project                             # must equal the approved sandbox project
kubectl config current-context                              # must equal the approved lab cluster

Cost and blast radius

  • Warmup can create billable resources: EC2 instances and VPCs, RDS instances (slow and costly), Lambda functions, S3 buckets, Azure VMs and disks, GCP disks. Read stratus show, set a sandbox budget alarm, and clean up the same day.
  • Exfiltration techniques share resources with an external account or principal chosen by the tool (AMI, EBS snapshot, RDS snapshot, bucket policy, disk). Read which in stratus show, keep the shared resource empty of real data, and confirm the share is gone after revert/cleanup.
  • Credential-access techniques read secrets the warmup creates; never place real secrets in the sandbox.
  • Kubernetes techniques create privileged pods, cluster role bindings, tokens and CSRs; run them only on a disposable lab cluster with no production workloads or cloud permissions beyond the lab.
  • Defence-evasion techniques act on sandbox logging (trail, flow logs, event selectors). An organisation trail or central archive must keep recording the sandbox: that is what you are testing.

Technique to telemetry mapping

Examples; confirm IDs with stratus list and event names in your logs.

Technique ID (example)ATT&CKExpected audit eventsProvider finding (if enabled)Hunt / IR skill
aws.defense-evasion.cloudtrail-stopT1562.008CloudTrail StopLoggingGuardDuty Stealth:IAMUser/CloudTrailLoggingDisabledhunt-cloud-control-plane, ir-cloud-aws
aws.defense-evasion.cloudtrail-deleteT1562.008DeleteTrailGuardDuty stealth finding (verify type)hunt-cloud-control-plane
aws.defense-evasion.cloudtrail-event-selectorsT1562.008PutEventSelectors-hunt-cloud-control-plane
aws.defense-evasion.vpc-remove-flow-logsT1562.008DeleteFlowLogs-hunt-cloud-control-plane
aws.persistence.iam-create-admin-userT1136.003CreateUser, AttachUserPolicy-hunt-cloud-control-plane, ir-cloud-aws
aws.persistence.iam-backdoor-userT1098.001CreateAccessKey for another user-hunt-cloud-control-plane
aws.persistence.iam-create-user-login-profileT1098CreateLoginProfile-hunt-cloud-control-plane
aws.persistence.iam-backdoor-roleT1098UpdateAssumeRolePolicy-hunt-cloud-control-plane
aws.persistence.lambda-backdoor-functionT1546Lambda AddPermission (resource policy)-hunt-cloud-control-plane
aws.credential-access.secretsmanager-retrieve-secretsT1552ListSecrets, GetSecretValue burst-hunt-cloud-control-plane
aws.credential-access.ec2-steal-instance-credentialsT1552.005SendCommand, then calls with instance-role creds from outsideGuardDuty UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWSir-cloud-aws
aws.execution.ssm-send-commandT1651SendCommand-hunt-cloud-control-plane
aws.execution.ec2-user-dataT1059ModifyInstanceAttribute (userData), StopInstances / StartInstances-hunt-cloud-control-plane
aws.exfiltration.ec2-share-ebs-snapshotT1537ModifySnapshotAttribute with external account-hunt-exfiltration, ir-cloud-aws
aws.exfiltration.ec2-share-amiT1537ModifyImageAttribute-hunt-exfiltration
aws.exfiltration.s3-backdoor-bucket-policyT1537PutBucketPolicy granting external principal-hunt-exfiltration
azure.execution.vm-run-commandT1651AzureActivity MICROSOFT.COMPUTE/VIRTUALMACHINES/RUNCOMMAND/ACTIONDefender for Cloud (verify)hunt-cloud-control-plane, ir-azure-entra
azure.execution.vm-custom-script-extensionT1651MICROSOFT.COMPUTE/VIRTUALMACHINES/EXTENSIONS/WRITE-hunt-cloud-control-plane
azure.exfiltration.disk-exportT1537MICROSOFT.COMPUTE/DISKS/BEGINGETACCESS/ACTION-hunt-exfiltration
gcp.persistence.create-service-account-keyT1098.001Admin Activity google.iam.admin.v1.CreateServiceAccountKeySCC (verify)hunt-cloud-control-plane
gcp.persistence.invite-external-userT1098SetIamPolicy adding an external member-hunt-cloud-control-plane
gcp.privilege-escalation.impersonate-service-accountsT1078.004GenerateAccessToken (Data Access logs must be on)-hunt-cloud-control-plane
k8s.credential-access.dump-secretsT1552.007k8s audit verb=list resource=secretsGuardDuty EKS / Defender for Containers (verify)hunt-k8s-runtime
k8s.credential-access.steal-serviceaccount-tokenT1528get on secrets of type service-account token-hunt-k8s-runtime
k8s.persistence.create-admin-clusterroleT1098create clusterroles / clusterrolebindings-hunt-k8s-runtime
k8s.persistence.create-client-certificateT1098create certificatesigningrequests, approval update-hunt-k8s-runtime
k8s.privilege-escalation.privileged-podT1611create pods with securityContext.privileged: trueFalco / runtime sensorhunt-k8s-runtime
k8s.privilege-escalation.hostpath-volumeT1611create pods with a hostPath volume-hunt-k8s-runtime
  • Data Access / data-plane events (Secrets Manager reads, GCP data access, S3 object reads, k8s get/list on secrets) are only present if those log types are enabled. A "not seen" here is often a logging-coverage gap, not a detection gap.

Observing the detonation

-- Athena over CloudTrail: events from the Stratus operator in the window (adjust table, account, principal, time)
SELECT eventtime, eventsource, eventname, useridentity.arn, sourceipaddress, useragent, errorcode
FROM cloudtrail_logs
WHERE recipientaccountid = '111122223333'
  AND useridentity.arn LIKE '%stratus-operator%'
  AND eventtime BETWEEN '2026-11-27T10:00:00Z' AND '2026-11-27T10:45:00Z'
ORDER BY eventtime;
// Sentinel: AWS and Azure control-plane events for the sandbox in the window (adjust account/subscription, time)
let t0 = datetime(2026-11-27T10:00:00Z); let t1 = datetime(2026-11-27T10:45:00Z);
union
 (AWSCloudTrail | where TimeGenerated between (t0 .. t1) and RecipientAccountId == "111122223333"
   | project TimeGenerated, Src="aws", EventName, UserIdentityArn, SourceIpAddress, UserAgent, ErrorCode),
 (AzureActivity | where TimeGenerated between (t0 .. t1) and SubscriptionId == "<sandbox-subscription-id>"
   | project TimeGenerated, Src="azure", OperationNameValue, Caller, CallerIpAddress, ActivityStatusValue),
 (SecurityAlert | where TimeGenerated between (t0 .. t1)
   | project TimeGenerated, Src="alert", AlertName, ProviderName, SystemAlertId)
| order by TimeGenerated asc
# Kubernetes audit (self-managed, JSON lines): writes and secret reads by the operator in the window; adjust path and user
jq -c 'select(.user.username=="stratus-operator" and (.verb|test("create|patch|list|get")))
       | {ts:.requestReceivedTimestamp, verb, res:.objectRef.resource, ns:.objectRef.namespace, name:.objectRef.name}' \
   /var/log/kubernetes/audit/audit.log
  • GuardDuty and similar services can take minutes to raise findings; record time to finding, and wait the documented delay before scoring not seen.

Verifying no leftovers

# AWS sandbox: IAM users, keys, roles and shares that should not exist after cleanup
aws iam list-users --query 'Users[].UserName'
for u in $(aws iam list-users --query 'Users[].UserName' --output text); do aws iam list-access-keys --user-name "$u" --query 'AccessKeyMetadata[].[UserName,AccessKeyId,CreateDate]' --output text; done
aws iam list-roles --query 'Roles[?contains(RoleName, `stratus`)].RoleName'          # naming varies: compare with pre-run baseline
aws ec2 describe-snapshots --owner-ids self --query 'Snapshots[].SnapshotId'
aws ec2 describe-images --owners self --query 'Images[].ImageId'
aws ec2 describe-instances --query 'Reservations[].Instances[?State.Name!=`terminated`].InstanceId'
aws cloudtrail get-trail-status --name <sandbox-trail>                                  # IsLogging must be true again
# Kubernetes lab cluster: residue from k8s techniques
kubectl get clusterrolebindings,clusterroles | grep -i stratus
kubectl get csr
kubectl get pods -A --field-selector=status.phase=Running | grep -i stratus
  • Compare against a pre-run baseline export (users, roles, keys, shares, resources); "nothing named stratus" is not proof.
  • stratus status must show every technique COLD. If cleanup failed, rerun it; if it still fails, remove resources manually and record each one.
  • Confirm defence-evasion techniques were reverted (trail logging, flow logs, event selectors), otherwise the sandbox stays blind for the next test.

Other cloud emulation options

  • Prefer tools designed for detection testing. Atomic Red Team includes some cloud and container atomics (atomic-red-team); DataDog's Grimoire builds on Stratus to capture the logs a technique produces (check current status). Vulnerable-by-design labs exist for training; they are environments, not detection tests (check current status of any you use).
  • Exclude offensive exploitation frameworks such as Pacu from purple exercises run under this skill: they are built for attack, not for measured detection testing.

False positives & benign look-alikes

  • Infrastructure-as-code pipelines create users, keys and roles legitimately; the detection must distinguish the pipeline principal, not allowlist the Stratus one.
  • Terraform calls made during warmup and cleanup also land in audit logs; score only the detonation window and calls.
  • Backup and DR tooling share snapshots across accounts by design; the rule needs an allowlist of known destination accounts.
  • Admins legitimately use Run Command, SSM and kubectl exec; context (principal, time, target) separates them.
  • Activity in the sandbox outside the operator principal or window is not the purple team until proven: stop and triage.

Pitfalls

  • Running with a default profile or kube context that points at production.
  • Interrupting a detonation, deleting the local state, and orphaning resources.
  • Testing data-plane techniques with Data Access logging off and blaming the rule.
  • Running defence-evasion techniques against a trail other teams depend on.
  • Scoring before GuardDuty / Defender / SCC delivery delay has passed.
  • Leaving warmed-up RDS or EC2 resources running overnight.
  • Assuming cleanup worked without listing IAM users, keys and shares.

Output

  • Per technique: ID, Stratus version, sandbox identifiers, operator principal, UTC window, expected vs observed audit events (event IDs), provider finding or alert ID or "none", time to alert, outcome, cleanup verified (how, with listing output).
  • Leftover check output stored with the evidence; sandbox budget/cost note.
  • Gaps to detection-engineering (rules), logging-coverage (Data Access, k8s audit policy, connectors) and hardening-cloud (preventive controls such as SCPs or organisation policies); response drills via ir-cloud-aws / ir-azure-entra.
  • Results in purple-exercise-tracking; scorecard via /scorecard; single technique cards via /emulate.

References

  • DataDog: Stratus Red Team documentation and technique reference (per platform).
  • MITRE ATT&CK Cloud and Containers matrices, e.g. https://attack.mitre.org/techniques/T1562/008/
  • AWS documentation: CloudTrail event reference, GuardDuty finding types.
  • Microsoft Learn: Azure Activity log schema, Defender for Cloud alerts reference.
  • Google Cloud documentation: Cloud Audit Logs (Admin Activity, Data Access).
  • Kubernetes documentation: Auditing (audit policy and event fields).

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.