Detection rules › Sigma

Invoke-Obfuscation Via Use Rundll32 - Security

Status
test
Severity
high
Log source
product windows, service security
Author
Nikita Nazarov, oscd.community
Source
github.com/SigmaHQ/sigma

Detects Obfuscated Powershell via use Rundll32 in Scripts

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Invoke-Obfuscation Via Use Rundll32 - Security
id: cd0f7229-d16f-42de-8fe3-fba365fbcb3a
related:
    - id: 641a4bfb-c017-44f7-800c-2aee0184ce9b
      type: derived
status: test
description: Detects Obfuscated Powershell via use Rundll32 in Scripts
references:
    - https://github.com/SigmaHQ/sigma/issues/1009 # (Task30)
author: Nikita Nazarov, oscd.community
date: 2020-10-09
modified: 2022-11-29
tags:
    - attack.stealth
    - attack.t1027
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    service: security
    definition: The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697
detection:
    selection:
        EventID: 4697
        ServiceFileName|contains|all:
            - '&&'
            - 'rundll32'
            - 'shell32.dll'
            - 'shellexec_rundll'
        ServiceFileName|contains:
            - value
            - invoke
            - comspec
            - iex
    condition: selection
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    EventID: 4697
    ServiceFileName|contains|all:
        - '&&'
        - 'rundll32'
        - 'shell32.dll'
        - 'shellexec_rundll'
    ServiceFileName|contains:
        - value
        - invoke
        - comspec
        - iex

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
ServiceFileNamematch
  • && corpus 3 (sigma 3)
  • comspec
  • iex
  • invoke corpus 2 (sigma 2)
  • rundll32 corpus 2 (sigma 2)
  • shell32.dll corpus 2 (sigma 2)
  • shellexec_rundll corpus 2 (sigma 2)
  • value