Detection rules › Sigma

Suspicious Msiexec Execute Arbitrary DLL

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

Adversaries may abuse msiexec.exe to proxy execution of malicious payloads. Msiexec.exe is the command-line utility for the Windows Installer and is thus commonly associated with executing installation packages (.msi)

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious Msiexec Execute Arbitrary DLL
id: 6f4191bb-912b-48a8-9ce7-682769541e6d
status: test
description: |
    Adversaries may abuse msiexec.exe to proxy execution of malicious payloads.
    Msiexec.exe is the command-line utility for the Windows Installer and is thus commonly associated with executing installation packages (.msi)
references:
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218.007/T1218.007.md
    - https://twitter.com/_st0pp3r_/status/1583914515996897281
author: frack113
date: 2022-01-16
modified: 2026-01-09
tags:
    - attack.stealth
    - attack.t1218.007
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\msiexec.exe'
        CommandLine|contains|windash: ' /Y'
    filter_main_legit_path:
        CommandLine|contains:
            - '\MsiExec.exe" /Y "C:\Program Files\'
            - '\MsiExec.exe" /Y "C:\Program Files (x86)\'
            - '\MsiExec.exe" /Y "C:\Windows\System32\'
            - '\MsiExec.exe" /Y "C:\Windows\SysWOW64\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Legitimate script
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    Image|endswith: '\msiexec.exe'
    CommandLine|contains|windash: ' /Y'

Stage 2: not filter_main_legit_path

filter_main_legit_path:
    CommandLine|contains:
        - '\MsiExec.exe" /Y "C:\Program Files\'
        - '\MsiExec.exe" /Y "C:\Program Files (x86)\'
        - '\MsiExec.exe" /Y "C:\Windows\System32\'
        - '\MsiExec.exe" /Y "C:\Windows\SysWOW64\'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematch\MsiExec.exe" /Y "C:\Program Files (x86)\
CommandLinematch\MsiExec.exe" /Y "C:\Program Files\
CommandLinematch\MsiExec.exe" /Y "C:\Windows\SysWOW64\
CommandLinematch\MsiExec.exe" /Y "C:\Windows\System32\

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
  • /Y transforms: windash corpus 2 (sigma 2)
Imageends_with
  • \msiexec.exe corpus 21 (sigma 21)