PIVTR-D
RScenario

Cloud

An attacker has cloud credentials, roles or session tokens and works through the provider's APIs. Protect the evidence first. Export logs near their retention limit and snapshot compromised volumes, then contain the identities.

First moves
  1. List the compromised identities by type: users, access keys, service accounts, roles.Intelligence/Investigations
  2. Check retention for each log source and export logs near their limit to the security information and event management (SIEM) system.Operations
  3. Co-opt cloud administrators into Operations and record their scope and channel in T3.Incident Commander
  4. Snapshot volumes and tag them with the case number before any isolation or shutdown.Operations
  5. Contain the compromised identities and revoke their active sessions.Operations
  6. Treat every region and every federated environment as in scope until cleared.Planning

Then work the page: Scope, Contain, Eradicate, Recover.

What is different

A cloud attacker works through identities and APIs. One stolen key, role, or session token can reach data across the whole environment and plant persistence with API calls that endpoint tools never see.

The evidence is in provider logs that the customer must enable and retain. Data plane logs are off by default, and a log that was never enabled cannot be reconstructed.

Chapter 18, pp. 560 to 587, and Chapter 12, pp. 253 to 255.

Scope

Start with the compromised identities: users, access keys, service accounts, and in AWS, roles. Then work out what each one can do, what it touched, and which connected environments it reaches.

Use the generic scope playbook for everything else. Event names and commands for each provider are in the cloud playbooks.

Chapter 18, pp. 569 to 572.

ProviderControl plane and identity logsDefault retentionData plane logs to enable
AWSCloudTrail management events90 days in CloudTrail Event historyCloudTrail data events or S3 server access logs, VPC flow logs, CloudWatch Logs for Lambda
AzureAzure Activity Log; Entra ID sign-in and audit logsActivity Log 90 days; Entra ID 30 days with a premium license, 7 days on the free tierStorage resource logs through diagnostic settings, VNet flow logs
GCPCloud Audit Logs, Admin ActivityAdmin Activity 400 days; Data Access 30 daysData Access audit logs (off by default for most services), VPC Flow Logs
Oracle CloudAudit service, including identity domain events365 daysObject Storage read and write service logs, VCN flow logs

Control and data plane split from Table 56, p. 575. Entra ID retention from p. 563. The other retention figures are provider defaults checked in September 2026. Check your tenant. Export anything near its limit to the SIEM on day one.

#ItemOwner
1List the compromised identities by type: users, access keys, service accounts, rolesIntelligence/Investigations
2Resolve each identity's Azure role assignments at every scope, per subscription: az role assignment list --all --include-inheritedIntelligence/Investigations
3Resolve each principal's GCP bindings at organization, folder and project: gcloud asset analyze-iam-policy --organization=<id> --identity=<principal>Intelligence/Investigations
4Resolve AWS effective permissions through service control policies (SCPs), permission boundaries, resource policies and session policiesIntelligence/Investigations
5Check every identity for stolen session tokens. A token that already passed multifactor authentication (MFA) needs no new sign-in.Intelligence/Investigations
6List the affected resources, data stores first, plus virtual machines (VMs) whose instance metadata service hands out role or service account credentialsIntelligence/Investigations
7Add the connected environments: other accounts, subscriptions and projects, on-premises, other clouds, and every environment federated to the same identity providerPlanning
8Check retention and lag for each log source before ruling out any activity, and export logs near their limitOperations
9Record data plane coverage for each sensitive store, and tell the Legal advisor where missing object-level logs force a worst-case exposure assumptionIntelligence/Investigations

Chapter 18, pp. 563, 569 to 572, 575, and 585.

Contain

Containment in the cloud is an API call, which makes it fast, scriptable and repeatable across hundreds of resources. The generic contain playbook and Evidence collection still apply.

Cloud administrators already have the access and platform knowledge to make those calls. Bring them in as co-opted members of Operations under incident response direction, with on-call rotation, authorization scope and channels agreed during preparation. Authority for each action follows who authorizes what.

Chapter 12, pp. 253 and 255.

Containment actionAWSAzureGCP
Network isolationSecurity Groups, network access control lists (ACLs)Network Security Groups (NSGs)VPC Firewall Rules
Identity containmentIdentity and access management (IAM) policy modification, access key disablingEntra ID account disabling, conditional accessCloud IAM policy binding removal
Snapshot and evidence preservationEBS snapshots, AMI creationManaged disk snapshots, VM capturePersistent disk snapshots
Termination protectionInstance termination protection (disable-api-termination)Resource deletion locksInstance deletion protection

