performing-kubernetes-penetration-testing

Tests Kubernetes cluster security by probing API server, kubelet, etcd, RBAC, and secrets.

1|1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Yenn503/Net-Runners --skill performing-kubernetes-penetration-testing-yenn503
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: performing-kubernetes-penetration-testing
Source: https://github.com/Yenn503/Net-Runners/tree/main/.netrunner/skills/infra/performing-kubernetes-penetration-testing
Command: npx skills add https://github.com/Yenn503/Net-Runners --skill performing-kubernetes-penetration-testing-yenn503

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Kubernetes clusters often ship with misconfigurations—exposed API servers, overly permissive RBAC, unprotected etcd, and missing network policies—that attackers can exploit. This Skill provides a structured, step-by-step penetration testing workflow to systematically identify these weaknesses before adversaries do. ## Core Features & Use Cases - Attack Surface Mapping: Enumerate exposed components including the API server (6443), kubelet (10250/10255), etcd (2379), and NodePort services using nmap and curl probes. - Automated Vulnerability Scanning: Run kube-hunter, kube-bench, and Kubescape against CIS, NSA, and MITRE ATT&CK frameworks to detect misconfigurations at scale. - Hands-On Exploitation Testing: Validate RBAC privilege escalation paths, extract secrets, deploy privileged test pods, and verify network policy enforcement. - Use Case: During an authorized engagement against a production cluster, follow the workflow to discover an anonymously accessible API server, confirm excessive service account permissions with kubectl auth can-i, and document the full attack path for remediation. ## Quick Start Ask the agent to perform a Kubernetes penetration test against your authorized target cluster, starting with external reconnaissance and kube-hunter scanning.

Frequently Asked Questions about performing-kubernetes-penetration-testing

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

FAQPage Schema
How do I penetration test a Kubernetes cluster?▼

Start with external reconnaissance using nmap and curl against ports 6443, 10250, and 2379, then run kube-hunter for automated vulnerability discovery. Follow with kube-bench for CIS benchmarks, Kubescape for NSA/MITRE frameworks, and manual kubectl tests for RBAC and secret exposure.

What tools are used for Kubernetes security testing?▼

kube-hunter hunts for cluster vulnerabilities remotely or from inside pods, kube-bench checks CIS benchmark compliance, and Kubescape scans against NSA and MITRE ATT&CK frameworks. kubectl handles manual exploitation checks like RBAC enumeration and secret extraction.

How do I check for overly permissive RBAC permissions in Kubernetes?▼

Use kubectl auth can-i --list to enumerate current permissions and test high-value actions like creating pods or reading secrets. Also inspect clusterrolebindings for bindings to system:anonymous or system:unauthenticated subjects.

Can kube-hunter scan a cluster from inside a pod?▼

Yes, kube-hunter supports a --pod flag to run from within a pod and an --internal flag for scanning from inside the cluster network. Remote scanning against an external target uses the --remote flag with the cluster address.

What prerequisites are needed before testing Kubernetes cluster security?▼

You need explicit authorization for the engagement, network access to cluster components, kubectl configured against the target, and kube-hunter, kube-bench, and Kubescape installed. Different test scenarios require varying levels of cluster access.