CDK is a command-line toolkit for security testing inside containers and against Kubernetes, Docker, and Containerd environments.
Overview
CDK is an open-source container penetration toolkit aimed at Kubernetes, Docker, and Containerd testing. It is built to run inside slim containers without relying on the host OS, and ships network utilities along with proof-of-concept exploits.
The workflow starts with cdk eva to gather evaluation information and a recommended exploit, then cdk run to execute attacks. You download release binaries and copy them into a target container to begin testing.
Three modules organize capabilities. Evaluate collects in-container information such as capabilities, mounts, sensitive environment variables, and Kubernetes API or metadata details. Exploit covers container escape, persistence, credential access, privilege escalation, and lateral movement techniques with named scripts for many CVEs and misconfigurations. Tool provides embedded commands for tunnels, process and network inspection, file editing, and HTTP requests to Kubernetes, Docker, and registry APIs.
A thin release variant targets short-lived serverless shells with a smaller binary. Use is limited to authorized security testing.
Key features
- In-container weakness evaluation
- Named container escape exploits
- Kubernetes secret and config dumping
- Embedded netstat-like tooling
- Docker socket and API attack helpers
- Reverse shell and kubelet exec
- Thin build for serverless shells
- Registry and cloud metadata probes
Use cases
- Authorized container escape assessment
- Kubernetes cluster penetration testing
- Red team delivery into compromised pods
- Discovering misconfigurations inside containers