Lion Cipher Lab

Escape a Kubernetes pod to the node: break out with a privileged pod and a hostPath mount — then lock it down with Pod Security Admission

Why it matters

A Kubernetes cluster is a shared machine: many pods, often from many teams, run on the same physical nodes, kept apart only by Linux namespaces and a handful of securityContext settings. The whole security model rests on the assumption that a pod cannot reach the node it runs on. But that isolation is OPT-IN, and the defaults are generous — a pod that is allowed to run `privileged: true`, or to mount a `hostPath`, or to share the host PID namespace, is not really contained at all. Any one of those, granted to a workload an attacker can reach, turns a single compromised container into control…

What you'll learn

Steps in this lab

  1. Why a pod can become the node — the three dangerous grants
  2. Build a disposable cluster with kind
  3. Attack 1 — privileged pod, then nsenter into the node
  4. Attack 2 — read the node's filesystem through a hostPath mount
  5. Defense — Pod Security Admission at 'restricted' rejects them at the door
  6. Harden the workload that DOES need to run
  7. When to reach for this thinking — the judgment that matters

Open the full interactive lab →