hunt-k8s
Helps your agent find security flaws in Kubernetes and Docker. Essential for protecting container environments.
What it does
This tool helps find security flaws in Kubernetes and Docker systems. It looks for misconfigurations that could allow unauthorized access or full system control.
When to use it
- ✓When testing the security of a Kubernetes environment.
- ✓To check if a Docker server is insecurely exposed.
- ✓To understand security risks in a Kubernetes cluster.
Example of what to ask your AI
“Check for security vulnerabilities in the Kubernetes cluster at 192.168.1.100.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool scans common ports and tries to access management APIs. It looks for anonymous or low-privilege access that could be exploited for control.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill hunt-k8sOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/hunt-k8s/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
HUNT-K8S — Kubernetes & Docker Security
Crown Jewel Targets
K8s API anonymous cluster-admin = full cluster control. docker.sock + RCE = host root. A single privileged-pod create or a kubelet /run shell pivots one finding to total compromise.
Highest-value findings:
- K8s API anonymous cluster-admin —
system:anonymous/system:unauthenticatedbound to a powerful role (classic misconfig:system:anonymousin aClusterRoleBindingtocluster-admin) → fullkubectl. Mere anonymous200is NOT this (see false-positive section). - Kubelet
10250exec/run —/runreturns command output directly;/execis a SPDY/WebSocket stream (see Phase 3). Either → RCE in any pod → steal that pod's SA token. - API-server-mediated kubelet RCE —
/api/v1/nodes/<node>/proxy/run/...reaches the kubelet through the API server using your (low-priv) token; if RBAC grantsnodes/proxy, you get pod RCE without touching 10250 directly. Primary 2024-2026 vector. - etcd
2379unauth — every Secret (SA tokens, TLS keys, app creds) stored, often plaintext (unlessEncryptionConfigurationis set) → full credential dump. - docker.sock exposure — SSRF/LFI/RCE reaching
/var/run/docker.sock→ create--privilegedcontainer, bind-mount host/→ host root. - Container escape via runc — Leaky Vessels (CVE-2024-21626):
WORKDIR/process.cwdpointing at a leaked/proc/self/fd/<n>host FD → break out of an attacker-controlled image/exec to host root. - SA token abuse — auto-mounted token at
/var/run/secrets/kubernetes.io/serviceaccount/token; check its real grants with SelfSubjectRulesReview before claiming impact. - K8s Dashboard skip-login / token-less API — full cluster management UI reachable unauthenticated.
OOB / Confirmation Gate (Read First)
K8s findings are RCE/credential-disclosure class. House rule: prove state change or data read, never infer from a status code.
- A
200on/api/v1/namespacesdoes not mean cluster-admin. The API server returns200with an RBAC-filtered (often emptyitems: []) list to any principal that can reachlist namespaces— anonymous read on a few resources is common and low-impact. Confirm real privilege with SelfSubjectRulesReview / SelfSubjectAccessReview, then by actually reading a Secret value. - 10255 (read-only) vs 10250 (exec) are constantly conflated. 10255 (HTTP, no auth) is info-disclosure only — it has
/pods,/stats,/metrics, NO exec/run. 10250 (HTTPS) is where/runand/execlive. Do not report "kubelet RCE" off a 10255 hit. - Blind/outbound vectors need OOB. If you exploit SSRF→IMDS→K8s, or a pod's egress, confirm the outbound hop with a Burp Collaborator / interactsh subdomain (e.g.
curl http://<token>.<collab>from inside the pod via/run). A delayed response or an echoed URL is NOT proof. - Impact proof = the artifact. For exec: the literal
id/hostnameoutput. For etcd/Secret: the decoded token bytes (redact in report). For docker.sock escape: the host file content (/etc/hostnameof the node, distinct from the container's). - Use a dedicated test namespace / test pod when you have create rights; never exec into production workloads to "prove" RCE — list the pod and exec a read-only
idin a pod you spun up if policy allows, or limit to a single non-destructiveidand stop.
Phase 1 — Fingerprint & Port Discovery
# Common Kubernetes / container ports
PORTS="443,6443,8443,8080,10250,10255,10256,2379,2380,4194,9090,9100,30000-30010"
nmap -sV -p $PORTS $TARGET 2>/dev/null | grep open
…
FAQ
What is Kubernetes?
Kubernetes is a system for managing containerized applications (like Docker) at scale, automating deployment, scaling, and management.
What is Docker?
Docker is a platform that allows packaging applications and their dependencies into 'containers', making them easy to run in different environments.
Why is checking security important?
Security flaws can allow attackers to access sensitive data, control your systems, or cause disruptions.
Details
Popularity
- GitHub stars
- 48k
- Ranking position
- #3267
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
django-security
Helps your agent implement security practices in Django applications. It focuses on authentication, authorization, and prevention against common attacks, ensuring more secure code.
affaan-m/ECC
laravel-security
Helps your agent secure Laravel applications against threats. Implements security practices for authentication, authorization, and common attack prevention.
affaan-m/ECC
module-regression
Helps your agent manage changes in large projects. Ensures code changes in one part don't break other parts.
affaan-m/ECC