exploiting-containers

exploiting-containers is a skill for Claude Code from trilwu/secskills. It costs 39 tokens per session (2,832 once invoked), scanned B, original, MIT.

A security-testing guide for finding and demonstrating ways to escape Docker containers and attack Kubernetes clusters. It covers weaknesses such as privileged containers, exposed Docker sockets, and unsafe cluster settings.

In plain words
What is it for?
Use it to assess Docker and Kubernetes security, check container and cluster misconfigurations, test Kubernetes permissions, and investigate container escape paths.
Why use it?
It helps reveal when a container or Kubernetes setup could let an attacker reach the host system, other workloads, or cluster controls.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is docker cp temp:/path/to/file ./local/path.

Part of the secskills-offense plugin — 40 skills shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add trilwu/secskills
Claude Code
/plugin install secskills-offense

Made for: Claude Code.

Or install secskills-offense, the plugin that ships this one along with the rest of its 40 skills.

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 exploiting-containers

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-containers.svg)](https://agentmods.dev/skills/trilwu/secskills/exploiting-containers)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/exploiting-containers"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/exploiting-containers.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,832 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.1 $0.00039 $0.02832
Opus 5 $0.00019 $0.01416
Sonnet 5 $0.00008 $0.00566
Haiku 4.5 $0.00004 $0.00283

Measured 2d ago against content hash 812b14f054fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

exploiting-containers scanned grade B 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 2d 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 filesmediumPrivilege escalation

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

echo "cat /etc/shadow > $host_path/shadow_copy" >> /cmd

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.

curl -k $APISERVER/api/v1/namespaces/$NAMESPACE/pods --header "Authorization: Bearer $TOKEN"
secskills-offense/skills/exploiting-containers/SKILL.md · 407 lines

How it starts

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

Container Security and Escape Skill

You are a container security expert specializing in Docker, Kubernetes, and container escape techniques. Use this skill when the user requests help with:

  • Docker container security assessment
  • Container escape techniques
  • Kubernetes security testing
  • Container misconfiguration identification
  • Docker socket exploitation
  • Kubernetes API abuse
  • Container runtime vulnerabilities

When to Use

Activate this skill when the user asks to:

  • Test Docker container security
  • Escape from containers
  • Enumerate Kubernetes environments
  • Exploit container misconfigurations
  • Analyze container images
  • Test Kubernetes RBAC
  • Perform container security assessments

When NOT to Use

  • Host privilege escalation after escape — use escalating-linux-privileges
  • Cloud control plane abuse — use exploiting-cloud-platforms
  • Reviewing container config from source — use auditing-code-for-vulnerabilities
  • Image and registry supply chain — use auditing-supply-chain

Route to a Depth Skill

Signal Skill
The container is hardened — seccomp on, capabilities dropped, --privileged absent, obvious escapes blocked escaping-hardened-containers
The target is a managed cluster (EKS/GKE/AKS) and the goal is cloud IAM or cluster RBAC, not just host escape attacking-eks-gke-aks

The basics below (privileged containers, Docker socket, obvious mounts) come first; reach for escaping-hardened-containers when they are all closed.

Core Methodologies

1. Docker Container Detection and Enumeration

Detect if Inside Container:

# Check for .dockerenv
ls -la /.dockerenv

# Check cgroup
cat /proc/1/cgroup | grep docker
cat /proc/self/cgroup | grep -E 'docker|lxc|kubepods'

# Check for container-specific files
cat /proc/1/environ | grep container
ls -la /.containerenv  # Podman

# Check mount points
cat /proc/self/mountinfo | grep docker

# Hostname often matches container ID
hostname

Read the full file on GitHub · 407 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. 2d ago First seen · 407 lines · 39 tokens per session scan B 812b14f054fa

Subscribe to this mod's changes

exploiting-containers is a skill published in the GitHub repository trilwu/secskills (134 stars, last pushed yesterday), licensed MIT. It adds 39 tokens to every session and 2,832 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B 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-09-03.

Related

Other skills, from other repositories

gke-app-onboarding

Manages GKE application onboarding, covering containerization, deployment manifests, and migration. Use when onboarding or deploying an application to GKE for the first time, or containerizing an app for GKE. Don't use for general GKE cluster administration or upgrades (use gke-basics or gke-upgrades instead).

google/skills · 70 tokens

managing-astro-local-env

Manage local Airflow environment with Astro CLI (Docker and standalone modes). Use when the user wants to start, stop, or restart Airflow, view logs, query the Airflow API, troubleshoot, or fix environment issues. For project setup, see setting-up-astro-project.

astronomer/agents · 63 tokens

kubernetes-patterns

Pods, deployments, services, ingress, RBAC, autoscaling, and production cluster best practices.

cosmicstack-labs/mercury-agent-skills · 24 tokens

aws-cloudformation-ecs

Provides AWS CloudFormation patterns for ECS clusters, task definitions, services, container definitions, auto scaling, blue/green deployments, CodeDeploy integration, ALB integration, service discovery, monitoring, logging, template structure, parameters, outputs, and cross-stack references. Use when creating ECS…

giuseppe-trisciuoglio/developer-kit · 101 tokens

aws-cloudformation-task-ecs-deploy-gh

Provides patterns to deploy ECS tasks and services with GitHub Actions CI/CD. Use when building Docker images, pushing to ECR, updating ECS task definitions, deploying ECS services, integrating with CloudFormation stacks, configuring AWS OIDC authentication for GitHub Actions, and implementing production-ready…

giuseppe-trisciuoglio/developer-kit · 106 tokens

opencode-sandbox

Run OpenCode in a docker-dev sandbox (SSH/gh on by default; --no-ssh/--no-github to isolate). Prints docker exec attach; kept until you confirm rm. Don't use for opencode.ai (opencode-runner), Herdr, or the app.

luongnv89/skills · 63 tokens