Lion Cipher Lab

Run your own Kerberos KDC and watch a ticket get issued (the other protocol under Active Directory)

Why it matters

Kerberos is the authentication protocol that logs in most of the corporate world, and almost nobody who uses it every day has ever seen it work. Every Windows domain login, every 'single sign-on' inside an enterprise network, every silent authentication to a file share is Kerberos, because Active Directory is a Kerberos KDC with a directory bolted to it. It also generates a whole family of famous attacks — Kerberoasting, AS-REP roasting, Golden Tickets — that stay permanently confusing if 'ticket', 'TGT' and 'krbtgt' are just words you have read. An hour spent building your own KDC fixes that…

What you'll learn

Steps in this lab

  1. The problem: your password should not visit every server you use
  2. Build the throwaway machine, and get its name right before anything else
  3. Install the KDC packages and answer the setup questions
  4. Create the database, understand the master key, and start the services
  5. Create principals: an admin, a human, and a service — and extract a keytab
  6. The moment: kinit, then read klist one line at a time
  7. Make the TGS work: get a real service ticket with kvno
  8. Lifetimes and renewal: why a ticket is safer than a password
  9. Watch the KDC think: reading krb5kdc.log, and breaking it on purpose
  10. The bridge: this IS Active Directory, and here is its attack surface
  11. When Kerberos is the right answer — and when it absolutely is not
  12. Clean up, and know exactly what you left behind

Open the full interactive lab →