Windows System: Detect rundll32 Service Control Manager launches PowerShell via obfuscated parameters

Flags service creation where ImagePath uses rundll32/shell32 (shellexec_rundll) to invoke PowerShell.

FreeReviewedSigma · Medium · v2
Product
windows
Service
system
Author
Timur Zinniatullin, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-18
Updated
2026-07-31
title: "Windows System: Detect rundll32 Service Control Manager launches PowerShell via obfuscated parameters"
id: acf00256-05d3-424b-b433-707b1b78b0a0
status: test
description: This rule flags Windows System events where the Service Control Manager starts rundll32 with a shell32 rundll entry and includes “powershell” in the ImagePath. Attackers may use rundll32 to proxy execution and obscure the true payload, which can help evade straightforward PowerShell visibility. The detection relies on Windows Service Control Manager (Event ID 7045) telemetry that records the service creation command line details.
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_rundll_services.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
  service: system
detection:
  selection:
    Provider_Name: Service Control Manager
    EventID: 7045
    ImagePath|contains|all:
      - rundll32.exe
      - shell32.dll
      - shellexec_rundll
      - powershell
  condition: selection
falsepositives:
  - Unknown
level: medium
license: DRL-1.1
related:
  - id: 11b52f18-aaec-4d60-9143-5dd8cc4706b9
    type: derived