container-technique
Installation
SKILL.md
container-technique
Goal: Exploit container environments (Docker, Kubernetes, LXC) to achieve host-level code execution, horizontal pod movement, or cluster takeover.
When this technique applies
- You have gained a shell via Web RCE or SSH and notice
.dockerenv,kubepodsin cgroups, or specific mount patterns. - You have acquired compromised Kubeconfigs or Service Account tokens.
The Escape Workflow
1. Internal Reconnaissance
Determine the isolation boundaries.
- Am I in a container?:
ls -la /.dockerenv ; cat /proc/1/cgroup - What privileges do I have?:
capsh --print(look forCAP_SYS_ADMIN,CAP_SYS_MODULE,CAP_SYS_PTRACE). - Network mapping: Look for
kube-dnsor metadata endpoints (e.g.169.254.169.254or GCP/Azure equivalents).