Lion Cipher Lab

Escalate privileges through Kubernetes RBAC — and lock the paths down

Why it matters

Kubernetes RBAC failures are the quiet way a single compromised pod becomes a compromised cluster. When an attacker lands in a pod — through an app vuln, a poisoned image, an SSRF — they inherit that pod's ServiceAccount token, mounted right there at /var/run/secrets/kubernetes.io/serviceaccount/token. From there the game is pure RBAC: what can this identity do, and can any of it be chained upward? The dangerous part is that the verbs that lead to cluster-admin rarely LOOK dangerous on a permissions review. 'create pods' reads as ordinary workload management — but a subject who can create a…

What you'll learn

Steps in this lab

  1. How an attacker reads RBAC (and inherits a pod's ServiceAccount)
  2. Build the local range: a kind cluster, a low-priv SA, a harmless-looking Role
  3. Primitive 1 — 'create pods' is run-as-any-SA (steal the controller's token)
  4. Primitive 1b — the same verb mounts the NODE (hostPath = escape the cluster)
  5. Primitive 2 — the `bind` and `escalate` verbs (grant yourself cluster-admin)
  6. Primitive 3 — harvest another identity's token (Secrets & serviceaccounts/token)
  7. The lockdown — remove every path and prove the attack now fails
  8. The judgment: named failure modes, and how a pro does it better

Open the full interactive lab →