Detection rules › Sigma

Potential MsiExec Masquerading

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

Detects the execution of msiexec.exe from an uncommon directory

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential MsiExec Masquerading
id: e22a6eb2-f8a5-44b5-8b44-a2dbd47b1144
status: test
description: Detects the execution of msiexec.exe from an uncommon directory
references:
    - https://twitter.com/200_okay_/status/1194765831911215104
author: Florian Roth (Nextron Systems)
date: 2019-11-14
modified: 2023-02-21
tags:
    - attack.stealth
    - attack.t1036.005
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - Image|endswith: '\msiexec.exe'
        - OriginalFileName: '\msiexec.exe'
    filter:
        Image|startswith:
            - 'C:\Windows\System32\'
            - 'C:\Windows\SysWOW64\'
            - 'C:\Windows\WinSxS\'
    condition: selection and not filter
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not filter

Stage 1: selection

selection:
    - Image|endswith: '\msiexec.exe'
    - OriginalFileName: '\msiexec.exe'

Stage 2: not filter

filter:
    Image|startswith:
        - 'C:\Windows\System32\'
        - 'C:\Windows\SysWOW64\'
        - 'C:\Windows\WinSxS\'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imagestarts_withC:\Windows\SysWOW64\excludes:Image field:"Image" value:"C:\Windows\SysWOW64\"
Imagestarts_withC:\Windows\System32\excludes:Image field:"Image" value:"C:\Windows\System32\"
Imagestarts_withC:\Windows\WinSxS\excludes:Image field:"Image" value:"C:\Windows\WinSxS\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \msiexec.exe corpus 20 (sigma 20)
field:"Image" kind:ends_with value:"\msiexec.exe"
OriginalFileNameeq
  • \msiexec.exe corpus 2 (sigma 2)
field:"OriginalFileName" kind:eq value:"\msiexec.exe"