forked from elastic/detection-rules
-
Notifications
You must be signed in to change notification settings - Fork 1
/
defense_evasion_suspicious_msiexec_execution.toml
88 lines (75 loc) · 3.23 KB
/
defense_evasion_suspicious_msiexec_execution.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[metadata]
creation_date = "2023/09/26"
integration = ["endpoint"]
maturity = "production"
updated_date = "2024/05/21"
[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Identifies suspicious execution of the built-in Windows Installer, msiexec.exe, to install a package from usual paths or
parent process. Adversaries may abuse msiexec.exe to launch malicious local MSI files.
"""
from = "now-119m"
index = ["logs-endpoint.events.process-*", "winlogbeat-*", "logs-windows.*", "endgame-*"]
interval = "60m"
language = "eql"
license = "Elastic License v2"
name = "Suspicious Execution via MSIEXEC"
references = [
"https://lolbas-project.github.io/lolbas/Binaries/Msiexec/",
"https://www.guardicore.com/labs/purple-fox-rootkit-now-propagates-as-a-worm/",
]
risk_score = 21
rule_id = "708c9d92-22a3-4fe0-b6b9-1f861c55502d"
severity = "low"
tags = [
"Domain: Endpoint",
"OS: Windows",
"Use Case: Threat Detection",
"Tactic: Defense Evasion",
"Rule Type: BBR",
"Data Source: Elastic Defend",
"Data Source: Elastic Endgame",
]
timestamp_override = "event.ingested"
type = "eql"
query = '''
process where host.os.type == "windows" and event.action == "start" and
process.name : "msiexec.exe" and user.id : ("S-1-5-21*", "S-1-12-*") and process.parent.executable != null and
(
(process.args : "/i" and process.args : ("/q", "/quiet") and process.args_count == 4 and
process.args : ("?:\\Users\\*", "?:\\ProgramData\\*") and
not process.parent.executable : ("?:\\Program Files (x86)\\*.exe",
"?:\\Program Files\\*.exe",
"?:\\Windows\\explorer.exe",
"?:\\Users\\*\\Desktop\\*",
"?:\\Users\\*\\Downloads\\*",
"?:\\programdata\\*")) or
(process.args_count == 1 and not process.parent.executable : ("?:\\Windows\\explorer.exe", "?:\\Windows\\SysWOW64\\explorer.exe")) or
(process.args : "/i" and process.args : ("/q", "/quiet") and process.args_count == 4 and
(process.parent.args : "Schedule" or process.parent.name : "wmiprvse.exe" or
process.parent.executable : "?:\\Users\\*\\AppData\\*" or
(process.parent.name : ("powershell.exe", "cmd.exe") and length(process.parent.command_line) >= 200))) or
(process.args : "/i" and process.args : ("/q", "/quiet") and process.args_count == 4 and
?process.working_directory : "?:\\" and process.parent.name : ("cmd.exe", "powershell.exe"))
) and
/* noisy pattern */
not (process.parent.executable : "?:\\Users\\*\\AppData\\Local\\Temp\\*" and ?process.parent.args_count >= 2 and
process.args : "?:\\Users\\*\\AppData\\Local\\Temp\\*\\*.msi") and
not process.args : ("?:\\Program Files (x86)\\*", "?:\\Program Files\\*")
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[rule.threat.technique.subtechnique]]
id = "T1218.007"
name = "Msiexec"
reference = "https://attack.mitre.org/techniques/T1218/007/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"