Log Intelligence
Exploit your log
4104

Script Block Logging

medium noise

PowerShell · Windows

What this log means

Records the content of every PowerShell script block as it executes, after de-obfuscation. This is the single most valuable log for PowerShell-based attacks: even encoded or obfuscated payloads appear in clear text at execution time.

Key hints before you rely on it

  • ConfigurationMust be enabled explicitly. Enable 'Turn on PowerShell Script Block Logging' (GPO: Administrative Templates → Windows Components → Windows PowerShell). PowerShell 5+ auto-logs some suspicious blocks even when disabled, but coverage is partial.

  • WarningSensitive data can land in the log. Scripts that embed credentials or tokens get logged verbatim. Restrict read access to the channel and consider it sensitive telemetry.

  • NoiseBursty volume. Admin tooling and EDR agents can generate large multi-part script blocks (fields split across several events with the same ScriptBlockId).

Available detections

4 public rules ready to use with this log
MITRE TechniqueDetection NameSourceCategory
T1003.001OS Credential Dumping: LSASS MemoryInvoke-Mimikatz Indicators in Script BlockSigmaTTP
T1059.001PowerShellEncoded Command ExecutionElasticTTP
T1059.001PowerShell.NET Assembly Loaded from MemorySplunkHunting
T1562.001Impair Defenses: Disable or Modify ToolsAMSI Bypass PatternSigmaTTP

mock data — rule links will point to the upstream repos once the API is built