Home/Templates/Evidence that survives termination
Evidence that survives termination
One-page refresher: Preserving cloud evidence One-page refresher: Evidence that survives termination
One tag or label keeps a machine alive, captures its disks and, on AWS, its memory, and cuts it off, in that order, on four clouds and Kubernetes.
TerraformArgo CD
Why bother
Cloud machines are built to disappear. Autoscaling replaces unhealthy instances, and Kubernetes reschedules pods. The most common first move in an incident, terminating the bad machine, destroys the disk, the memory, and the details the investigation needs. This template turns preservation into one action anyone on the incident can take: add a tag. Everything else happens in the right order, the same way every time, including at three in the morning.
Run the drill on a test machine: tag or label it incident=drill-1. Its disks are captured, it is cut off from the network, and deleting it is refused. Each platform's tab gives the exact commands.
How it works
Set it up
Pick your platform, then open the level you want. Each level is complete on its own. Read the comments in the files as you go. Anything with a real consequence is explained on the line where it happens.
Terraform. EventBridge and a Lambda responder, with memory captured by AVML through Systems Manager
What you need first
- An account where you can create Lambda functions, EventBridge rules, and IAM roles.
- For memory capture: Linux instances managed by Systems Manager, with the AWS CLI, and a network path to S3 such as a gateway endpoint.
- The AVML binary staged in the evidence bucket before an incident. The stage_avml output prints the command.
What it creates
- A responder function, and a rule that fires when an instance is tagged incident=<id>
- A quarantine security group per VPC, created on first use, with no inbound or outbound rules
- A locked, encrypted evidence bucket containing each instance's metadata, its memory image, and a hash (Standard)
- A Systems Manager document that captures memory with AVML, and a rule that isolates the instance once capture finishes (Standard)
- A status topic for the incident channel, and a queue that keeps any event the responder failed on (Standard)
See the two alerts this creates
The code
Quick startReady
aws sts get-caller-identity
Shows the account and role you are signed in as. Check it before every apply.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.terraform destroy
When you have finished. If it refuses, How to undo it below explains why.
Formatting passedValid passedLint passed
Security scan: 35 checks passed, and eight rules flagged, each with a written reason:
- IAM write access without constraints
- Lambda concurrency limit
- Lambda dead-letter queue
- Lambda inside a VPC
- Log group encrypted with KMS
- Lambda code signing
- IAM resource of *
- Lambda tracing
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/aws 6.66.0.
Open main.tf as plain text
StandardReady
aws sts get-caller-identity
Shows the account and role you are signed in as. Check it before every apply.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: 80 checks passed, and 11 rules flagged, each with a written reason:
- S3 lifecycle configuration
- S3 event notifications
- IAM permissions management without constraints
- IAM write access without constraints
- Lambda concurrency limit
- Lambda inside a VPC
- S3 cross-region replication
- S3 server access logging
- Lambda code signing
- IAM resource of *
- Lambda tracing
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/aws 6.66.0.
Open evidence.tf as plain text
Open outputs.tf as plain text
Open responder.py as plain text
Open responder.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
HardenedReady
aws sts get-caller-identity
Shows the account and role you are signed in as. Check it before every apply.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: 73 checks passed, and none flagged.
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/aws 6.66.0.
Open .checkov.yml as plain text
Open guard.yml as plain text
Open main.tf as plain text
Open outputs.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
How to check it worked
Run terraform output verify on a test instance you do not mind isolating. Tag it incident=drill-1, then check for the snapshots, the quarantine group, and, in Standard, the manifest and memory image in the evidence bucket. Termination must be refused.
The instance uploads its own memory image, using its own role, which will not mention the evidence bucket. The bucket policy lets any instance in the account write under memory/ and read the capture tool, and nothing else. The ec2:SourceInstanceARN condition limits that to requests signed with an instance's own credentials.
Every parameter of the capture document has an allowed pattern. Each one ends up inside a shell script that runs as root. Without the patterns, whoever can run the document can run anything on any managed instance.
Isolation waits for memory capture, because the capture uploads over the network. If Systems Manager cannot reach the instance, isolation happens straight away and the status message says why.
How to undo it
terraform destroy removes the quick start. The snapshots it took stay until you delete them, which is intended. The Standard evidence bucket has prevent_destroy and Object Lock, so evidence outlives the tooling that collected it. To release an instance, move it back to its own security groups, turn termination protection off, and remove the tag.
What it costs
Nothing while idle. Each incident costs snapshot storage for its volumes and the memory image in S3.
Terraform. An Event Grid trigger and a Flex Consumption function, with a lock, disk snapshots, and a deny-all security group
What you need first
- A subscription where you can create function apps, Event Grid topics, custom roles, and role assignments: Owner, or Contributor plus User Access Administrator. The Azure CLI on the machine that applies, to deploy the function's code.
- The regions your VMs run in. Each gets a quarantine security group, because a security group only serves its own region.
- A test VM you do not mind isolating, for the drill.
What it creates
- A deny-all network security group per region, for VMs under quarantine
- A custom role that can read a VM, lock it, snapshot its disks, move its interfaces, and mark it, with no delete, stop, or run command
- A function, triggered by successful writes to VMs in the subscription, that locks, snapshots, isolates, and marks
- An immutable container under your own key containing each VM's record and hash, saved before anything changes (Standard)
- A status topic with one event per step, an identity of its own, and a container for events the function could not take (Standard)
The code
Quick startReady
location = "eastus2"main.tf, line 24responder = "sec-ir-responder"main.tf, line 25
az login
Signs the command line tool in. Terraform uses the same sign-in.export ARM_SUBSCRIPTION_ID=$(az account show --query id -o tsv)
Tells the provider which subscription. It stopped guessing in version 4.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.terraform destroy
When you have finished. If it refuses, How to undo it below explains why.
Formatting passedValid passedLint passed
Security scan: 22 checks passed, and 11 rules flagged, each with a written reason:
- Storage encrypted with your own key
- Classic blob read logging
- Storage private endpoint
- Storage soft delete
- Storage account shared key access off
- Storage SAS expiration policy
- Storage replication
- App Service plan minimum instances
- App Service plan zone redundant
- Classic queue logging
- Storage public network access off
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/azurerm 5.6.0.
Open main.tf as plain text
StandardReady
subscription_id. Subscription whose VMs the responder watches. Snapshots must stay in their disk's subscription, so the evidence goes here too.locations. Regions you run VMs in. Each gets a quarantine security group, because a security group only serves its own region. The first is where the responder and the evidence live.
az login
Signs the command line tool in. Terraform uses the same sign-in.export ARM_SUBSCRIPTION_ID=$(az account show --query id -o tsv)
Tells the provider which subscription. It stopped guessing in version 4.# terraform.tfvars subscription_id = "" locations = ""
Create this file beside the others and fill in your values. Terraform reads it on its own.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: 38 checks passed, and 18 rules flagged, each with a written reason:
- Storage encrypted with your own key
- Classic blob read logging
- Key Vault private endpoint
- Storage private endpoint
- Storage soft delete
- Storage account shared key access off
- Storage SAS expiration policy
- Key Vault firewall
- Key backed by an HSM
- Key Vault public network access off
- Event Grid topic managed identity
- Event Grid topic public network access off
- Storage replication
- App Service plan minimum instances
- App Service plan zone redundant
- Classic queue logging
- Key expiration date
- Storage public network access off
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/azurerm 5.6.0.
Open function_app.py as plain text
Open keys.tf as plain text
Open main.tf as plain text
Open outputs.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
HardenedReady
subscription_id. Subscription whose VMs the responder watches. Snapshots must stay in their disk's subscription, so the evidence goes here too.locations. Regions you run VMs in. Each gets a quarantine security group, because a security group only serves its own region. The first is where the responder and the evidence live.
az login
Signs the command line tool in. Terraform uses the same sign-in.export ARM_SUBSCRIPTION_ID=$(az account show --query id -o tsv)
Tells the provider which subscription. It stopped guessing in version 4.# terraform.tfvars subscription_id = "" locations = ""
Create this file beside the others and fill in your values. Terraform reads it on its own.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: 33 checks passed, and none flagged.
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/azurerm 5.6.0.
Open .checkov.yml as plain text
Open guard.yml as plain text
Open main.tf as plain text
Open outputs.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
How to check it worked
Tag a test VM incident=drill-1. Its lock, its snapshots in the evidence group, and its interfaces' new security group appear, and deleting it is refused. terraform output verify prints the commands.
Azure has no managed memory capture. This preserves the disks. Memory needs a tool such as AVML run on the VM through Run Command before it is cut off, and Run Command's output needs a path out, so run it before tagging.
An ephemeral OS disk cannot be snapshotted. The function skips it and, at Standard, says so on the status topic. What the attacker wrote there survives only as long as the VM.
Swapping a security group does not end connections already open. A restart does, at the cost of the machine's memory.
A lock stops deletion through Resource Manager. Whether it stops a scale set removing its own instance has not been tested here; take the instance out of autoscale by hand.
A tag change arrives as a write on the VM, or as a write on the VM's tags resource when made through the tags API. The trigger listens for both, and the function reads the VM's tags, so a change made either way is caught.
Flex Consumption takes code as a package the service builds, which the provider cannot send. Apply runs the Azure CLI to deploy it, so the CLI must be signed in on that machine.
A subscription can have one Event Grid system topic. If yours already has one, Standard takes its name; the quick start fails until you set it.
How to undo it
terraform destroy removes the function, its topics, the security groups, and the roles. Snapshots from a drill stay until you delete them. Remove the lock before deleting a drill VM.
What it costs
Nothing while idle beyond the function's storage. Each incident costs snapshot storage for its disks.
Terraform. A label-triggered function: deletion protection, disk snapshots, then a deny-all firewall rule by network tag
What you need first
- A project where you can create Cloud Run functions, Eventarc triggers, firewall rules, and service accounts.
- The VPC network your VMs use, and the region they run in. Deploy once per region.
- A test VM you do not mind isolating, for the drill.
What it creates
- Two deny-all firewall rules, in and out, for VMs tagged incident-quarantine
- A service account with the compute roles the function needs
- A function, triggered by label changes in the audit log, that protects, detaches, snapshots, and tags
- A bucket containing the function's source
- A record of each VM and its hash, saved to a retention-protected evidence bucket before anything changes (Standard)
- One responder per region, a custom role that cannot delete or stop anything, and quarantine rules on every network (Standard)
- Each step published to a status topic, and every attempt the isolated VM makes to reach out logged (Standard)
See the one alert this creates
The code
Quick startReady
project_id = "your-project-id"main.tf, line 23region = "us-central1"main.tf, line 24network = "default"main.tf, line 25
gcloud auth application-default login
The sign-in Terraform reads. A plain gcloud auth login is not enough.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.terraform destroy
When you have finished. If it refuses, How to undo it below explains why.
Formatting passedValid passedLint passed
Security scan: 37 checks passed, and two rules flagged, each with a written reason:
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/google 8.4.0.
Open main.tf as plain text
StandardReady
project_id. Project whose VMs the responder watches.regions. Regions you run VMs in. The trigger only hears label changes in its own region, so each gets a responder.networks. VPC networks your VMs use. Each gets the two deny-all quarantine rules.
gcloud auth application-default login
The sign-in Terraform reads. A plain gcloud auth login is not enough.# terraform.tfvars project_id = "" regions = "" networks = ""
Create this file beside the others and fill in your values. Terraform reads it on its own.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: 37 checks passed, and three rules flagged, each with a written reason:
- Cloud Storage access logs
- Cloud Storage versioning
- Pub/Sub topics encrypted with a customer-managed key
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/google 8.4.0.
Open main.py as plain text
Open main.tf as plain text
Open outputs.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
HardenedReady
project_id. Project whose VMs the responder watches.regions. Regions you run VMs in. The trigger only hears label changes in its own region, so each gets a responder.networks. VPC networks your VMs use. Each gets the two deny-all quarantine rules.
gcloud auth application-default login
The sign-in Terraform reads. A plain gcloud auth login is not enough.# terraform.tfvars project_id = "" regions = "" networks = ""
Create this file beside the others and fill in your values. Terraform reads it on its own.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: 36 checks passed, and none flagged.
Last run 2026-10-02 with OpenTofu v1.12.6 against hashicorp/archive 2.8.1, hashicorp/google 8.4.0.
Open .checkov.yml as plain text
Open guard.yml as plain text
Open main.tf as plain text
Open outputs.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
How to check it worked
Label a test VM incident=drill-1. Its snapshots appear, it carries the quarantine tag, and deleting it is refused. terraform output verify prints the four commands.
Google Cloud has no managed memory capture. This preserves the disks. Memory needs a tool such as AVML run on the VM before it is cut off.
Firewall rules belong to one VPC network. A VM on another network is labelled, snapshotted, and tagged, and stays reachable.
The trigger only hears label changes in its own region. The quick start covers one; Standard deploys a responder to each region you list.
Standard does not retry a failed run, because a retry would snapshot again under a new name. A run that stops early shows as a missing done message on the status topic.
In newer projects, builds run as the default compute service account, which may lack the Cloud Build Builder role. Grant it if the deploy fails at the build step.
How to undo it
terraform destroy removes the function, trigger, firewall rules, and service account. Snapshots from a drill stay until you run gcloud compute snapshots delete. Turn deletion protection off before deleting a drill VM.
What it costs
Nothing while idle beyond a few kilobytes of source in a bucket. Each incident costs snapshot storage for its disks.
Terraform. An Events rule and a code-only function, with volume backups and a Zero Trust Packet Routing quarantine attribute
What you need first
- A compartment where you can create functions, Events rules, dynamic groups, and policies, and rights to create policies and a security attribute namespace in the tenancy.
- Zero Trust Packet Routing enabled in the tenancy, unless you choose isolation by stopping the instance at Standard. Oracle enables it in the home region, and gives no way to turn it off.
- A private subnet with a service gateway, for the function. python3 with pip, zip, and the OCI CLI on the machine that applies, to package it.
- A test instance you do not mind isolating, for the drill.
What it creates
- A security attribute, in a namespace of its own, that no ZPR policy allows traffic for
- A dynamic group and policies that let the function read instances, back up their volumes, and mark them, with no delete or power action
- A function, from a code archive you build, triggered by every instance update in the compartment, that backs up, isolates, and marks
- A retention-ruled bucket under your own key containing each instance's record and hash, saved before anything changes (Standard)
- The instance taken out of its pool, a choice between the attribute and a power off, and a notification topic with one message per step (Standard)
See the one alert this creates
The code
Quick startReady
tenancy_ocid = "ocid1.tenancy.oc1..replace-me"main.tf, line 25compartment_ocid = "ocid1.compartment.oc1..replace-me"main.tf, line 26region = "us-ashburn-1"main.tf, line 27subnet_ocid = "ocid1.subnet.oc1..replace-me"main.tf, line 28
oci os ns get
Prints your Object Storage namespace, which proves ~/.oci/config works.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.terraform destroy
When you have finished. If it refuses, How to undo it below explains why.
Formatting passedValid passedLint passed
Security scan: two checks passed, and three rules flagged, each with a written reason:
Last run 2026-10-02 with OpenTofu v1.12.6 against oracle/oci 9.8.0.
Open main.tf as plain text
StandardReady
tenancy_ocid. The tenancy. The dynamic group, the security attribute namespace, and their policies live here.compartment_ocid. Compartment whose instances the responder watches. The function runs here too.region. Region identifier, such as us-ashburn-1.subnet_ocid. A private subnet for the function, with a service gateway so it can reach the Oracle APIs.
oci os ns get
Prints your Object Storage namespace, which proves ~/.oci/config works.# terraform.tfvars tenancy_ocid = "" compartment_ocid = "" region = "" subnet_ocid = ""
Create this file beside the others and fill in your values. Terraform reads it on its own.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: four checks passed, and three rules flagged, each with a written reason:
Last run 2026-10-02 with OpenTofu v1.12.6 against oracle/oci 9.8.0.
Open func.py as plain text
Open keys.tf as plain text
Open main.tf as plain text
Open outputs.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
HardenedReady
tenancy_ocid. The tenancy. The dynamic group, the security attribute namespace, and their policies live here.compartment_ocid. Compartment whose instances the responder watches. The function runs here too.region. Region identifier, such as us-ashburn-1.subnet_ocid. A private subnet for the function, with a service gateway so it can reach the Oracle APIs.
oci os ns get
Prints your Object Storage namespace, which proves ~/.oci/config works.# terraform.tfvars tenancy_ocid = "" compartment_ocid = "" region = "" subnet_ocid = ""
Create this file beside the others and fill in your values. Terraform reads it on its own.terraform init
Downloads the provider. Run it once per folder.terraform plan
Shows what will be created. Changes nothing. Read it.terraform apply
Shows the plan again and waits for you to type yes.terraform output verify
Prints the commands that prove it worked.
Formatting passedValid passedLint passed
Security scan: three checks passed, and none flagged.
Last run 2026-10-02 with OpenTofu v1.12.6 against oracle/oci 9.8.0.
Open .checkov.yml as plain text
Open guard.yml as plain text
Open main.tf as plain text
Open outputs.tf as plain text
Open variables.tf as plain text
Open versions.tf as plain text
How to check it worked
Tag a test instance incident=drill-1. Its boot volume backup appears with the incident tag, the quarantine attribute is set, and SSH to it times out. terraform output verify prints the commands.
Oracle Cloud has no termination protection for an instance, and no managed memory capture. The backups are fixed when requested, so the first minute matters.
Security lists and network security groups only allow traffic; neither can deny it. The quarantine works through Zero Trust Packet Routing: a resource with a security attribute passes only traffic a ZPR policy allows, and none allows this one. Enabling ZPR is a tenancy-wide change, and Oracle's documentation gives no way to turn it off.
A tag update replaces every freeform tag on the instance. The drill command shows one tag; merge your own in. The function reads the tags first and keeps them.
Whether an update that changes only tags emits the instance update event is not stated in Oracle's documentation. Run the drill before you rely on it.
The Oracle SDK is about 50 MB packaged, over the limit for sending code through the API, so the archive goes through a bucket. The quick start builds and uploads it during apply; Standard has build.sh, and Terraform uploads the result. Both fetch wheels built for the runtime's Linux, whatever machine they run on.
Detaching from an instance pool makes the pool launch a replacement. An autoscaling configuration then sees a healthy pool.
How to undo it
terraform destroy removes the function, the rule, the policies, and the attribute. Backups from a drill stay until you delete them. Remove the security attribute from a drill instance by hand before deleting it.
What it costs
Nothing while idle beyond a few kilobytes in a bucket. Each incident costs full backup storage for its volumes.
Argo CD. A quarantine network policy in every namespace, and a responder role that cannot change the evidence
What you need first
- A network plugin that enforces network policies. Without one, the policy is accepted and does nothing.
- For Standard, Kyverno, which the admission control template installs.
- For Standard, a group named incident-responders mapped from your identity provider.
What it creates
- A network policy that cuts off pods labelled quarantine=true, in one namespace
- The same policy in every namespace, including new ones, and put back if deleted (Standard)
- A responder role that can read, relabel pods, and cordon nodes, with no exec, secrets, or deletes (Standard)
The code
Quick startReady
kubectl config current-context
Shows which cluster kubectl is pointed at. Check it first.kubectl apply -f quarantine.yaml
Hands the Application to Argo CD.kubectl -n argocd get applications
Lists applications with their sync and health status.
Kubernetes schema passed
Last run 2026-10-02.
Open quarantine.yaml as plain text
StandardReady
kubectl config current-context
Shows which cluster kubectl is pointed at. Check it first.kubectl apply -k .
Applies everything the kustomization lists, in order.kubectl -n argocd get applications
Lists applications with their sync and health status.
Kubernetes schema passedBuilds passed
Last run 2026-10-02.
Open kustomization.yaml as plain text
Open quarantine-everywhere.yaml as plain text
Open responder-rbac.yaml as plain text
HardenedReady
kubectl config current-context
Shows which cluster kubectl is pointed at. Check it first.kubectl apply -k .
Applies everything the kustomization lists, in order.kubectl -n argocd get applications
Lists applications with their sync and health status.
Builds passed
Last run 2026-10-02.
Open kustomization.yaml as plain text
How to check it worked
Label a test pod quarantine=true. Connections out of it time out, and nothing can reach it. Remove the label and traffic flows again.
Take the pod out of its controller before anything else. A rollout or scale-down can otherwise delete it, and the evidence with it.
Exec into the quarantined pod changes it, and the attacker may be watching. Capture from the node, or checkpoint the container where the cluster supports it.
The responder role has no exec on purpose. Whoever needs it during an incident should get it for that incident, and the audit log will show when.
How to undo it
Run kubectl delete -f quarantine.yaml, or delete the Kyverno policy and the network policies it generated. Remove the quarantine label to let a pod talk again.
What it costs
Nothing. Network policies and RBAC are free.
Good to know
- Check what you downloaded with evidence-verify, a small Go program on the Verifying evidence page. It recomputes every file's SHA-256 against the hash recorded beside it at capture, and writes a report for the case notes.
- The order follows the order of volatility, with one twist. Memory disappears first, so it would normally be captured first. Writing a memory image changes the disk, though. An EBS snapshot is fixed at the instant you request it, so asking for the snapshot first costs the memory capture a few seconds and keeps the disk evidence clean.
- Changing security groups does not always end connections that are already open. Tracked connections can keep flowing until they time out. If they must stop immediately, add a network ACL deny for the subnet as well, knowing it affects every instance in that subnet.
- Moving evidence to a separate forensics account keeps it out of reach of whoever compromised this one. Snapshots encrypted with the default EBS key cannot be shared, so volumes need a customer-managed key for that.
- Run a drill on a test instance every quarter. The first time this runs should never be the real incident.