plugins/forensics/skills/container-forensics/SKILL.md
Forensic investigation of Docker, containerd/CRI-O, and Kubernetes — inventory, escape detection, eBPF runtime monitoring, RBAC and etcd audit. Use when investigating container compromise.
npx skillsauth add jmagly/aiwg container-forensicsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Investigates containerized environments for signs of compromise, misconfiguration, or container escape. Covers standalone Docker hosts and Kubernetes clusters. Produces a structured findings document with severity tagging.
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
Container environments introduce unique attack surfaces: privileged containers, host namespace access, writable image layers, and overpermissioned service accounts. Standard host forensics misses these vectors. This skill applies container-aware investigation procedures and maps findings to MITRE ATT&CK for Containers.
When triggered, this skill:
Detect environment type:
docker info 2>/dev/nullkubectl cluster-info 2>/dev/null or presence of /var/run/secrets/kubernetes.io/ctr version 2>/dev/nullcrictl version 2>/dev/null/.dockerenv, inspect cgroup pathsContainer inventory and privilege audit:
docker ps -a --format '{{json .}}'crictl pods and crictl ps -acrictl inspect <id> (equivalent of docker inspect)crictl images and crictl inspecti <image-id>crictl logs <container-id>--privileged: docker inspect <id> | jq '.[].HostConfig.Privileged'NetworkMode == "host"PidMode == "host"CapAdd containing SYS_ADMIN, NET_ADMIN, SYS_PTRACE/, /etc, /var/run/docker.sock, /proc, /sys)Docker — image verification:
docker images --digestsRepoDigests against expected registrylatest without a pinned digestRUN layers: docker history --no-trunc <image>Image layer analysis with dive:
dive <image> --ci for non-interactive efficiency and layer summarycurl, nc, nmap, socat, python)Docker — volume and filesystem inspection:
docker volume lsdocker diff <container_id>ReadonlyRootfs is falseDocker — socket and API exposure:
ss -tlnp | grep ':2375\|:2376'/etc/docker/daemon.jsonContainer escape indicators:
/proc/1/ns/ vs /proc/<container-pid>/ns//proc/<pid>/cgrouprunc or containerd-shim process anomalies in host process treeeBPF runtime monitoring:
journalctl -u falco and /var/log/falco.logkubectl logs -n kube-system -l app.kubernetes.io/name=tetragon or tetra geteventsTracingPolicy resources: kubectl get tracingpolicies -AKubernetes — cluster-level audit:
kubectl get pods -A -o json.spec.containers[].securityContext.runAsUser == 0 or unsethostPID, hostNetwork, or hostIPC set to trueKubernetes — RBAC audit:
cluster-admin: kubectl get clusterrolebindings -o json | jq '...'* verbs on sensitive resourcesautomountServiceAccountToken: trueKubernetes — pod security and network policy:
kubectl get nodes -o wideetcd security audit (Kubernetes control-plane only):
ps aux | grep etcd | grep listen-client-urls--client-cert-auth=true is set in the etcd process flags--encryption-provider-config)/etc/kubernetes/pki/etcd/ and flag any unexpected certsetcdctl snapshot save for offline analysisetcdctl get / --prefix --keys-onlyK8s API server audit log analysis (if audit logging is enabled):
kube-apiserver.yaml (--audit-log-path)system:anonymous) API calls to non-public endpointslist/get on secrets resources (credential harvesting pattern)exec subresource calls from non-operator users during the incident windowcreate/delete sequences on the same resource (attacker covering tracks)Write findings document:
.aiwg/forensics/findings/container-forensics.mddocker investigation
Audits the local Docker daemon.
kubernetes forensics
Requires kubectl configured with appropriate credentials.
container forensics
Detects the container context and adjusts collection accordingly.
.aiwg/forensics/findings/container-forensics.md.aiwg/forensics/evidence/docker-inspect.json.aiwg/forensics/evidence/crictl-inspect.json.aiwg/forensics/evidence/k8s-pods.json.aiwg/forensics/evidence/falco-alerts.log.aiwg/forensics/evidence/tetragon-events.json.aiwg/forensics/evidence/tracee-events.json.aiwg/forensics/evidence/etcd-snapshot-<timestamp>.db.aiwg/forensics/evidence/k8s-audit.logcontainer_forensics:
dangerous_capabilities:
- SYS_ADMIN
- NET_ADMIN
- SYS_PTRACE
- SYS_MODULE
sensitive_host_paths:
- /
- /etc
- /var/run/docker.sock
- /proc
- /sys
- /root
high_value_namespaces:
- kube-system
- kube-public
- default
data-ai
Report which research-corpus radar sidecars are overdue for refresh. Computes staleness (days since last refresh vs the cadence window) for every radar, sorted most-overdue-first. Runs via `aiwg corpus radar-status`.
data-ai
Aggregate research-corpus radar sidecars into a corpus or per-cluster freshness report — totals, overdue count, per-cluster / per-GRADE / per-trajectory breakdowns, an overdue table, and per-radar rationale snippets. Runs via `aiwg corpus radar-report`.
testing
Scaffold radar/freshness sidecars for research-corpus REFs. Pulls title/authors from the citation sidecar and GRADE from the analysis doc, defaults the refresh cadence from GRADE and the cluster from a corpus-local map, and stamps documentation/radar/REF-XXX-radar.md. Runs via `aiwg corpus radar-init`.
data-ai
Compute an entity's publication trajectory — per-year paper counts, topic drift, hot-streak detection (≥3 consecutive A-grade years), and career phase. Runs via `aiwg corpus profile-temporal`.