WinAPI Library Calls Via PowerShell Scripts
Detects calls to WinAPI libraries from PowerShell scripts. Attackers can often leverage these APIs to avoid detection based on typical PowerShell function calls. Use this rule as a basis to hunt for interesting scripts.
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Definition
Requirements: Script Block Logging must be enabled
detection:
selection:
ScriptBlockText|contains:
- 'Advapi32.dll'
- 'kernel32.dll'
- 'KernelBase.dll'
- 'ntdll.dll'
- 'secur32.dll'
- 'user32.dll'
condition: selectionCarbon PowerShell Module (https://github.com/webmd-health-services/Carbon)
Chocolatey scripts
Tactics
Techniques
Sub-techniques
Other
Potential WinAPI Calls Via CommandLine
Detects the use of WinAPI Functions via the commandline. As seen used by threat actors via the tool winapiexec
Detects similar activity. Both rules may fire on overlapping events.
Potential WinAPI Calls Via PowerShell Scripts
Detects use of WinAPI functions in PowerShell scripts
Detects similar activity. Both rules may fire on overlapping events.
WinAPI Function Calls Via PowerShell Scripts
Detects calls to WinAPI functions from PowerShell scripts. Attackers can often leverage these APIs to avoid detection based on typical PowerShell function calls. Use this rule as a basis to hunt for interesting scripts.
Detects similar activity. Both rules may fire on overlapping events.