container-forensics
БесплатноБез исполняемых скриптовНе проверенForensic investigation of Docker, containerd/CRI-O, and Kubernetes — inventory, escape detection, eBPF runtime monitoring, RBAC and etcd audit. Use when…
от jmagly★ 233 звезды на GitHubОб этом скилле
container-forensics
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.
Triggers
Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):
- "Falco" / "Tetragon" / "Tracee" → eBPF runtime monitoring tools
- "dive" → Docker image layer analysis
- "crictl" → containerd/CRI-O environment forensics
- "escape" → container escape investigation
Purpose
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.
Behavior
When triggered, this skill:
Detect environment type:
- Check for Docker:
docker info 2>/dev/null - Check for Kubernetes:
kubectl cluster-info 2>/dev/nullor presence of/var/run/secrets/kubernetes.io/ - Check for containerd-only (no Docker):
ctr version 2>/dev/null - Check for CRI-O or containerd via CRI:
crictl version 2>/dev/null - Determine if running inside a container: check for
/.dockerenv, inspect cgroup paths
- Check for Docker:
Container inventory and privilege audit:
- List all containers (running and stopped):
docker ps -a --format '{{json .}}' - For containerd/CRI-O environments:
crictl podsandcrictl ps -a - Inspect individual containers:
crictl inspect <id>(equivalent ofdocker inspect) - List images on CRI nodes:
crictl imagesandcrictl inspecti <image-id> - Pull container logs via CRI:
crictl logs <container-id> - Flag containers with dangerous flags:
--privileged:docker inspect <id> | jq '.[].HostConfig.Privileged'- Host network mode:
NetworkMode == "host" - Host PID namespace:
PidMode == "host" - Dangerous capability additions:
CapAddcontainingSYS_ADMIN,NET_ADMIN,SYS_PTRACE
- Enumerate bind mounts of sensitive host paths (
/,/etc,/var/run/docker.sock,/proc,/sys)
- List all containers (running and stopped):
Docker — image verification:
- List all local images with digests:
docker images --digests - Check image provenance: compare
RepoDigestsagainst expected registry - Flag images tagged
latestwithout a pinned digest - Inspect image build history for suspicious
RUNlayers:docker history --no-trunc <image> - Check for images not associated with any running or stopped container (orphaned images)
- List all local images with digests:
Image layer analysis with dive:
- Run
dive <image> --cifor non-interactive efficiency and layer summary - Identify layers that delete files immediately after downloading them (evidence wiping pattern)
- Flag layers installing unexpected tooling (
curl,nc,nmap,socat,python) - Identify unusually large layers inconsistent with the image's declared purpose
- Check for world-writable permissions set in later layers after a trusted base image
- Run
Docker — volume and filesystem inspection:
- List named volumes:
docker volume ls - Inspect volumes mounted into containers for sensitive data paths
- Examine container overlay filesystem changes:
docker diff <container_id> - Flag containers with writable root filesystems where
ReadonlyRootfsis false
- List named volumes:
Docker — socket and API exposure:
- Check if Docker socket is bind-mounted into any container — this grants effective root on the host
- Check for TCP Docker API exposure:
ss -tlnp | grep ':2375\|:2376' - Review Docker daemon configuration:
/etc/docker/daemon.json
Container escape indicators:
- Processes running in container namespaces that share host PID/network: compare namespace inodes in
/proc/1/ns/vs/proc/<container-pid>/ns/ - Unexpected cgroup escape patterns in
/proc/<pid>/cgroup - Files written to host paths from within container overlay mounts
runcorcontainerd-shimprocess anomalies in host process tree
- Processes running in container namespaces that share host PID/network: compare namespace inodes in
eBPF runtime monitoring:
- Check for Falco service and alert logs:
journalctl -u falcoand/var/log/falco.log - Review active Falco rules for coverage gaps (shell-in-container, outbound connections, writes below root)
- Collect Tetragon execution traces via
kubectl logs -n kube-system -l app.kubernetes.io/name=tetragonortetra getevents - Review active Tetragon
TracingPolicyresources:kubectl get tracingpolicies -A - Collect Tracee event logs from container or systemd deployment
- If no eBPF tooling was active during the incident, document this gap in the findings
- Check for Falco service and alert logs:
Kubernetes — cluster-level audit:
- List all pods across all namespaces:
kubectl get pods -A -o json - Flag pods running as root:
.spec.containers[].securityContext.runAsUser == 0or unset - Flag pods
- List all pods across all namespaces:
Установить container-forensics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteGlobGrepFAQ
Что делает скилл container-forensics?
Forensic investigation of Docker, containerd/CRI-O, and Kubernetes — inventory, escape detection, eBPF runtime monitoring, RBAC and etcd audit. Use when investigating container compromise.
Как установить скилл container-forensics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл container-forensics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic