Skip to content

Commit 717d623

Browse files
w0rk3rgithub-actions[bot]
authored andcommitted
[Rule Tuning] Suspicious DLL Loaded for Persistence or Privilege Escalation (#3887)
(cherry picked from commit ffb6817)
1 parent e324c66 commit 717d623

File tree

1 file changed

+34
-9
lines changed

1 file changed

+34
-9
lines changed

rules/windows/privilege_escalation_persistence_phantom_dll.toml

+34-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2020/01/07"
33
integration = ["endpoint", "windows"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2024/07/11"
66

77
[rule]
88
author = ["Elastic"]
@@ -92,27 +92,52 @@ type = "eql"
9292

9393
query = '''
9494
any where host.os.type == "windows" and
95-
(event.category : ("driver", "library") or (event.category == "process" and event.action : "Image loaded*")) and
96-
(
95+
(event.category : ("driver", "library") or (event.category == "process" and event.action : "Image loaded*")) and
96+
(
9797
/* compatible with Elastic Endpoint Library Events */
98-
(?dll.name : ("wlbsctrl.dll", "wbemcomn.dll", "WptsExtensions.dll", "Tsmsisrv.dll", "TSVIPSrv.dll", "Msfte.dll",
99-
"wow64log.dll", "WindowsCoreDeviceInfo.dll", "Ualapi.dll", "wlanhlp.dll", "phoneinfo.dll", "EdgeGdi.dll",
100-
"cdpsgshims.dll", "windowsperformancerecordercontrol.dll", "diagtrack_win.dll", "oci.dll", "TPPCOIPW32.dll",
101-
"tpgenlic.dll", "thinmon.dll", "fxsst.dll", "msTracer.dll")
102-
and (?dll.code_signature.trusted != true or ?dll.code_signature.exists != true)) or
98+
(
99+
?dll.name : (
100+
"wlbsctrl.dll", "wbemcomn.dll", "WptsExtensions.dll", "Tsmsisrv.dll", "TSVIPSrv.dll", "Msfte.dll",
101+
"wow64log.dll", "WindowsCoreDeviceInfo.dll", "Ualapi.dll", "wlanhlp.dll", "phoneinfo.dll", "EdgeGdi.dll",
102+
"cdpsgshims.dll", "windowsperformancerecordercontrol.dll", "diagtrack_win.dll", "oci.dll", "TPPCOIPW32.dll",
103+
"tpgenlic.dll", "thinmon.dll", "fxsst.dll", "msTracer.dll"
104+
)
105+
and (
106+
?dll.code_signature.trusted != true or
107+
?dll.code_signature.exists != true or
108+
(
109+
dll.code_signature.trusted == true and
110+
not dll.code_signature.subject_name : ("Microsoft Windows", "Microsoft Corporation", "Microsoft Windows Publisher")
111+
)
112+
) or
103113
104114
/* compatible with Sysmon EventID 7 - Image Load */
105115
(file.name : ("wlbsctrl.dll", "wbemcomn.dll", "WptsExtensions.dll", "Tsmsisrv.dll", "TSVIPSrv.dll", "Msfte.dll",
106116
"wow64log.dll", "WindowsCoreDeviceInfo.dll", "Ualapi.dll", "wlanhlp.dll", "phoneinfo.dll", "EdgeGdi.dll",
107117
"cdpsgshims.dll", "windowsperformancerecordercontrol.dll", "diagtrack_win.dll", "oci.dll", "TPPCOIPW32.dll",
108118
"tpgenlic.dll", "thinmon.dll", "fxsst.dll", "msTracer.dll") and
109-
not file.path : ("?:\\Windows\\System32\\wbemcomn.dll", "?:\\Windows\\SysWOW64\\wbemcomn.dll") and
110119
not file.hash.sha256 :
111120
("6e837794fc282446906c36d681958f2f6212043fc117c716936920be166a700f",
112121
"b14e4954e8cca060ffeb57f2458b6a3a39c7d2f27e94391cbcea5387652f21a4",
113122
"c258d90acd006fa109dc6b748008edbb196d6168bc75ace0de0de54a4db46662") and
114123
not file.code_signature.status == "Valid")
124+
) and
125+
not
126+
(
127+
?dll.path : (
128+
"?:\\Windows\\System32\\wbemcomn.dll",
129+
"?:\\Windows\\SysWOW64\\wbemcomn.dll",
130+
"?:\\Windows\\System32\\windowsperformancerecordercontrol.dll",
131+
"?:\\Windows\\System32\\wlanhlp.dll"
132+
) or
133+
file.path : (
134+
"?:\\Windows\\System32\\wbemcomn.dll",
135+
"?:\\Windows\\SysWOW64\\wbemcomn.dll",
136+
"?:\\Windows\\System32\\windowsperformancerecordercontrol.dll",
137+
"?:\\Windows\\System32\\wlanhlp.dll"
138+
)
115139
)
140+
)
116141
'''
117142

118143

0 commit comments

Comments
 (0)