PowerShell Script Calling Sensitive WinAPI Functions

This rule detects the execution of PowerShell scripts that directly call a wide range of Windows API (WinAPI) functions. Adversaries often leverage direct WinAPI calls from PowerShell to bypass typical detection mechanisms that focus on standard PowerShell cmdlets or .NET methods. The rule specifically looks for a comprehensive list of sensitive WinAPI functions within the script block text, which can indicate various malicious activities such as process injection, privilege escalation, credential access, and memory manipulation. This rule is primarily intended for threat hunting to identify unusual and potentially malicious PowerShell script behavior.