iac.htora.dev · security templates

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

  1. The responder names the pod: incident id, namespace, pod.
  2. Its node is kept: out of scale-down, cordoned, protected from termination on EKS.
  3. The pod is recorded: definition, images by digest, logs, events, node.
  4. The node's disks are snapshotted: or backed up on OKE, persistent volumes included, fixed at that instant.
  5. The pod is cut off: quarantine=true, which the quarantine network policy matches.
  6. Every file is hashed and stored: for evidence-verify to check later.
PlatformUsesThe part that catches people
Google CloudA retention-locked evidence bucket, a snapshot-only custom role, and a capture script for GKEOn Autopilot, a node cordoned for about 10 minutes is repaired, which replaces it, and you cannot reach nodes over SSH.
AWSAn Object Lock evidence bucket, a responder role with an EKS access entry, and a capture script for EKSOn Fargate there is no node to keep or snapshot, and the pod's storage is deleted when it stops.
AzureAn immutable blob container, a node reader role, a snapshot-and-write responder role, and a capture script for AKSAKS puts the OS disk on the host's own storage by default when the VM size allows it.
Oracle CloudA retention-ruled bucket, IAM policies for backups and writes, and a capture script for OKEOCI has no termination protection for an instance.

Run the quick start

Download providersterraform init
Previewterraform plan
Applyterraform 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.

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.