Knowledge Base · general

PowerShell Tradecraft

generaltechnique notetechniquepowershell

Common attacker patterns in PowerShell: encoded commands, download cradles and AppData staging.

How it works

  • -EncodedCommand (base64 UTF-16LE) hides the real command line.
  • System.Net.WebClient / IEX download cradles fetch stage-2 payloads.
  • Droppers write to %APPDATA% and masquerade as theme/telemetry files before exfil.

Detection & defence

  • Enable PowerShell script-block logging and AMSI; constrain LanguageMode.
  • Alert on encoded commands and outbound POSTs with large base64 bodies.