Cloud Incident Response
Provider

Docker & Containers

DevOps, containers, and the software supply chain: images and registries, CI/CD and npm/dependency attacks, container runtime and escape, and Kubernetes. Evidence here is short-lived and often off by default - preserve it before the container is gone.

Cheat sheet by area

Status: Enabled by default Partial / mixed OFF - must enable

AreaLog sourceWhat it capturesOn by default?How to obtainNotes
Workloads & RuntimeContainer stdout/stderr (json-file driver)Application console output captured by the default json-file logging driverEnabled by defaultdocker logs <id>; on host /var/lib/docker/containers/<id>/<id>-json.logLost when the container is deleted - copy before removal
Workloads & RuntimeDocker daemon logs (dockerd / journald)Daemon-level events: image pulls, container create/start/stop, errorsPartial / mixedjournalctl -u docker; or /var/log/docker.logDepends on host logging; not application activity
Control Plane & Management ActivityDocker events streamReal-time engine events (create, exec, kill, mount, network)Partial / mixeddocker events (live) or via the Engine APIEphemeral - only live unless captured to a sink
Workloads & RuntimeContainer filesystem changes (docker diff)Files added/changed/deleted in the container vs its imageEnabled by defaultdocker diff <id>Fast triage for attacker-dropped files
DevSecOps & PipelinesImage build history (docker history)Layer-by-layer build steps and commands baked into the imageEnabled by defaultdocker history --no-trunc <image>; docker inspectReveals entrypoint, added binaries, and secrets in layers
DevSecOps & PipelinesRegistry pull/push logs (Docker Hub / ECR / GCR / GAR / Harbor)Who pulled/pushed which image and tagPartial / mixedEnable registry audit; ECR via CloudTrail, GAR via Cloud AuditKey for image provenance and malicious-image scoping
DevSecOps & PipelinesImage vulnerability & malware scan (Trivy / Grype / Docker Scout)CVEs, misconfigurations, secrets, and SBOM for an imageOFF - must enabletrivy image <img>; grype <img>; syft <img> for SBOMNot a log - run on demand during triage
Control Plane & Management ActivityKubernetes API server audit logsEvery K8s API call: exec, pod create, secret access, RBAC changesOFF - must enableEnable audit policy on the API server; managed via provider (EKS/AKS/GKE)The primary control-plane evidence for K8s
Control Plane & Management ActivityKubernetes admission / RBAC eventsAdmission decisions and role/binding changesPartial / mixedAudit logs + admission webhook logsCatches privileged-pod and hostPath abuse
Workloads & RuntimeRuntime threat detection (Falco / Sysdig / Tetragon)Suspicious syscalls: shell in container, mount, ptrace, escape attemptsOFF - must enableDeploy Falco/Tetragon DaemonSetBest signal for container escape and live tradecraft
DevSecOps & PipelinesCI/CD build logs (GitHub Actions / GitLab CI / Jenkins)Build/deploy job output, dependency installs, injected stepsPartial / mixedRepo/pipeline settings; enable audit + streamingWhere poisoned-pipeline and dependency attacks show up
DevSecOps & PipelinesPackage manager & lockfiles (npm / pip / yarn)Installed dependencies, versions, and integrity hashesPartial / mixedpackage-lock.json, npm audit, install logsDiff lockfiles to spot dependency confusion / hijacks
Workloads & RuntimeContainer memory & process captureLive process list and memory of a running containerOFF - must enablensenter/ps into the namespace; sysdig capture; memory dumpFor live analysis before killing the container
Network & ConnectivityContainer/pod network flowsEast-west and egress traffic from containers (C2, exfil, mining pools)OFF - must enableCNI flow logs, VPC flow logs, or Falco/Cilium HubbleCryptomining and C2 often first seen as egress

Threat matrix

Container and supply-chain behaviours by area, and the log that first reveals them. Cross-check against the ATT&CK Containers matrix.

