Lion Cipher Lab

See what the admin actually did: record and replay privileged sessions with sudo I/O logging

Why it matters

When something goes wrong on a server, the first question is 'who had root?' and the second — the one that actually matters — is 'what did they do with it?'. Ordinary sudo logging answers the first and shrugs at the second: it records that an administrator started a shell, not the forty commands they typed inside it. That gap is where insider mistakes hide, where an attacker who stole an admin's credentials operates unseen, and where an auditor's question goes unanswered. sudo can record the terminal session itself and play it back like a screen recording, and it is built into a tool already…

What you'll learn

Steps in this lab

  1. The blind spot: your sudo log knows a command ran, not what it did
  2. Build a throwaway machine, and put an administrator on it
  3. Meet visudo — the seatbelt you fasten before touching policy
  4. Build the blind spot on purpose, so you can see it
  5. Turn on I/O logging
  6. Record a real privileged session
  7. Read the ledger with sudoreplay -l
  8. Watch it back — and skip the dead air
  9. Search the sessions instead of scrolling them
  10. Scope it: record what matters, and meet the ordering trap
  11. The hazard: log_input records keystrokes, and keystrokes include passwords
  12. The limit: whoever reaches root can delete the evidence
  13. Why this, not that — and when not to record at all
  14. Tear it down, and take the instinct with you

Open the full interactive lab →