Tooluck logoTooluck
SKILL.md

offensive-container-escape

Agent skill fromSnailSploit/Claude-Red

Container escape and breakout techniques targeting Docker, containerd, and Podman runtimes. Covers privileged container breakout via host filesystem mount and nsenter, Docker socket abuse through /var/run/docker.sock, Linux capability exploitation including CAP_SYS_ADMIN, CAP_SYS_PTRACE, and CAP_NET_ADMIN, cgroup v1 notify_on_release escape, runc CVEs such as CVE-2019-5736 and CVE-2024-21626 Leaky Vessels, kernel exploits from within containers, and Dockerfile misconfigurations like --privileged and host namespace sharing. Includes enumeration with capsh, amicontained, deepce, CDK, and nsenter. Maps to MITRE ATT&CK T1611 Escape to Host. Use this skill when the engagement scope includes container breakout, Docker escape, container privilege escalation, host access from container, or when you land inside a containerized environment and need to reach the underlying host.

How to install offensive-container-escape

install offensive-container-escape
# install the Claude-Red pack with the skills CLI
npx skills add SnailSploit/Claude-Red

# or add only this skill to Claude Code: copy the folder

Skills/container/offensive-container-escape/

# into

~/.claude/skills/offensive-container-escape/ (all projects)

.claude/skills/offensive-container-escape/ (one project)

Skills/container/offensive-container-escape/SKILL.md

MITFull file
1# Container Escape and Breakout
2
3You have a shell inside a container. Your objective is to break out to the underlying host operating system. Container isolation relies on Linux namespaces, cgroups, seccomp profiles, AppArmor/SELinux, and dropped capabilities. Every misconfiguration in these layers is an escape vector. This skill walks you through systematic enumeration, exploitation of common misconfigurations, abuse of exposed runtime sockets, capability-based escapes, cgroup breakouts, and known CVEs against container runtimes.
4
5## Quick Workflow
6
71. Confirm you are inside a container (check for `.dockerenv`, cgroup entries, PID 1 process).
82. Enumerate capabilities, mounts, namespaces, and sockets with automated tools.
93. Identify the escape vector: privileged mode, socket exposure, dangerous capabilities, cgroup misconfiguration, or vulnerable runtime.
104. Execute the breakout technique matching the vector.
115. Validate host access by reading `/etc/hostname`, checking PID namespace, or writing to host filesystem.
126. Pivot from host access to lateral movement across the cluster or infrastructure.
13
14---
15
16## Phase 1: Container Detection and Enumeration
17
18Before attempting escape, confirm you are containerized and map the attack surface.
19
20### Detecting Container Environment
21
22```bash
23# Check for Docker marker file
24ls -la /.dockerenv
25
26# Check cgroup entries for container identifiers
27cat /proc/1/cgroup | grep -E 'docker|containerd|kubepods|podman'
28…

Excerpt shown under the repository's MIT license.

More skills in Claude-Red

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

cathrynlavery /

diagram-design
66k

Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, and Pi. 45 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.

CCCXCUGH1 skill

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates