Skill · 3 hands-on labs

PowerShell and Process Logging

Decode encoded PowerShell and read process creation logs: Event ID 4688 command lines, 4104 script blocks, parent and child processes, Base64 UTF-16LE in CyberChef.

What is PowerShell and Process Logging?

Process logging records every program that starts and its full command line (Event ID 4688, when command line auditing is on). PowerShell Script Block Logging (Event ID 4104) records the PowerShell code that actually runs, after any Base64 or other encoding has been removed. Together they show exactly what an attacker typed and ran.

How analysts do it

  1. Filter 4688 and read Process Command Line in time order.
  2. Check the parent: Office apps, wscript or a service starting cmd or PowerShell is a red flag.
  3. Decode -enc / -EncodedCommand: From Base64, then Decode text UTF-16LE in CyberChef.
  4. Read 4104 script blocks for the decoded code, downloads and Defender changes.
  5. List every URL, IP, file and account you find as indicators.

What to look for

  • powershell.exe with -enc, -nop, -w hidden or IEX and DownloadString.
  • Scripts and programs running from Temp, AppData or ProgramData.
  • Set-MpPreference -Disable... and Add-MpPreference -ExclusionPath.
  • Built-in tools used for attacks: vssadmin, wevtutil, rundll32, reg, schtasks, curl.

Practise it: 3 labs, easiest first

Every lab gives you real evidence to download and a set of questions. Guided labs tell you where to look, challenges do not.

Windows Event IDs you will use

Certifications that test this skill

Related skills

Questions people ask

How do I decode a PowerShell -enc command?

The -enc (EncodedCommand) value is Base64 of UTF-16LE text. In CyberChef use From Base64, then Decode text with UTF-16LE (1200). If you see a dot between every letter, you skipped the second step.

What is Event ID 4104?

Event ID 4104 is PowerShell Script Block Logging, in the Microsoft-Windows-PowerShell/Operational log. It records the code PowerShell runs after decoding, so obfuscated commands become readable. Windows logs suspicious blocks automatically even when full logging is off.