Lion Cipher Lab

Sandbox untrusted code with gVisor (runsc) — a userspace kernel between the container and the host

Why it matters

The default way a container runs — with runc, the standard runtime — puts the container's system calls straight onto the HOST kernel. That is efficient, and for code you trust it is fine. But the host kernel is an enormous, monolithic attack surface: millions of lines of C reachable through hundreds of syscalls, and a single exploitable kernel bug reached from inside a container is a container escape onto the host. When you have to run code you genuinely do NOT trust — a customer's uploaded binary, an untrusted build step, a multi-tenant workload, a malware sample you want to observe — 'a…

What you'll learn

Steps in this lab

  1. First, the idea — a kernel that lives in userspace
  2. Set up: install gVisor and register runsc as a Docker runtime
  3. Smoke test: does anything even run under runsc?
  4. BEFORE — with default runc, the container is on the HOST kernel
  5. AFTER — the SAME image under runsc reports a gVisor kernel
  6. Why the strings differ — the Sentry serviced those syscalls
  7. Poke the boundary — see the emulated view, not the host's
  8. Honest costs — overhead and compatibility are real
  9. What gVisor does NOT protect — and when to reach for what

Open the full interactive lab →