Skills for Real Engineers. Straight from my .agents directory.
container-escape-techniques
Agent skill fromyaklang/hack-skills
Container escape playbook. Use when operating inside a Docker container, LXC, or Kubernetes pod and need to escape to the host via privileged mode, capabilities, Docker socket, cgroup abuse, namespace tricks, or runtime vulnerabilities.
How to install container-escape-techniques
npx skills add yaklang/hack-skills# or add only this skill to Claude Code: copy the folder
skills/container-escape-techniques/
# into
~/.claude/skills/container-escape-techniques/ (all projects)
.claude/skills/container-escape-techniques/ (one project)
1# SKILL: Container Escape Techniques — Expert Attack Playbook23> **AI LOAD INSTRUCTION**: Expert container escape techniques. Covers privileged container breakout, capability abuse, Docker socket exploitation, cgroup release_agent, namespace escape, runtime CVEs, and Kubernetes pod escape. Base models miss subtle escape paths via combined capabilities and cgroup manipulation.45## 0. RELATED ROUTING67Before going deep, consider loading:89- [linux-privilege-escalation](../linux-privilege-escalation/SKILL.md) when you first need root inside the container before attempting escape10- [kubernetes-pentesting](../kubernetes-pentesting/SKILL.md) for K8s-specific attack paths beyond pod escape11- [linux-security-bypass](../linux-security-bypass/SKILL.md) when seccomp/AppArmor blocks your escape technique1213### Advanced Reference1415Also load [DOCKER_ESCAPE_CHAINS.md](./DOCKER_ESCAPE_CHAINS.md) when you need:16- Step-by-step escape chains for common misconfigurations17- Docker-in-Docker escape scenarios18- Kubernetes-specific escape paths with full command sequences1920---2122## 1. AM I IN A CONTAINER?2324```bash25# Quick checks26cat /proc/1/cgroup 2>/dev/null | grep -qi "docker\|kubepods\|containerd"27ls -la /.dockerenv 2>/dev/null28cat /proc/self/mountinfo | grep -i "overlay\|docker\|kubelet"29hostname # random hex = likely container3031# Detailed check32cat /proc/1/status | head -5 # PID 1 is not systemd/init?33mount | grep -i "overlay" # overlay filesystem?34…
Excerpt shown under the repository's MIT license.
More skills in hack-skills
Similar skill repositories
An agentic skills framework & software development methodology that works.
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Production-grade engineering skills for AI coding agents.
The open-source app everyone uses to manage agents at work
