|
22 | 22 | enabled: true |
23 | 23 | policy: exclude |
24 | 24 | relation: or |
25 | | - from-strings: |
| 25 | + rules: |
26 | 26 | - name: Windows error reporting/telemetry, WMI provider host |
27 | | - def: ps.comm istartswith |
| 27 | + condition: ps.comm istartswith |
28 | 28 | ( |
29 | 29 | ' \"C:\\Windows\\system32\\wermgr.exe\\" \"-queuereporting_svc\" ', |
30 | 30 | 'C:\\Windows\\system32\\DllHost.exe /Processid', |
31 | 31 | 'C:\\Windows\\system32\\wbem\\wmiprvse.exe -Embedding', |
32 | 32 | 'C:\\Windows\\system32\\wbem\\wmiprvse.exe -secured -Embedding' |
33 | 33 | ) |
34 | 34 | - name: Windows error reporting/telemetry, Search Indexer, Session Manager, Auto check utility |
35 | | - def: ps.comm iin |
| 35 | + condition: ps.comm iin |
36 | 36 | ( |
37 | 37 | 'C:\\Windows\\system32\\wermgr.exe -upload', |
38 | 38 | 'C:\\Windows\\system32\\SearchIndexer.exe /Embedding', |
|
42 | 42 | 'C:\\Windows\\System32\\RuntimeBroker.exe -Embedding' |
43 | 43 | ) |
44 | 44 | - name: Various Windows processes |
45 | | - def: ps.exe iin |
| 45 | + condition: ps.exe iin |
46 | 46 | ( |
47 | 47 | 'C:\\Program Files (x86)\\Common Files\\microsoft shared\\ink\\TabTip32.exe', |
48 | 48 | 'C:\\Windows\\System32\\TokenBrokerCookies.exe', |
|
68 | 68 | 'C:\\Windows\\System32\\usocoreworker.exe -Embedding' |
69 | 69 | ) |
70 | 70 | - name: svchost |
71 | | - def: ps.comm iin {{ .Values.processes.comm.svchost | stringify }} |
| 71 | + condition: ps.comm iin {{ .Values.processes.comm.svchost | stringify }} |
72 | 72 | - name: Microsoft edge |
73 | | - def: ps.comm istartswith '\"C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe\" --type=' |
| 73 | + condition: ps.comm istartswith '\"C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe\" --type=' |
74 | 74 | - name: Microsoft dotNet |
75 | | - def: ps.comm istartswith |
| 75 | + condition: ps.comm istartswith |
76 | 76 | ( |
77 | 77 | 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\ngen.exe', |
78 | 78 | 'C:\\WINDOWS\\Microsoft.NET\\Framework64\\v4.0.30319\\Ngen.exe' |
|
85 | 85 | 'C:\\Windows\\Microsoft.Net\\Framework64\\*\\WPF\\PresentationFontCache.exe' |
86 | 86 | ) |
87 | 87 | - name: Microsoft Office |
88 | | - def: ps.exe iin |
| 88 | + condition: ps.exe iin |
89 | 89 | ( |
90 | 90 | 'C:\\Program Files\\Microsoft Office\\Office16\\MSOSYNC.EXE', |
91 | 91 | 'C:\\Program Files (x86)\\Microsoft Office\\Office16\\MSOSYNC.EXE', |
|
95 | 95 | 'C:\\Program Files\\Common Files\\Microsoft Shared\\ClickToRun\\OfficeC2RClient.exe' |
96 | 96 | ) |
97 | 97 | - name: Media Player |
98 | | - def: ps.exe = 'C:\\Program Files\\Windows Media Player\\wmpnscfg.exe' |
| 98 | + condition: ps.exe = 'C:\\Program Files\\Windows Media Player\\wmpnscfg.exe' |
99 | 99 | - name: Google |
100 | | - def: ps.comm istartswith |
| 100 | + condition: ps.comm istartswith |
101 | 101 | ( |
102 | 102 | '\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\\\" --type=', |
103 | 103 | '\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --type=' |
|
108 | 108 | - group: Suspicious process terminations |
109 | 109 | selector: |
110 | 110 | type: TerminateProcess |
111 | | - enabled: true |
112 | 111 | policy: include |
113 | | - relation: or |
114 | | - from-strings: |
| 112 | + rules: |
115 | 113 | - name: User binaries |
116 | | - def: ps.name istartswith ('C:\\Users', '\\') |
| 114 | + condition: ps.name istartswith ('C:\\Users', '\\') |
117 | 115 |
|
118 | 116 |
|
119 | 117 | # ======================= Remote thread creation ===================================================== |
|
124 | 122 | - group: Suspicious remote thread creations |
125 | 123 | selector: |
126 | 124 | type: CreateThread |
127 | | - enabled: true |
128 | 125 | policy: include |
129 | | - relation: or |
130 | | - from-strings: |
| 126 | + rules: |
131 | 127 | - name: Fishy remote threads |
132 | | - def: kevt.pid != thread.pid |
| 128 | + condition: kevt.pid != thread.pid |
133 | 129 | and |
134 | 130 | ps.exe not iin |
135 | 131 | ( |
|
143 | 139 | 'C:\\Windows\\system32\\kernel32.dll', |
144 | 140 | 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe' |
145 | 141 | ) |
146 | | - action: | |
147 | | - {{ $title := cat "Identified remote thread creation in" .Kevt.Kparams.exe }} |
148 | | - {{ $text := cat "Injected by" .Kevt.PS.Exe }} |
149 | | - {{ emit $title $text }} |
| 142 | + action: > |
| 143 | + {{ emit |
| 144 | + (printf "Detected remote thread creation in %s" .Kevt.Kparams.exe) |
| 145 | + (printf "Possible code injection by %s" .Kevt.PS.Exe) |
| 146 | + }} |
150 | 147 |
|
151 | 148 | # ======================= Network connection initiated =============================================== |
152 | 149 | # |
|
156 | 153 | - group: Suspicious network-connecting binaries |
157 | 154 | selector: |
158 | 155 | type: Connect |
159 | | - enabled: true |
160 | 156 | policy: include |
161 | | - relation: or |
162 | | - from-strings: |
| 157 | + rules: |
163 | 158 | - name: Suspicious sources for network-connecting binaries |
164 | | - def: ps.exe istartswith |
| 159 | + condition: ps.exe istartswith |
165 | 160 | ( |
166 | 161 | 'C:\\Users', |
167 | 162 | 'C:\\Recycle', |
|
174 | 169 | 'C:\\Windows\\system32\\config' |
175 | 170 | ) |
176 | 171 | - name: Suspicious Windows tools network-connecting binaries |
177 | | - def: ps.name in |
| 172 | + condition: ps.name in |
178 | 173 | ( |
179 | 174 | 'at.exe', |
180 | 175 | 'certutil.exe', |
|
184 | 179 | 'driverquery.exe', |
185 | 180 | 'dsquery.exe', |
186 | 181 | 'hh.exe', |
187 | | - 'infDefaultInstall.exe', |
| 182 | + 'infconditionaultInstall.exe', |
188 | 183 | 'java.exe', |
189 | 184 | 'javaw.exe', |
190 | 185 | 'javaws.exe', |
|
213 | 208 | 'wscript.exe' |
214 | 209 | ) |
215 | 210 | - name: Relevant 3rd Party Tools |
216 | | - def: ps.name in |
| 211 | + condition: ps.name in |
217 | 212 | ( |
218 | 213 | 'nc.exe', |
219 | 214 | 'ncat.exe', |
|
228 | 223 | 'psinfo.exe' |
229 | 224 | ) |
230 | 225 | - name: Suspicious ports |
231 | | - def: net.dport in |
| 226 | + condition: net.dport in |
232 | 227 | ( |
233 | 228 | 22, |
234 | 229 | 23, |
|
249 | 244 | - group: Microsoft binaries and known addresses |
250 | 245 | selector: |
251 | 246 | type: Connect |
252 | | - enabled: true |
253 | 247 | policy: exclude |
254 | | - relation: or |
255 | | - from-strings: |
| 248 | + rules: |
256 | 249 | - name: Microsoft binaries |
257 | | - def: ps.exe istartswith 'C:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\' |
| 250 | + condition: ps.exe istartswith 'C:\\ProgramData\\Microsoft\\Windows conditionender\\Platform\\' |
258 | 251 | or |
259 | 252 | ps.exe endswith 'AppData\\Local\\Microsoft\\Teams\\current\\Teams.exe' |
260 | 253 | or |
|
265 | 258 | 'microsoft.com.nsatc.net' |
266 | 259 | ) |
267 | 260 | - name: OCSP protocol known addresses |
268 | | - def: net.dip in (23.4.43.27, 72.21.91.29) |
| 261 | + condition: net.dip in (23.4.43.27, 72.21.91.29) |
269 | 262 | - name: Loopback addresses |
270 | | - def: net.dip = 127.0.0.1 or net.dip startswith 'fe80:0:0:0' |
| 263 | + condition: net.dip = 127.0.0.1 or net.dip startswith 'fe80:0:0:0' |
271 | 264 |
|
272 | 265 | # ======================= File created =============================================================== |
273 | 266 | # |
274 | 267 | - group: Suspicious file creation operations |
275 | 268 | selector: |
276 | 269 | type: CreateFile |
277 | | - enabled: true |
278 | 270 | policy: include |
279 | | - relation: or |
280 | | - from-strings: |
| 271 | + rules: |
281 | 272 | - name: Startup links and shortcut modifications |
282 | | - def: file.operation = 'create' |
| 273 | + condition: file.operation = 'create' |
283 | 274 | and |
284 | 275 | file.name icontains |
285 | 276 | ( |
286 | 277 | '\\Start Menu', |
287 | 278 | '\\Startup\\' |
288 | 279 | ) |
289 | 280 | - name: Microsoft Outlook attachments |
290 | | - def: file.operation = 'create' and file.name icontains '\\Content.Outlook\\' |
| 281 | + condition: file.operation = 'create' and file.name icontains '\\Content.Outlook\\' |
291 | 282 | - name: Downloaded files |
292 | | - def: file.operation = 'create' and file.name icontains '\\Downloads\\' |
| 283 | + condition: file.operation = 'create' and file.name icontains '\\Downloads\\' |
293 | 284 | - name: Microsoft ClickOnce application |
294 | | - def: file.operation = 'create' |
| 285 | + condition: file.operation = 'create' |
295 | 286 | and |
296 | 287 | file.extension in |
297 | 288 | ( |
298 | 289 | '.application', |
299 | 290 | '.appref-ms' |
300 | 291 | ) |
301 | 292 | - name: Batch scripting |
302 | | - def: file.operation = 'create' |
| 293 | + condition: file.operation = 'create' |
303 | 294 | and |
304 | 295 | file.extension in |
305 | 296 | ( |
|
309 | 300 | '.cmdline' |
310 | 301 | ) |
311 | 302 | - name: Fishy extensions |
312 | | - def: file.operation = 'create' |
| 303 | + condition: file.operation = 'create' |
313 | 304 | and |
314 | 305 | file.extension in |
315 | 306 | ( |
|
333 | 324 | '.xls' |
334 | 325 | ) |
335 | 326 | - name: Powershell persistence |
336 | | - def: file.operation = 'create' |
| 327 | + condition: file.operation = 'create' |
337 | 328 | and |
338 | 329 | file.name imatches 'C:\\Windows\\*\\WindowsPowerShell' |
339 | 330 |
|
|
342 | 333 | - group: Suspicious registry key modifications |
343 | 334 | selector: |
344 | 335 | category: registry |
345 | | - enabled: true |
346 | 336 | policy: include |
347 | | - relation: or |
348 | | - from-strings: |
| 337 | + rules: |
349 | 338 | - name: Core Windows keys |
350 | | - def: kevt.name in ('RegCreateKey', 'RegDeleteKey', 'RegSetValue', 'RegDeleteValue') |
| 339 | + condition: > |
| 340 | + kevt.name in ('RegCreateKey', 'RegDeleteKey', 'RegSetValue', 'RegDeleteValue') |
351 | 341 | and |
352 | 342 | registry.key.name icontains |
353 | 343 | ( |
|
378 | 368 | ) |
379 | 369 |
|
380 | 370 | - name: Services |
381 | | - def: kevt.name in ('RegCreateKey', 'RegDeleteKey', 'RegSetValue', 'RegDeleteValue') |
| 371 | + condition: kevt.name in ('RegCreateKey', 'RegDeleteKey', 'RegSetValue', 'RegDeleteValue') |
382 | 372 | and |
383 | 373 | registry.key.name iendswith |
384 | 374 | ( |
|
0 commit comments