iac.htora.dev · security templates

Home/Refreshers/Preserving cloud evidence: refresher

Preserving cloud evidence

Capture what disappears first, keep it where nobody can change it, and record who collected what.

Remember

  1. Order of volatility: the machine's current state, then memory, then disk, then logs.
  2. On AWS, request the EBS snapshot before memory capture. The snapshot is fixed at that instant.
  3. Keep the machine alive: termination protection on, and out of its Auto Scaling group.
  4. Hash every file as it is collected, and store it under a lock.
  5. Export logs whose retention could run out during the investigation.

Commands

Preserve with the evidence templateaws ec2 create-tags --resources <instance> --tags Key=incident,Value=<id>
Snapshot every volume at onceaws ec2 create-snapshots --instance-specification InstanceId=<instance>
Block terminationaws ec2 modify-instance-attribute --instance-id <instance> --disable-api-termination
Snapshot a Google Cloud diskgcloud compute snapshots create <name> --source-disk <disk> --source-disk-zone <zone>
Preserve on Azure or OCIaz tag update --resource-id <vm> --operation Merge --tags incident=<id>; oci compute instance update --instance-id <ocid> --freeform-tags '{"incident":"<id>"}'
Hash a filesha256sum memory.lime

Watch out

  • Writing a memory image to a disk changes that disk. Snapshot it first.
  • Snapshots encrypted with the default EBS key cannot be shared with a forensics account.
  • Exec into a compromised pod changes it, and the attacker may be watching. Capture the node.
Check it worked

Every item has a hash, a timestamp, and a collector's name, and sits under Object Lock or an immutability policy.

Read the full pageDownload PDF

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.