Detection rules › Sigma

Potential Emotet Rundll32 Execution

Status
test
Severity
critical
Log source
category process_creation, product windows
Author
FPT.EagleEye
Source
github.com/SigmaHQ/sigma

Detecting Emotet DLL loading by looking for rundll32.exe processes with command lines ending in ,RunDLL or ,Control_RunDLL

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential Emotet Rundll32 Execution
id: 54e57ce3-0672-46eb-a402-2c0948d5e3e9
status: test
description: Detecting Emotet DLL loading by looking for rundll32.exe processes with command lines ending in ,RunDLL or ,Control_RunDLL
references:
    - https://paste.cryptolaemus.com/emotet/2020/12/22/emotet-malware-IoCs_12-22-20.html
    - https://cyber.wtf/2021/11/15/guess-whos-back/
author: FPT.EagleEye
date: 2020-12-25
modified: 2023-02-21
tags:
    - attack.stealth
    - attack.t1218.011
    - detection.emerging-threats
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\rundll32.exe'
        - OriginalFileName: 'RUNDLL32.EXE'
    selection_cli:
        CommandLine|endswith:
            - ',RunDLL'
            - ',Control_RunDLL'
            # - ',#1'  too generic - function load by ordinal is not Emotet specific
    filter_legitimate_dll:
        CommandLine|endswith:
            - '.dll,Control_RunDLL'
            - '.dll",Control_RunDLL'
            - '.dll'',Control_RunDLL'
    filter_ide:
        ParentImage|endswith: '\tracker.exe' # When Visual Studio compile NodeJS program, it might use MSBuild to create tracker.exe and then, the tracker.exe fork rundll32.exe
    condition: all of selection_* and not 1 of filter_*
falsepositives:
    - Unknown
level: critical

Stages and Predicates

Stage 0: condition

all of selection_* and not 1 of filter_*

Stage 1: selection_img

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

Stage 2: selection_cli

selection_cli:
    CommandLine|endswith:
        - ',RunDLL'
        - ',Control_RunDLL'

Stage 3: not filter_*

filter_legitimate_dll:
    CommandLine|endswith:
        - '.dll,Control_RunDLL'
        - '.dll",Control_RunDLL'
        - '.dll'',Control_RunDLL'
filter_ide:
    ParentImage|endswith: '\tracker.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLineends_with.dll',Control_RunDLLexcludes:CommandLine field:"CommandLine" value:".dll',Control_RunDLL"
CommandLineends_with.dll,Control_RunDLLexcludes:CommandLine field:"CommandLine" value:".dll,Control_RunDLL"
CommandLineends_with.dll",Control_RunDLLexcludes:CommandLine
ParentImageends_with\tracker.exeexcludes:ParentImage field:"ParentImage" value:"\tracker.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLineends_with
  • ,Control_RunDLL
  • ,RunDLL
field:"CommandLine" kind:ends_with
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"