Lion Cipher Lab

Detect malicious PowerShell on your own Windows machine

Why it matters

PowerShell is the tool attackers reach for most on Windows, and the reason is uncomfortable: it's already installed, already trusted, and signed by Microsoft, so using it raises no alarms. That's called living-off-the-land — attacking with the software that's already on the box instead of dropping their own malware. The catch for defenders is that on a stock Windows machine, the logging that would record what those PowerShell commands actually did is turned OFF by default. If you wait until an incident to care about it, there's nothing to look at. This lab flips that around: you turn the…

What you'll learn

Steps in this lab

  1. Why attackers love PowerShell (living-off-the-land) and ATT&CK T1059.001
  2. The visibility gap: the logging you need is OFF by default
  3. Turn ON Script Block Logging (Event ID 4104)
  4. Turn ON Module Logging and Transcription too (defense in depth)
  5. The red-flag patterns to hunt for
  6. Run a BENIGN encoded command yourself
  7. Find it in the logs with Get-WinEvent
  8. The reality: log before the incident, and a match is only a lead

Open the full interactive lab →