Potential Remote File Execution via MSIEXEC
Identifies the execution of the built-in Windows Installer, msiexec.exe, to install a remote package. Adversaries may abuse msiexec.exe to launch local or network accessible MSI files.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2023/09/28"
3integration = ["endpoint"]
4maturity = "production"
5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
6min_stack_version = "8.3.0"
7updated_date = "2024/04/08"
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies the execution of the built-in Windows Installer, msiexec.exe, to install a remote package. Adversaries may abuse
13msiexec.exe to launch local or network accessible MSI files.
14"""
15from = "now-9m"
16index = ["logs-endpoint.events.process-*", "logs-endpoint.events.network-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Potential Remote File Execution via MSIEXEC"
20risk_score = 21
21rule_id = "3e441bdb-596c-44fd-8628-2cfdf4516ada"
22severity = "low"
23tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Initial Access", "Tactic: Defense Evasion", "Data Source: Elastic Defend"]
24type = "eql"
25
26query = '''
27sequence with maxspan=1m
28 [process where host.os.type == "windows" and event.action == "start" and
29 process.name : "msiexec.exe" and process.args : "/V"] by process.entity_id
30 [network where host.os.type == "windows" and process.name : "msiexec.exe" and
31 event.action == "connection_attempted"] by process.entity_id
32 [process where host.os.type == "windows" and event.action == "start" and
33 process.parent.name : "msiexec.exe" and user.id : ("S-1-5-21-*", "S-1-5-12-1-*") and
34 not process.executable : ("?:\\Windows\\SysWOW64\\msiexec.exe",
35 "?:\\Windows\\System32\\msiexec.exe",
36 "?:\\Windows\\System32\\srtasks.exe",
37 "?:\\Windows\\SysWOW64\\srtasks.exe",
38 "?:\\Windows\\System32\\taskkill.exe",
39 "?:\\Windows\\Installer\\MSI*.tmp",
40 "?:\\Program Files\\*.exe",
41 "?:\\Program Files (x86)\\*.exe",
42 "?:\\Windows\\System32\\ie4uinit.exe",
43 "?:\\Windows\\SysWOW64\\ie4uinit.exe",
44 "?:\\Windows\\System32\\sc.exe",
45 "?:\\Windows\\system32\\Wbem\\mofcomp.exe",
46 "?:\\Windows\\twain_32\\fjscan32\\SOP\\crtdmprc.exe",
47 "?:\\Windows\\SysWOW64\\taskkill.exe",
48 "?:\\Windows\\SysWOW64\\schtasks.exe",
49 "?:\\Windows\\system32\\schtasks.exe",
50 "?:\\Windows\\System32\\sdbinst.exe") and
51 not (process.code_signature.subject_name == "Citrix Systems, Inc." and process.code_signature.trusted == true) and
52 not (process.name : ("regsvr32.exe", "powershell.exe", "rundll32.exe", "wscript.exe") and
53 process.Ext.token.integrity_level_name == "high" and
54 process.args : ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*")) and
55 not (process.executable : ("?:\\Program Files\\*.exe", "?:\\Program Files (x86)\\*.exe") and process.code_signature.trusted == true) and
56 not (process.name : "rundll32.exe" and process.args : "printui.dll,PrintUIEntry")
57 ] by process.parent.entity_id
58'''
59
60[[rule.threat]]
61framework = "MITRE ATT&CK"
62[[rule.threat.technique]]
63id = "T1566"
64name = "Phishing"
65reference = "https://attack.mitre.org/techniques/T1566/"
66[[rule.threat.technique.subtechnique]]
67id = "T1566.002"
68name = "Spearphishing Link"
69reference = "https://attack.mitre.org/techniques/T1566/002/"
70
71[rule.threat.tactic]
72id = "TA0001"
73name = "Initial Access"
74reference = "https://attack.mitre.org/tactics/TA0001/"
75
76[[rule.threat]]
77framework = "MITRE ATT&CK"
78[[rule.threat.technique]]
79id = "T1218"
80name = "System Binary Proxy Execution"
81reference = "https://attack.mitre.org/techniques/T1218/"
82[[rule.threat.technique.subtechnique]]
83id = "T1218.007"
84name = "Msiexec"
85reference = "https://attack.mitre.org/techniques/T1218/007/"
86
87
88
89[rule.threat.tactic]
90id = "TA0005"
91name = "Defense Evasion"
92reference = "https://attack.mitre.org/tactics/TA0005/"
Related rules
- Remote XSL Script Execution via COM
- Potential Masquerading as Business App Installer
- SolarWinds Process Disabling Services via Registry
- Suspicious Explorer Child Process
- Suspicious MS Office Child Process