Lion Cipher Lab

Recover an attacker's PowerShell commands from the PSReadLine history file

Why it matters

When someone breaks into a Windows machine and opens PowerShell, they type commands, and a small text file in their profile quietly writes every one of those commands down. That file is often the fastest answer a responder gets to the question 'what did they actually do here?' It is also easy to over-trust. It has no timestamps. It never sees the inside of a script. It deliberately skips lines that look like they contain a password. And an attacker can switch it off with one command. This lab teaches you to read it the way an investigator should: collect every copy, triage it quickly, then…

What you'll learn

Steps in this lab

  1. What the PSReadLine history file is, and why responders open it first
  2. Where it lives -- one file per user, per host
  3. What it does NOT record -- the five blind spots
  4. Optional: see it on your own machine (harmless commands only)
  5. Build the evidence set
  6. Triage every history file at once
  7. Put time back on the timeline with 4104
  8. Measure what each source saw, and name every miss
  9. When to reach for this artifact, and how a pro does it better

Open the full interactive lab →