Detection rules › Sigma

Suspicious MsiExec Embedding Parent

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

Adversaries may abuse msiexec.exe to proxy the execution of malicious payloads

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Suspicious MsiExec Embedding Parent
id: 4a2a2c3e-209f-4d01-b513-4155a540b469
status: test
description: Adversaries may abuse msiexec.exe to proxy the execution of malicious payloads
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218.007/T1218.007.md
author: frack113
date: 2022-04-16
modified: 2022-07-14
tags:
    - attack.stealth
    - attack.t1218.007
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\cmd.exe'
        ParentCommandLine|contains|all:
            - 'MsiExec.exe'
            - '-Embedding '
    filter_splunk_ufw:
        Image|endswith: ':\Windows\System32\cmd.exe'
        CommandLine|contains: 'C:\Program Files\SplunkUniversalForwarder\bin\'
    filter_vs:
        - CommandLine|contains: '\DismFoDInstall.cmd'
        - ParentCommandLine|contains|all:
              - '\MsiExec.exe -Embedding '
              - 'Global\MSI0000'
    condition: selection and not 1 of filter*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter*

Stage 1: selection

selection:
    Image|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\cmd.exe'
    ParentCommandLine|contains|all:
        - 'MsiExec.exe'
        - '-Embedding '

Stage 2: not filter*

filter_splunk_ufw:
    Image|endswith: ':\Windows\System32\cmd.exe'
    CommandLine|contains: 'C:\Program Files\SplunkUniversalForwarder\bin\'
filter_vs:
    - CommandLine|contains: '\DismFoDInstall.cmd'
    - ParentCommandLine|contains|all:
          - '\MsiExec.exe -Embedding '
          - 'Global\MSI0000'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CommandLinematchC:\Program Files\SplunkUniversalForwarder\bin\excludes:CommandLine field:"CommandLine" value:"C:\Program Files\SplunkUniversalForwarder\bin\"
Imageends_with:\Windows\System32\cmd.exeexcludes:Image field:"Image" value:":\Windows\System32\cmd.exe"
ParentCommandLinematchGlobal\MSI0000excludes:ParentCommandLine field:"ParentCommandLine" value:"Global\MSI0000"
ParentCommandLinematch\MsiExec.exe -Embedding excludes:ParentCommandLine field:"ParentCommandLine" value:"\MsiExec.exe -Embedding "
CommandLinematch\DismFoDInstall.cmdexcludes:CommandLine field:"CommandLine" value:"\DismFoDInstall.cmd"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \powershell.exe corpus 179 (sigma 178, kusto 1)
  • \pwsh.exe corpus 165 (sigma 164, kusto 1)
field:"Image" kind:ends_with
ParentCommandLinematch
  • -Embedding
  • MsiExec.exe
field:"ParentCommandLine" kind:match