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.

FreeReviewedSigma · High · v2
Product
windows
Service
system
Author
Nikita Nazarov, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-09
Updated
2026-07-31
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