Detection rules › Sigma

Potential Obfuscated Ordinal Call Via Rundll32

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects execution of "rundll32" with potential obfuscated ordinal calls

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential Obfuscated Ordinal Call Via Rundll32
id: 43fa5350-db63-4b8f-9a01-789a427074e1
status: test
description: Detects execution of "rundll32" with potential obfuscated ordinal calls
references:
    - Internal Research
    - https://www.youtube.com/watch?v=52tAmVLg1KM&t=2070s
author: Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2023-05-17
modified: 2025-02-23
tags:
    - attack.stealth
    - attack.t1027.010
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\rundll32.exe'
        - OriginalFileName: 'RUNDLL32.EXE'
        - CommandLine|contains: 'rundll32'
    selection_cli:
        CommandLine|contains:
            - '#+'
            - '#-'
            # ordinal can be represented by adding any number of zeros in front ordinal number, for e.g. 000000024
            - '#0'
            # ordinal is 16 bit ordinal, so if you make the number large enough (don't fit in 16 bit space), then it normally wraps around.
            # for e.g ordinal 24 can be also represented by 65560 (65536+24)
            - '#655'
            - '#656'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

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

Stage 2: selection_cli

selection_cli:
    CommandLine|contains:
        - '#+'
        - '#-'
        - '#0'
        - '#655'
        - '#656'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • #+ corpus 4 (sigma 3, chronicle 1)
  • #- corpus 4 (sigma 3, chronicle 1)
  • #0
  • #655
  • #656
  • rundll32 corpus 26 (sigma 23, chronicle 2, kusto 1)
field:"CommandLine" kind:match
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"