AreaExample adversary behaviours (ATT&CK)Primary detection source
Images & registriesT1204.003 Malicious/typosquatted image, T1525 Implant Internal ImageRegistry pull/push logs; image scan (Trivy/Grype)
Build & supply chainT1195.002 Compromise Software Supply Chain, T1677 Poisoned Pipeline, T1552.001 Credentials in FilesCI/CD build logs; lockfile diff; secret scan
RuntimeT1610 Deploy Container, T1496 Resource Hijacking, T1611 Escape to HostFalco/Tetragon runtime detection; container/pod network flows
Orchestration / controlT1190 Exploit Public-Facing App (exposed API/dashboard), T1552.007 Container API credsKubernetes API audit logs; admission controller logs
CredentialsT1552.005 Cloud Instance Metadata API, T1078.004 Cloud AccountsCloud audit logs; host/container process capture

Incident response plan

  1. Preserve volatile state first (order of volatility). Do not kill the container yet - live memory and processes are the first to vanish.
  2. Freeze and snapshot. docker pause <id>, then docker checkpoint create (CRIU - captures RAM) or in Kubernetes the kubelet checkpoint API.
  3. Capture the evidence set. docker commit (writable layer), docker export (filesystem tar), docker save (image + layers), docker cp for targeted files. Record sha256 of every artifact.
  4. Grab metadata. docker inspect, docker diff, docker top, and docker logs before removal.
  5. Establish provenance. Registry pull/push logs and docker history - which image, which tag, which layers, and where it came from.
  6. Contain. Stop the workload, revoke any credentials it held (cloud metadata, registry, CI tokens), rotate secrets, remove malicious images and pipeline steps, block egress to mining pools / C2.
  7. Scope the supply chain. Diff lockfiles, review CI/CD run history and injected steps, and check other repos/images the compromised token could publish to.
  8. Harden. Enable K8s audit logs and a runtime sensor, enforce image signing/admission (only signed, scanned images), drop privileged/hostPath/docker.sock.

How to analyse images & containers

Preserve a running container

docker pause <id>                       # freeze processes
docker checkpoint create <id> ck1        # CRIU snapshot incl. RAM (container unaware)
docker commit <id> ir-evidence:case123    # snapshot writable layer to an image
docker export <id> > container.tar        # flattened filesystem tar
docker save  <image> > image.tar          # image WITH all layers + manifest
docker cp <id>:/path ./evidence/          # targeted file extraction
sha256sum *.tar > hashes.txt              # integrity for chain of custody

Inspect an image (static analysis)

docker inspect <image>                    # entrypoint/cmd, env, mounts, user
docker history --no-trunc <image>         # per-layer build commands + baked-in secrets
dive <image>                              # interactive layer-by-layer diff
trivy image --scanners vuln,secret <image> # CVEs + secrets across layers
syft <image> -o json > sbom.json          # SBOM of every package/version
grype sbom:./sbom.json                    # vulns against NVD/GHSA/OSV
Layers never forget
Deleting a file in a later layer (RUN rm secret) does not remove it - it is still recoverable in the earlier layer. Always scan the full history, not just the final image.

Runtime & escape analysis

docker top <id>                           # process list
nsenter -t <pid> -a ; ls /proc/<pid>/     # enter namespaces; cmdline, environ, fd, maps
# Runtime detection: deploy Falco / Tetragon for syscalls (shell-in-container, mount, ptrace, escape)
# Escape red flags: --privileged, hostPath mounts of / /proc /etc, mounted /var/run/docker.sock,
# dangerous caps (CAP_SYS_ADMIN, SYS_MODULE, SYS_PTRACE). K8s audit + admission logs record the pod spec.

On modern Kubernetes the runtime is usually containerd, not the Docker daemon - the docker CLI and json-file paths may not apply. Use the kubelet checkpoint API and Kubernetes API audit logs instead.

Historical incidents & TTPs

