Detection rules › Sigma

Shell32 DLL Execution in Suspicious Directory

Status
test
Severity
high
Log source
category process_creation, product windows
Author
Christian Burkard (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects shell32.dll executing a DLL in a suspicious directory

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Shell32 DLL Execution in Suspicious Directory
id: 32b96012-7892-429e-b26c-ac2bf46066ff
status: test
description: Detects shell32.dll executing a DLL in a suspicious directory
references:
    - https://www.group-ib.com/resources/threat-research/red-curl-2.html
author: Christian Burkard (Nextron Systems)
date: 2021-11-24
modified: 2023-02-09
tags:
    - attack.execution
    - attack.stealth
    - attack.t1218.011
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\rundll32.exe'
        - OriginalFileName: 'RUNDLL32.EXE'
    selection_cli:
        CommandLine|contains|all:
            - 'shell32.dll'
            - 'Control_RunDLL'
        CommandLine|contains:
            - '%AppData%'
            - '%LocalAppData%'
            - '%Temp%'
            - '%tmp%'
            - '\AppData\'
            - '\Temp\'
            - '\Users\Public\'
    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|contains|all:
        - 'shell32.dll'
        - 'Control_RunDLL'
    CommandLine|contains:
        - '%AppData%'
        - '%LocalAppData%'
        - '%Temp%'
        - '%tmp%'
        - '\AppData\'
        - '\Temp\'
        - '\Users\Public\'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • %AppData% corpus 13 (sigma 11, chronicle 2)
  • %LocalAppData% corpus 4 (sigma 4)
  • %Temp% corpus 16 (sigma 13, chronicle 2, kusto 1)
  • %tmp% corpus 15 (sigma 13, chronicle 2)
  • Control_RunDLL corpus 6 (sigma 3, splunk 2, elastic 1)
  • \AppData\ corpus 11 (sigma 8, elastic 3)
  • \Temp\ corpus 5 (sigma 5)
  • \Users\Public\ corpus 18 (sigma 17, elastic 1)
  • shell32.dll corpus 3 (sigma 3)
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"