Detection rules › Sigma

Potential Rundll32 Execution With DLL Stored In ADS

Status
test
Severity
high
Log source
category process_creation, product windows
Author
Harjot Singh, '@cyb3rjy0t'
Source
github.com/SigmaHQ/sigma

Detects execution of rundll32 where the DLL being called is stored in an Alternate Data Stream (ADS).

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential Rundll32 Execution With DLL Stored In ADS
id: 9248c7e1-2bf3-4661-a22c-600a8040b446
status: test
description: Detects execution of rundll32 where the DLL being called is stored in an Alternate Data Stream (ADS).
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Rundll32
author: Harjot Singh, '@cyb3rjy0t'
date: 2023-01-21
modified: 2026-03-16
tags:
    - attack.stealth
    - attack.t1564.004
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\rundll32.exe'
        - OriginalFileName: 'RUNDLL32.EXE'
    selection_cli:
        # Example:
        #   rundll32 "C:\ads\file.txt:ADSDLL.dll",DllMain
        # Note: This doesn't cover the use case where a full path for the DLL isn't used. As it requires a more expensive regex
        CommandLine|re: '[Rr][Uu][Nn][Dd][Ll][Ll]32(?:\.[Ee][Xx][Ee])? \S+?\w:\S+?:'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\rundll32.exe'
    - OriginalFileName: 'RUNDLL32.EXE'

Stage 2: selection_cli

selection_cli:
    CommandLine|re: '[Rr][Uu][Nn][Dd][Ll][Ll]32(?:\.[Ee][Xx][Ee])? \S+?\w:\S+?:'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLineregex_match
  • [Rr][Uu][Nn][Dd][Ll][Ll]32(?:.[Ee][Xx][Ee])? \S+?\w:\S+?:
field:"CommandLine" kind:regex_match value:"[Rr][Uu][Nn][Dd][Ll][Ll]32(?:.[Ee][Xx][Ee])? \S+?\w:\S+?:"
Imageends_with
  • \rundll32.exe corpus 94 (sigma 94)
field:"Image" kind:ends_with value:"\rundll32.exe"
OriginalFileNameeq
  • RUNDLL32.EXE corpus 78 (sigma 35, elastic 22, splunk 21)
field:"OriginalFileName" kind:eq value:"RUNDLL32.EXE"