Tooluck logoTooluck
SKILL.md

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

install container-escape-techniques
# install the hack-skills pack with the skills CLI
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)

skills/container-escape-techniques/SKILL.md

MITFull file
1# SKILL: Container Escape Techniques — Expert Attack Playbook
2
3> **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.
4
5## 0. RELATED ROUTING
6
7Before going deep, consider loading:
8
9- [linux-privilege-escalation](../linux-privilege-escalation/SKILL.md) when you first need root inside the container before attempting escape
10- [kubernetes-pentesting](../kubernetes-pentesting/SKILL.md) for K8s-specific attack paths beyond pod escape
11- [linux-security-bypass](../linux-security-bypass/SKILL.md) when seccomp/AppArmor blocks your escape technique
12
13### Advanced Reference
14
15Also load [DOCKER_ESCAPE_CHAINS.md](./DOCKER_ESCAPE_CHAINS.md) when you need:
16- Step-by-step escape chains for common misconfigurations
17- Docker-in-Docker escape scenarios
18- Kubernetes-specific escape paths with full command sequences
19
20---
21
22## 1. AM I IN A CONTAINER?
23
24```bash
25# Quick checks
26cat /proc/1/cgroup 2>/dev/null | grep -qi "docker\|kubepods\|containerd"
27ls -la /.dockerenv 2>/dev/null
28cat /proc/self/mountinfo | grep -i "overlay\|docker\|kubelet"
29hostname # random hex = likely container
30
31# Detailed check
32cat /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

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

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

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates