Skip to content

Container Escape Playbook

Guides an agent through breaking out of Docker/containerd/Podman containers to the host.

Stars
10,230
Licence
MIT
Files
1 file

What it does

This skill is an offensive security playbook that tells an AI agent how to escape from a container (such as Docker) to the underlying host machine. It walks through detecting that the agent is inside a container, enumerating capabilities, mounts and sockets, and then applying known breakout techniques such as abusing privileged mode, the Docker socket, dangerous Linux capabilities, cgroup settings and known runtime CVEs. The file also includes examples of persisting access on the host, such as adding SSH keys, cron reverse shells and backdoor accounts.

Great for

  • Authorized penetration testers working on a defined container or Kubernetes engagement with written scope
  • Red teams validating whether container isolation controls actually hold
  • Security educators building lab exercises on container breakout

Skip it if

  • Anyone without explicit written authorization to test the target, since the instructions cover persistence and backdoors that would be illegal against systems you do not own
  • Production environments where running exploit tooling or writing to host files could cause outages or data loss
  • Learners expecting a safe hardening guide; this file describes attack steps, not defences

Try asking

  • “I have a shell inside a container in our authorized test lab. Enumerate capabilities and tell me whether I can reach the host.”
  • “Check whether the Docker socket is mounted in this container and what the Docker API exposes.”
  • “Decode the CapEff value from this container and list which capabilities enable an escape.”
  • “Walk me through the privileged-container breakout path for this engagement scope.”
Step-by-step guide: how to use Container Escape PlaybookInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    offensive-container-escape.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip offensive-container-escape.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip offensive-container-escape.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Only use it with written authorization and a defined scope; review every command before the agent runs it.
  • Run it in an isolated lab first so host writes, mounts and persistence steps cannot affect real systems.
  • Ask the agent to stop before any persistence step (SSH keys, cron, new users) unless the engagement explicitly permits it.

What's inside

  • SKILL.md

Redistributed unmodified from SnailSploit/Claude-Red under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.