Suspicious Always Install Elevated MSI Spawned Cmd And Powershell (via process_creation)

This rule detects Windows Installer service (msiexec.exe) spawning "cmd" or "powershell"

SigmamediumWindowsv1
sigma
title: Suspicious Always Install Elevated MSI Spawned Cmd And Powershell (via process_creation)
id: 31f52ef8-e0f1-5222-81ee-53015d0caabc
status: stable
description: This rule detects Windows Installer service (msiexec.exe) spawning "cmd" or "powershell"
references:
    - https://attack.mitre.org/techniques/T1548/002/
    - https://image.slidesharecdn.com/kheirkhabarovoffzonefinal-181117201458/95/hunting-for-privilege-escalation-in-windows-environment-50-638.jpg
author: Huntrule Team
date: 2026-07-04
tags:
    - attack.privilege-escalation
    - attack.t1548.002
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        - Image|endswith:
              - '\cmd.exe'
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'Cmd.Exe'
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_parent:
        ParentImage|contains|all:
            - '\Windows\Installer\'
            - 'msi'
        ParentImage|endswith: 'tmp'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.