LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

kubernetes-pentesting

Kubernetes penetration testing playbook. Use when targeting Kubernetes clusters via API server, RBAC enumeration, service account abuse, etcd access, Kubelet API, pod escape, cloud-specific metadata, admission webhook bypass, and registry secrets.

1,281stars175forksUpdated 7/5/2026
DevOps & CI/CD#rbac#penetration-testing#cloud-security#kubernetes#container-security

Security Assessment

High Risk(45/100)

Detected risks:

Remote Code Execution([SKILL.md] exec ()
Secret Exposure([SKILL.md] TOKEN=)
Security Score45/100

About kubernetes-pentesting

An expert playbook for attacking Kubernetes clusters end to end. It walks through API server access (anonymous checks on ports 6443/8443/8080, service-account bearer tokens from inside a pod, and kubeconfig/certificate auth from common locations like /etc/kubernetes/admin.conf), then RBAC enumeration using kubectl auth can-i and SelfSubjectRulesReview, with a table of dangerous permissions (pods/exec, pods create, secrets get/list, serviceaccounts/token create, nodes/proxy, escalate, bind, impersonate) and the escalation each enables.

Subsequent sections cover service-account token abuse (locating and decoding the mounted JWT, dumping secrets, minting tokens, and deploying a privileged pod for node access), direct etcd access on port 2379 to extract secrets, and pod-escape vectors that map hostPID, hostNetwork, hostPath, and privileged containers to concrete commands like nsenter and chroot. It also covers the Kubelet API on ports 10250/10255, including exec that bypasses API-server RBAC and log reading, plus cloud-specific attacks against instance metadata on EKS, GKE, and AKS, including IMDSv1/IMDSv2 credential theft and EKS IRSA token locations.

It is intended for offensive security testing of clusters once you have some foothold or network reach, and emphasizes distinctions base models often miss, such as namespace-scoped vs cluster-scoped RBAC and the Kubelet's unauthenticated API. Related-routing links point to companion skills for container escape (pod-to-node), Linux privilege escalation and lateral movement once on a node, security-control bypass when Pod Security Standards or seccomp restrict actions, and SSRF for reaching the API server or cloud metadata indirectly.

FAQ

How do I authenticate to the API server from inside a compromised pod?

Read the mounted service-account token and CA at /var/run/secrets/kubernetes.io/serviceaccount/, then send the token as a Bearer header to https://kubernetes.default.svc.

Which RBAC permissions does it flag as most dangerous?

Critical ones include pods/exec, creating pods, get/list on secrets, serviceaccounts/token create, and escalate, bind, or impersonate; nodes/proxy is rated high for reaching the Kubelet.

What cloud environments are covered?

AWS EKS, GCP GKE, and Azure AKS, including IMDSv1/IMDSv2 metadata credential theft and EKS-specific IRSA token locations.

How does the Kubelet API help an attacker?

On ports 10250/10255 it can allow anonymous pod listing, reading container logs, and exec into pods, which bypasses API-server RBAC.

When should I switch to the container-escape skill?

Once you need to break out of a compromised pod to the underlying node; this skill gives quick K8s-specific vectors and routes detailed escape chains to the container-escape-techniques skill.

Install kubernetes-pentesting

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

yaklang/hack-skills

Related Skills

short-form-video

14

multi-asset-morning-briefing

7,907

content-strategy

2,901

doherty-threshold

2,901