Windows Service Control Manager Rundll32 Obfuscation via Command-Line Encoded PowerShell
Detects service creation where ImagePath invokes rundll32 (shell32) with command-chain tokens indicative of obfuscated PowerShell.
- Product
- windows
- Service
- system
- Author
- Nikita Nazarov, oscd.community (SigmaHQ), DRL 1.1
- Published
- 2020-10-09
- 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 Windows Service Control Manager event 7045 where the configured service ImagePath includes rundll32 shell32.dll invocation patterns with command-line markers consistent with obfuscated PowerShell. Attackers may use rundll32 to indirectly execute script content while hiding intent through combined command syntax. Telemetry relies on Windows System logs for EventID 7045 and matching substrings within the service ImagePath.
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: Windows Service Control Manager Rundll32 Obfuscation via Command-Line Encoded PowerShell
id: cb75bb34-93ed-4e46-9824-117b36f4025f
status: test
description: This rule flags Windows Service Control Manager event 7045 where the configured service ImagePath includes rundll32 shell32.dll invocation patterns with command-line markers consistent with obfuscated PowerShell. Attackers may use rundll32 to indirectly execute script content while hiding intent through combined command syntax. Telemetry relies on Windows System logs for EventID 7045 and matching substrings within the service ImagePath.
references:
- https://github.com/SigmaHQ/sigma/issues/1009
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/system/service_control_manager/win_system_invoke_obfuscation_via_use_rundll32_services.yml
author: Nikita Nazarov, oscd.community, Huntrule Team
date: 2020-10-09
modified: 2022-11-29
tags:
- attack.stealth
- attack.t1027
- attack.execution
- attack.t1059.001
logsource:
product: windows
service: system
detection:
selection:
Provider_Name: Service Control Manager
EventID: 7045
ImagePath|contains|all:
- "&&"
- rundll32
- shell32.dll
- shellexec_rundll
ImagePath|contains:
- value
- invoke
- comspec
- iex
condition: selection
falsepositives:
- Unknown
level: high
license: DRL-1.1
related:
- id: 641a4bfb-c017-44f7-800c-2aee0184ce9b
type: derived