PowerShell ScriptBlock Logging: Obfuscated RUNDLL Launcher using rundll32.exe and shell32.dll
Identifies PowerShell script content invoking rundll32.exe/shell32.dll via shellexec_rundll and referencing PowerShell.
- Product
- windows
- Category
- ps_script
- Author
- Timur Zinniatullin, oscd.community (SigmaHQ), DRL 1.1
- Published
- 2020-10-18
- Updated
- 2026-07-31
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags PowerShell script content containing all required strings associated with a RUNDLL launcher technique: rundll32.exe, shell32.dll, shellexec_rundll, and powershell. Attackers may use this pattern to obscure execution paths and launch PowerShell indirectly via Windows library-based execution. The detection relies on Script Block Logging telemetry that provides the full PowerShell ScriptBlockText for string matching.
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "PowerShell ScriptBlock Logging: Obfuscated RUNDLL Launcher using rundll32.exe and shell32.dll"
id: ead596d8-87e9-403d-8542-f50b1681cb40
status: test
description: "This rule flags PowerShell script content containing all required strings associated with a RUNDLL launcher technique: rundll32.exe, shell32.dll, shellexec_rundll, and powershell. Attackers may use this pattern to obscure execution paths and launch PowerShell indirectly via Windows library-based execution. The detection relies on Script Block Logging telemetry that provides the full PowerShell ScriptBlockText for string matching."
references:
- https://github.com/SigmaHQ/sigma/issues/1009
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_invoke_obfuscation_via_rundll.yml
author: Timur Zinniatullin, oscd.community, Huntrule Team
date: 2020-10-18
modified: 2022-11-29
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: "Requirements: Script Block Logging must be enabled"
detection:
selection_4104:
ScriptBlockText|contains|all:
- rundll32.exe
- shell32.dll
- shellexec_rundll
- powershell
condition: selection_4104
falsepositives:
- Unknown
level: medium
license: DRL-1.1
related:
- id: e6cb92b4-b470-4eb8-8a9d-d63e8583aae0
type: derived