[rule]
description = "Detects attempts to download and execute a file via a Windows Installer CustomAction."
id = "70c01e6b-bc59-411e-9bf7-6a46e08d953b"
license = "Elastic License v2"
name = "Execution via MsiExec DownloadAndExecute CustomAction"
os_list = ["windows"]
version = "1.0.3"
query = '''
sequence with maxspan=1m
[process where event.action == "start" and process.name : "rundll32.exe" and
process.command_line : "*!CustomActions.DownloadAndExecute*"] by process.entity_id
[dns where event.action == "lookup_requested" and
process.name : "rundll32.exe" and dns.question.name : "?*"] by process.entity_id
[process where event.action == "start" and process.parent.name : "rundll32.exe"] by process.parent.entity_id
'''
min_endpoint_version = "8.10.0"
reputation = true
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 2
[[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.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"
[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[internal]
min_endpoint_version = "8.10.0"