Some entries are intentional maintainer protestware (colors/faker, node-ipc) rather than external compromises, and a few attributions (Shai-Hulud, xz-utils) are suspected but unconfirmed. Treat accordingly.

npm / JavaScript supply chain

event-stream / flatmap-stream2018
A transferred maintainer added a malicious dependency that activated only inside the Copay Bitcoin wallet build to steal wallet keys.
T1195.002T1027T1528
ua-parser-js hijack2021
Maintainer npm account takeover pushed versions that ran a preinstall script deploying an XMRig miner and a password stealer.
T1195.002T1078T1496T1059
coa / rc hijack2021
Same wave: account-takeover of coa and rc pushed postinstall scripts delivering a DanaBot credential stealer on Windows.
T1195.002T1078T1059T1555
tj-actions/changed-files (GitHub Actions)2025
A compromised bot PAT repointed version tags to a malicious commit that dumped CI/CD secrets into workflow logs across ~23,000 repos (CVE-2025-30066).
T1195.002T1552.004T1078
s1ngularity / Nx compromise2025
A GitHub Actions injection stole the npm publish token; postinstall malware harvested tokens, SSH keys, and cloud creds - even abusing local AI CLIs for recon - and exfiltrated to attacker repos.
T1195.002T1552T1567T1078.004
Shai-Hulud npm worm2025
First self-replicating npm worm: steals developer/cloud/GitHub credentials, then uses stolen npm tokens to auto-republish itself into other packages. CISA alert issued; attribution unconfirmed.
T1195.002T1552T1078

Other package ecosystems & dependency confusion

Dependency confusion (Alex Birsan)2021
Public packages named after companies internal private packages, at higher versions, were preferred by package managers - RCE inside 35+ major companies (authorized research).
T1195.002
PyTorch torchtriton2022
A malicious torchtriton on public PyPI shadowed PyTorch nightly; installs exfiltrated /etc/passwd, SSH keys, and .gitconfig.
T1195.002T1552.001T1041
Ultralytics PyPI compromise2024
A GitHub Actions script-injection obtained the PyPI token; trojanized releases deployed an XMRig miner.
T1195.002T1496T1078
xz-utils / liblzma backdoor2024
A multi-year social-engineering op inserted an obfuscated backdoor into xz 5.6.0/5.6.1 that hooked sshd for RCE/auth-bypass (CVE-2024-3094). Caught before wide distro rollout; attribution suspected but unconfirmed.
T1195.002T1554T1556T1027
Codecov bash uploader2021
A flaw in Codecov image build let an attacker modify the Bash Uploader to exfiltrate CI environment secrets for ~2 months; ~23,000 customers exposed.
T1195.002T1552.001T1078

Containers, Docker & Kubernetes

TeamTNT2019-2021+
Financially-motivated group targeting exposed Docker/Kubernetes APIs; deploys cryptominers and steals AWS/cloud DevOps credentials. MITRE group G0139.
T1610T1204.003T1552.005T1496
Kinsing / kdevtmpfsi2020+
Self-propagating campaign scanning for exposed Docker API ports; spins up a container that installs the Kinsing agent and a miner, then harvests SSH keys to spread.
T1610T1190T1496T1021.004
Doki / Ngrok botnet2020
Undetected Linux backdoor spread onto exposed Docker servers; derived its C2 domain from the Dogecoin blockchain and escaped to the host.
T1610T1568.002T1611T1090
Malicious Docker Hub images2020-2021
~30 Monero-mining images with ~20M pulls hosted on Docker Hub, using Tor/ProxyChains to evade detection.
T1204.003T1525T1496T1090
Siloscape2021
First malware targeting Windows Server containers: thread-impersonation escape to the node, then backdoors misconfigured Kubernetes clusters over Tor.
T1611T1610T1078
Tesla exposed Kubernetes dashboard2018
An unauthenticated Kubernetes console exposed AWS credentials in a pod; attackers ran stealthy cryptomining behind their own pool and Cloudflare.
T1610T1552.005T1496