PowerShell Encoded Command Execution (Living off the Land)
Detects PowerShell or pwsh.exe launched with encoded command flags (-EncodedCommand, -enc, -ec, -enco). Attackers encode commands in Base64 to obfuscate malicious payloads and bypass script-based controls. Risk is…
Description
Detects PowerShell or pwsh.exe launched with encoded command flags (-EncodedCommand, -enc, -ec, -enco). Attackers encode commands in Base64 to obfuscate malicious payloads and bypass script-based controls. Risk is elevated when a download cradle pattern is also detected. Tune AllowlistedParents for known-safe management tools such as SCCM.
Detection logic
Detection requirements
- Platform
- ESXiLinuxmacOSNetwork DevicesWindows
The rule states no platform. This is derived from the 2 ATT&CK techniques it maps to.
- Log source product
- microsoftthreatprotectionsecurityevents
- Log source service
- deviceprocesseventssecurityevent
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
No references are available for this detection.
From the source
- At source
- Open at source
- Upstream identifier
- 7b2f4d1a-9c3e-4f72-8b1d-3e6a9f2c4b8d
- Tagged by the source as
- DefenseEvasionExecution
Licence
- Published under
- MIT LicenseRead the licence
- Attribution
- Required
- Obtained under
- MITRead the origin licence
Authorship
- Published
- Sep 30, 2026
- Version
- 2