
Summary
This rule detects the execution of potentially malicious PowerShell commands that use obfuscated or truncated parameters to bypass security measures. Threat actors often leverage PowerShell's parameter binding capabilities, which allow them to use partial command interpretations, making detection difficult. The rule searches for specific command-line arguments associated with common PowerShell obfuscation techniques and identifies instances of these in the execution logs of processes like cmd.exe, powershell.exe, or pwsh.exe.
The detection logic specifically looks at the process creation events in the last two hours and applies a regex pattern to check for suspicious PowerShell commands such as the use of window styles, encoding commands, and instruction bypass mechanisms. The regular expression is designed to catch variations and permutations of these potentially harmful arguments, enhancing the probability of catching malicious intents.
Categories
- Windows
- Endpoint
Data Sources
- Process
- Application Log
ATT&CK Techniques
- T1059.001
Created: 2024-02-09