Lion Cipher Lab

Rebuild a Linux package timeline from dpkg and apt logs

Why it matters

When an intruder gets sudo on a Linux server, one of the first things they often do is install tools: a scanner, a relay, a compiler, a packet sniffer. Then, if they are careful, they remove them. On Debian and Ubuntu every one of those moves passes through the package manager, and the package manager keeps its own diary in places most attackers never think to clean: dpkg writes a line for every install, upgrade and removal, apt writes a block saying who asked and what command they typed, and the package database remembers things even after the logs are gone. Reading that diary well turns…

What you'll learn

Steps in this lab

  1. What a package timeline is, and why an investigator wants one
  2. The four places a package change leaves a mark
  3. Where last month went: rotation, and why one file is gzipped and the other is not
  4. Build the evidence folder
  5. Read it by hand first -- and meet the two-space trap
  6. Merge every source into one attributed timeline
  7. Measure what each source alone would have told you
  8. Attribution: what Requested-By really is, and where it goes blank
  9. If the logs are gone: what the package database still remembers
  10. What the package trail cannot see
  11. Optional: read your own machine's package diary (read-only)
  12. When to reach for this, and how a pro does it better

Open the full interactive lab →