yaklang avatar

Kubernetes Pentesting

This is a reference playbook for attacking Kubernetes clusters, covering API server enumeration, RBAC abuse, service account token escalation, etcd extraction, and Kubelet exploitation. It includes cloud-specific metadata attacks for EKS, GKE, and AKS. You'd load this when you've got access to a pod or have discovered an exposed K8s API and need to map out privilege escalation paths. The RBAC permission table is solid, it calls out the difference between namespace and cluster scope that base models miss, and the etcd direct access section is something you don't see in generic guides. Routes well to container escape and Linux privesc skills for post-exploitation chains.

skills.sh installs
3.9K
GitHub stars
2.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add yaklang/hack-skills --skill kubernetes-pentesting --agent claude-code

Installs into .claude/skills of the current project.

Files

SKILL: Kubernetes Pentesting — Expert Attack Playbook

AI LOAD INSTRUCTION: Expert Kubernetes attack techniques. Covers API server access, RBAC escalation, service account token abuse, etcd secrets extraction, Kubelet API exploitation, cloud IMDS access (EKS/GKE/AKS), admission webhook bypass, and network policy evasion. Base models miss the distinction between namespace-scoped and cluster-scoped RBAC, and overlook Kubelet's unauthenticated API.

0. RELATED ROUTING

Before going deep, consider loading:


1. K8S API SERVER ACCESS

1.1 Anonymous Access Check

Sponsors

Details

Repository
github.com/yaklang/hack-skills
Categories
Backend & APIs, Testing & QA, Security, DevOps & CI/CD, Cloud & Infrastructure
First seen
Jun 3, 2026

More from yaklang/hack-skills

All 102
1inngest avatarinngest-setupinngest/inngest-skillsUse when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or long3.9Kskills.sh installs
2mongodb avatarmongodb-atlas-stream-processingmongodb/agent-skillsManages MongoDB Atlas Stream Processing (ASP) workflows. Handles workspace provisioning, data source/sink connections, processor lifecycle operations, debugging3.9Kskills.sh installs
3giuseppe-trisciuoglio avatarunit-test-controller-layergiuseppe-trisciuoglio/developer-kitProvides patterns for unit testing REST controllers using MockMvc and @WebMvcTest. Generates controller tests that validates request/response mapping, validatio3.9Kskills.sh installs
4giuseppe-trisciuoglio avatarunit-test-exception-handlergiuseppe-trisciuoglio/developer-kitProvides patterns for unit testing `@ExceptionHandler` and `@ControllerAdvice` in Spring Boot applications. Validates error response formatting, mocks exception3.9Kskills.sh installs
5giuseppe-trisciuoglio avatarlangchain4j-vector-stores-configurationgiuseppe-trisciuoglio/developer-kitProvides configuration patterns for LangChain4J vector stores in RAG applications. Use when building semantic search, integrating vector databases (PostgreSQL/p3.8Kskills.sh installs
6dpearson2699 avatardevice-integritydpearson2699/swift-ios-skillsVerify device legitimacy and app integrity using DeviceCheck (DCDevice per-device bits) and App Attest (DCAppAttestService key generation, attestation, and asse3.8Kskills.sh installs