yaklang avatar

Container Escape Techniques

This is a practical reference for breaking out of Docker containers, LXC, or Kubernetes pods when you're already inside and need host access. It covers the standard escape vectors: privileged containers, capability abuse (CAP_SYS_ADMIN, CAP_SYS_PTRACE), Docker socket exploitation, cgroup release_agent tricks, and namespace manipulation. The guide includes working commands for each technique, from simple nsenter escalation to cgroup v1 release_agent chains and runtime CVEs like runc 5736. It also flags when to pivot to related skills for privilege escalation inside the container first or Kubernetes-specific attacks. Good for red team work or understanding what makes a container configuration dangerous. The detection section helps confirm you're containerized before trying escape techniques.

skills.sh installs
3.8K
GitHub stars
2.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add yaklang/hack-skills --skill container-escape-techniques --agent claude-code

Installs into .claude/skills of the current project.

Files

SKILL: Container Escape Techniques — Expert Attack Playbook

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.

0. RELATED ROUTING

Before going deep, consider loading:

Advanced Reference

Also load DOCKER_ESCAPE_CHAINS.md when you need:

  • Step-by-step escape chains for common misconfigurations
  • Docker-in-Docker escape scenarios
  • Kubernetes-specific escape paths with full command sequences

1. AM I IN A CONTAINER?

Sponsors

Details

Repository
github.com/yaklang/hack-skills
Category
DevOps & CI/CD
First seen
Jun 3, 2026

More from yaklang/hack-skills

All 102
1getsentry avatarsentry-nextjs-sdkgetsentry/sentry-for-aiFull Sentry SDK setup for Next.js. Use when asked to "add Sentry to Next.js", "install @sentry/nextjs", or configure error monitoring, tracing, session replay, 3.7Kskills.sh installs
2dotnet avatarextension-pointsdotnet/skillsGuide for MSBuild extensibility: CustomBefore/CustomAfter hooks, wildcard imports with alphabetic ordering, import gating with control properties, NuGet package3.7Kskills.sh installs
3browser-use avataropen-sourcebrowser-use/browser-useDocumentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or T3.7Kskills.sh installs
4forcedotcom avatardeploying-ui-bundleforcedotcom/sf-skillsMUST activate when the project contains a uiBundles/*/src/ directory or sfdx-project.json and the task involves deploying, pushing to an org, or post-deploy set3.6Kskills.sh installs
5everyinc avatarlfgeveryinc/compound-engineering-pluginRun the full autonomous shipping pipeline end-to-end, hands-off with no check-ins: plan, implement, review and fix, commit, push a branch, open a PR, and watch 3.6Kskills.sh installs
6netlify avatarnetlify-confignetlify/context-and-toolsReference for netlify.toml configuration and site environment variables. Use when configuring build settings, redirects, rewrites, headers, deploy contexts, the3.6Kskills.sh installs