kubernetes-pentesting

Enumerate Kubernetes RBAC, service account tokens, and exposed endpoints during authorized penetration tests.

5|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/DorianGallo/hack-skills-local --skill kubernetes-pentesting-doriangallo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kubernetes-pentesting
Source: https://github.com/DorianGallo/hack-skills-local/tree/main/skills/kubernetes-pentesting
Command: npx skills add https://github.com/DorianGallo/hack-skills-local --skill kubernetes-pentesting-doriangallo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you identify and exploit common Kubernetes misconfigurations and access-control weaknesses during authorized security testing, so you can determine real cluster impact rather than relying on generic checklists.

Core Features & Use Cases

  • Kubernetes API, RBAC, and auth-path validation: Verify anonymous access, token/cert usage, and enumerate effective permissions to map escalation paths.
  • Service account and secret compromise: Locate mounted service account credentials, decode JWTs, and abuse token generation or overprivileged permissions.
  • Deep cluster attack surface coverage: Probe etcd directly, target Kubelet endpoints for RBAC bypass, and assess kubelet/node and admission-webhook bypass conditions.
  • Cloud metadata abuse: Test IMDS/metadata endpoints (EKS/GKE/AKS) from within workloads to determine whether cloud credentials are reachable.
  • Network and registry-driven pivoting: Enumerate NetworkPolicies and extract container registry pull secrets to find additional credentials and lateral movement opportunities.

What you can do in practice?

During a Kubernetes engagement, you can start from an in-cluster foothold (or exposed endpoints), enumerate RBAC, determine whether etcd/Kubelet are reachable, and then validate whether the cluster is vulnerable to token abuse, node escape chains, webhook bypass, or cloud metadata credential theft.

Quick Start

Use the kubernetes-pentesting skill to assess whether a compromised pod can escalate privileges by enumerating RBAC, checking Kubelet and etcd exposure, and probing cloud metadata access paths.

Frequently Asked Questions about kubernetes-pentesting

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enumerate Kubernetes RBAC permissions for privilege escalation paths?

To assess Kubernetes RBAC escalation, verify anonymous access, enumerate effective permissions across the API server, and map cluster-scope versus namespace-scope paths to identify overprivileged service accounts and token abuse opportunities.

Can I test exposed kubelet and etcd endpoints for authentication bypass vulnerabilities?

You can validate unauthenticated or weakly authenticated kubelet and etcd endpoints by probing cluster nodes directly to determine if RBAC bypass or unauthorized data exposure is possible during a penetration test.

How do I check if a compromised pod can reach cloud metadata services for credential theft?

Test IMDS and cloud metadata endpoints from within compromised workloads to determine whether cloud credentials are reachable and extractable for lateral movement across EKS, GKE, or AKS environments.

Does this Kubernetes security testing workflow require existing in-cluster access or node-level access?

This workflow applies to authorized penetration testing scenarios when an operator has in-cluster access, node-level access, or external network reachability to Kubernetes control-plane and node endpoints to execute a targeted attack workflow.

What is the best way to extract container registry pull secrets for Kubernetes lateral movement?

Extract container registry pull secrets by enumerating Kubernetes secrets and NetworkPolicies to find additional credentials and lateral movement opportunities, validating whether extracted tokens allow unauthorized repository access.

How do admission webhook bypass conditions affect Kubernetes cluster security?

Admission webhook bypass conditions allow attackers to circumvent control-plane security policies by validating whether webhook configurations can be bypassed to execute unauthorized workloads or escalate privileges within the cluster.