Cloud containment and evidence preservation

Containing a cloud or identity compromise without losing the evidence: preserving logs first, deactivating keys and revoking role sessions in AWS, isolating instances and snapshotting volumes, disabling identities and removing persistence in Entra and M365, and documenting every action for the timeline.

🔒 PROBy ·Lesson·10 min read·Advanced → Staff
cloud containmentevidence preservationEBS snapshotAWS IAMEntra IDincident response

01Preserve, then contain, in the right order

✓What you will learn
  • Preserve logs and volatile evidence before or alongside containment
  • Contain AWS compromises: keys, role sessions, instances, snapshots
  • Contain Entra and M365 compromises: accounts, sessions, persistence
  • Document every action so the timeline separates attacker from responder

In the cloud, containment actions are API calls that take seconds, and some destroy evidence: terminating an instance deletes its memory and, by default, its root volume; deleting a user removes context you will want in the timeline. Equally, waiting lets an attacker with admin rights delete logs. The answer is to preserve the evidence you would lose first, quickly, and in parallel with the first containment steps.

▭On the whiteboard · First 60 minutes in a cloud incident6 points
01
scope
Which identities, keys, accounts, regions and resources are involved?
02
preserve
Copy logs to a locked-down forensic account; snapshot volumes; capture memory if needed
03
contain identity
Deactivate keys, revoke sessions, disable users; block the attacker's persistence paths
04
contain resources
Isolate instances with security groups; do not terminate
05
watch
Monitor for the attacker's next move: new keys, new regions, logging changes
06
record
Log every action with UTC time, actor and command
!Assume the attacker is watching

An attacker with administrative cloud access can see you work and respond: creating new keys as fast as you delete them, or deleting resources. Plan containment as a short, coordinated sequence, and remove persistence paths in the same window rather than one by one over a day.

This is an advanced module

Cloud & identity incident response is part of the Pro pass. 4 more sections — the deep dives, the final design, follow-ups and the test — unlock with it.

Already a cyart.io or studio.cyart.io member? Your pass code is in your Studio account.