Windows rundll32.exe calling DllRegisterServer from a non-standard DLL path
Detects rundll32.exe calling DllRegisterServer from command lines associated with non-standard DLL locations.
- Product
- windows
- Category
- process_creation
- Author
- Andreas Braathen (mnemonic.io) (SigmaHQ), DRL 1.1
- Published
- 2023-10-17
- Updated
- 2026-07-31
ATT&CK techniques
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 process creation events where rundll32.exe is invoked with the export function name "DllRegisterServer". It matters because explicitly registering a DLL via rundll32 can be used to execute attacker-controlled code or perform stealthy installation actions. Detection relies on process creation telemetry containing the process image name and the full command line, and it excludes common system and Program Files locations.
Reporting behind it
- thedfirreport.comhttps://thedfirreport.com/2023/08/28/html-smuggling-leads-to-domain-wide-ransomware/
- virustotal.comhttps://www.virustotal.com/gui/file/94816439312563db982cd038cf77cbc5ef4c7003e3edee86e2b0f99e675ed4ed/behavior
- learn.microsoft.comhttps://learn.microsoft.com/en-us/windows/win32/api/olectl/nf-olectl-dllregisterserver
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/process_creation/proc_creation_win_rundll32_dllregisterserver.yml
Changelog
v5- v5Candidate ingested via manual entry.2026-07-31
- v4Candidate ingested via manual entry.2026-07-31
- v3Candidate ingested via manual entry.2026-07-31
- 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 rundll32.exe calling DllRegisterServer from a non-standard DLL path
id: 6330cfd8-c8fe-4e89-924e-dd0f8688d0f5
related:
- id: 2569ed8c-1147-498a-9b8c-2ad3656b10ed
type: similar
- id: d81a9fc6-55db-4461-b962-0e78fea5b0ad
type: derived
status: test
description: This rule flags process creation events where rundll32.exe is invoked with the export function name "DllRegisterServer". It matters because explicitly registering a DLL via rundll32 can be used to execute attacker-controlled code or perform stealthy installation actions. Detection relies on process creation telemetry containing the process image name and the full command line, and it excludes common system and Program Files locations.
references:
- https://thedfirreport.com/2023/08/28/html-smuggling-leads-to-domain-wide-ransomware/
- https://www.virustotal.com/gui/file/94816439312563db982cd038cf77cbc5ef4c7003e3edee86e2b0f99e675ed4ed/behavior
- https://learn.microsoft.com/en-us/windows/win32/api/olectl/nf-olectl-dllregisterserver
- https://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/process_creation/proc_creation_win_rundll32_dllregisterserver.yml
author: Andreas Braathen (mnemonic.io), Huntrule Team
date: 2023-10-17
tags:
- attack.stealth
- attack.t1218
- detection.threat-hunting
logsource:
category: process_creation
product: windows
detection:
selection_image:
- Image|endswith: \rundll32.exe
- OriginalFileName: RUNDLL32.EXE
selection_cmdline:
CommandLine|contains: DllRegisterServer
filter_main_legit_paths:
CommandLine|contains:
- :\Program Files (x86)
- :\Program Files\
- :\Windows\System32\
- :\Windows\SysWOW64\
condition: all of selection_* and not 1 of filter_main_*
falsepositives:
- Legitimate usage as part of application installation, but less likely from e.g. temporary paths.
- Not every instance is considered malicious, but this rule will capture the malicious usages.
level: medium
license: DRL-1.1