Table 22, Multi-Cloud Containment Quick Reference, p. 255.

In Oracle Cloud the same actions use network security groups and security lists, user capabilities and group membership, and boot and block volume backups. Each provider's commands are in the cloud playbooks.

#ItemOwner
1Co-opt cloud administrators into Operations, and record their scope and channel in T3Incident Commander
2Snapshot volumes and tag them with the case number before any isolation or shutdownOperations
3Set termination or deletion protection on compromised instancesOperations
4Keep the compromised VM running, cut it off from everything except the forensics subnet, and enable flow logs on its interfaceOperations
5In AWS, add a network ACL deny on the subnet first, because a new security group leaves established connections openOperations
6In Azure, apply an NSG that denies all other trafficOperations
7Close exposed storage: turn on S3 Block Public Access, disable Azure blob anonymous access, and enforce Google Cloud Storage (GCS) public access prevention with allUsers and allAuthenticatedUsers removed. Then confirm from an unauthenticated client.Operations
8Stop compromised functions by disabling event triggers or deploying deny-and-log code, and preserve the original codeOperations
9Contain the compromised identities with the actions in the table above, and revoke their active sessionsOperations
10Copy snapshots to the dedicated forensics account and store them in immutable storage: S3 Object Lock in compliance mode, Azure immutable storage policies or GCS bucket lockIntelligence/Investigations

Chapter 12, pp. 253 to 255. Chapter 18, pp. 565, 576 to 579, and 581 to 584.

Eradicate

Review IAM first, then compute, then network. Cloud persistence needs only API access, and much of it leaves thin or no log content.

Control plane logs record that a startup script or function changed, and omit what the new code does. Enumerate every region. Follow the generic eradicate playbook for host cleanup.

Chapter 18, pp. 578 to 580.

#ItemOwner
1Remove users and service accounts created in the incident windowOperations
2List each user's AWS access keys, and delete those created in the window: aws iam list-access-keys --user-name <user>Operations
3List user-managed GCP service account keys, and delete those created in the window: gcloud iam service-accounts keys list --iam-account=<sa-email> --managed-by=userOperations
4Review role assignments, policy changes and AWS role trust policies, and remove unknown principalsOperations
5Compare OAuth consent grants, app registrations and service principal credentials against the authorized application inventory, and revoke new onesOperations
6Check federation for new SAML or OIDC identity providers in AWS IAM, and for new or changed federated domains in Entra IDOperations
7Revert MFA changes and remove attacker-registered devicesOperations
8After rotation, revoke sessions: an AWS inline deny on tokens issued before a set time, Entra ID session revocation, and invalidated GCP OAuth tokens for affected service accountsOperations
9Sweep workloads in every region: startup scripts and user data, machine images and launch templates, container images against known-good digests, functions with their triggers, and security groups, ACLs, VPN tunnels and DNS settings against baselineOperations

Chapter 12, p. 252. Chapter 18, pp. 578 to 580. Items 4 and 6 extend the book's list to trust policies and federation.

Recover

A compromised image or launch template puts the backdoor back on every new instance, so rebuild from sources you have verified. Use the generic recover playbook for validation and return to service.

Chapter 18, p. 579.

#ItemOwner
1Redeploy instances from known-good images and launch templates, and retire the compromised onesOperations
2Restore deleted snapshots, backups and altered storage lifecycle policies from offline copiesOperations
3Keep isolated instances and snapshots as evidence until they are releasedLegal advisor
4Enable data plane logging on sensitive stores, and extend retention through the SIEM before return to serviceOperations
5Set billing and budget alerts, including for regions the organization does not useFinance/Admin
6Watch affected identities for token use from unexpected addresses or locations, and for unusual refresh patternsIntelligence/Investigations
7Queue the cloud debrief questions: identity blast radius, access each resource needed, network controls bypassed, data exfiltrationPlanning

Chapter 18, pp. 562 to 564, 569, 579, 582 to 583, and 587.

Watch out
  • Terminating an instance destroys memory, processes and connections for good. Capture memory where you can, snapshot the volumes, then isolate (p. 581).
  • A new password or access key leaves existing tokens valid until they expire. Revoke sessions every time you rotate (p. 581).
  • CloudTrail and the Activity Log show what was configured. Data access and lateral movement appear only in data plane logs, flow logs and host telemetry (p. 581).
  • Attackers park persistence in regions you never use, and one identity provider across clouds carries the compromise to all of them. Enumerate every region, and treat every federated environment as in scope until cleared (pp. 581 and 585).
Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.