Home/Refreshers/Evidence from a compromised container: refresher
Evidence from a compromised container
One script keeps a pod's node alive, records the pod, snapshots the node's disks, and cuts the pod off, on GKE, EKS, AKS, or OKE.
Remember
- The responder names the pod: incident id, namespace, pod.
- Its node is kept: out of scale-down, cordoned, protected from termination on EKS.
- The pod is recorded: definition, images by digest, logs, events, node.
- The node's disks are snapshotted: or backed up on OKE, persistent volumes included, fixed at that instant.
- The pod is cut off: quarantine=true, which the quarantine network policy matches.
- Every file is hashed and stored: for evidence-verify to check later.
| Platform | Uses | The part that catches people |
|---|---|---|
| Google Cloud | A retention-locked evidence bucket, a snapshot-only custom role, and a capture script for GKE | On Autopilot, a node cordoned for about 10 minutes is repaired, which replaces it, and you cannot reach nodes over SSH. |
| AWS | An Object Lock evidence bucket, a responder role with an EKS access entry, and a capture script for EKS | On Fargate there is no node to keep or snapshot, and the pod's storage is deleted when it stops. |
| Azure | An immutable blob container, a node reader role, a snapshot-and-write responder role, and a capture script for AKS | AKS puts the OS disk on the host's own storage by default when the VM size allows it. |
| Oracle Cloud | A retention-ruled bucket, IAM policies for backups and writes, and a capture script for OKE | OCI has no termination protection for an instance. |
Run the quick start
| Download providers | terraform init |
| Preview | terraform plan |
| Apply | terraform apply |
Watch out
- The Kubernetes rights come from the incident-responder cluster role in the Kubernetes evidence template: read, label pods, cordon nodes, and no exec, secrets, or deletes.
- Nothing here uses exec or runs a debugging pod on the node.
- Memory is not captured.
Check it worked
Run the capture against a test pod. Its record, logs, and hashes are in the bucket, the node's disks have snapshots labelled with the incident, the pod carries quarantine=true, and deleting evidence is refused.