Detection rules › Elastic

Execution via Windows Installer Transforms

Time window
1m
Source
github.com/elastic/protections-artifacts

Identifies the execution of a Windows Installer via transforms from unusual parent process. Adversaries may abuse Windows installer transforms to hijack the normal execution of a legit installer for initial access and execution.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies the execution of a Windows Installer via transforms from unusual parent process. Adversaries may abuse
Windows installer transforms to hijack the normal execution of a legit installer for initial access and execution.
"""
id = "4b2f842b-8a9e-4e9d-91ae-0ef875efd561"
license = "Elastic License v2"
name = "Execution via Windows Installer Transforms"
os_list = ["windows"]
reference = ["https://learn.microsoft.com/en-us/windows/win32/msi/about-transforms"]
version = "1.0.5"

query = '''
sequence with maxspan=1m
[process where event.action == "start" and user.id != "S-1-5-18" and
 (process.pe.original_file_name == "msiexec.exe" or process.name : "msiexec.exe") and
 process.args : ("/i*", "-i*") and process.args : ("/q*", "-q*") and
 process.command_line : "*transforms*=*" and
 (process.parent.code_signature.subject_name in ("Microsoft Corporation", "Microsoft Windows") or process.parent.name : "python*.exe") and
 not process.args : ("TRANSFORMS=C:\\Windows\\*.MST", "\\\\*.msi")]
[process where event.action in ("start", "already_running") and
 (
  (process.name : "msiexec.exe" and process.args == "/V") or

  (process.parent.name : "msiexec.exe" and process.parent.args == "/V")
  )]
'''

min_endpoint_version = "8.14.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true

[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1
tree = true

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.007"
name = "Msiexec"
reference = "https://attack.mitre.org/techniques/T1218/007/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.14.0"

Stages and Predicates

Stage 1: process

[process where event.action == "start" and user.id != "S-1-5-18" and
 (process.pe.original_file_name == "msiexec.exe" or process.name : "msiexec.exe") and
 process.args : ("/i*", "-i*") and process.args : ("/q*", "-q*") and
 process.command_line : "*transforms*=*" and
 (process.parent.code_signature.subject_name in ("Microsoft Corporation", "Microsoft Windows") or process.parent.name : "python*.exe") and
 not process.args : ("TRANSFORMS=C:\\Windows\\*.MST", "\\\\*.msi")]

Stage 2: process

[process where event.action in ("start", "already_running") and
 (
  (process.name : "msiexec.exe" and process.args == "/V") or

  (process.parent.name : "msiexec.exe" and process.parent.args == "/V")
  )]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcardTRANSFORMS=C:\Windows\*.MST, \\*.msiexcludes:process.args field:"process.args" value:"TRANSFORMS=C:\Windows\*.MST" field:"process.args" value:"\\*.msi"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
event.actionin
  • already_running corpus 2 (elastic 2)
  • start corpus 391 (elastic 391)
field:"EventType" kind:in
process.argseq
  • /V corpus 2 (elastic 2)
field:"process.args" kind:eq value:"/V"
process.argswildcard
  • -i* corpus 4 (elastic 4)
  • -q*
  • /i* corpus 4 (elastic 4)
  • /q*
field:"process.args" kind:wildcard
process.command_linewildcard
  • *transforms*=*
field:"CommandLine" kind:wildcard value:"*transforms*=*"
process.namewildcard
  • msiexec.exe corpus 46 (elastic 41, splunk 5)
field:"process_name" kind:wildcard value:"msiexec.exe"
process.parent.argseq
  • /V corpus 2 (elastic 2)
field:"process.parent.args" kind:eq value:"/V"
process.parent.code_signature.subject_namein
  • Microsoft Corporation
  • Microsoft Windows
field:"process.parent.code_signature.subject_name" kind:in
process.parent.namewildcard
  • msiexec.exe corpus 19 (elastic 14, splunk 3, kusto 2)
  • python*.exe corpus 2 (elastic 2)
field:"parent_process_name" kind:wildcard
process.pe.original_file_nameeq
  • msiexec.exe corpus 20 (elastic 11, sigma 5, splunk 4)
field:"OriginalFileName" kind:eq value:"msiexec.exe"
user.idne
  • S-1-5-18 corpus 36 (elastic 36)
field:"user.id" kind:ne value:"S-1-5-18"