Detection rules › Sigma

DllUnregisterServer Function Call Via Msiexec.EXE

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects MsiExec loading a DLL and calling its DllUnregisterServer function

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: DllUnregisterServer Function Call Via Msiexec.EXE
id: 84f52741-8834-4a8c-a413-2eb2269aa6c8
status: test
description: Detects MsiExec loading a DLL and calling its DllUnregisterServer function
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218.007/T1218.007.md
    - https://lolbas-project.github.io/lolbas/Binaries/Msiexec/
    - https://twitter.com/_st0pp3r_/status/1583914515996897281
author: frack113
date: 2022-04-24
modified: 2024-03-13
tags:
    - attack.stealth
    - attack.t1218.007
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        - Image|endswith: '\msiexec.exe'
        - OriginalFileName: '\msiexec.exe'
    selection_flag:
        CommandLine|contains|windash: ' -z '
    selection_dll:
        CommandLine|contains: '.dll'
    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: '\msiexec.exe'
    - OriginalFileName: '\msiexec.exe'

Stage 2: selection_flag

selection_flag:
    CommandLine|contains|windash: ' -z '

Stage 3: selection_dll

selection_dll:
    CommandLine|contains: '.dll'

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
CommandLinematch
  • -z transforms: windash
  • .dll corpus 16 (sigma 16)
Imageends_with
  • \msiexec.exe corpus 21 (sigma 21)
OriginalFileNameeq
  • \msiexec.exe corpus 2 (sigma 2)