Skip to content

Commit 93f3099

Browse files
w0rk3rtradebot-elastic
authored andcommitted
[Rule Tuning] Connection to Commonly Abused Web Services (#5060)
* [Rule Tuning] Connection to Commonly Abused Web Services * Update command_and_control_common_webservices.toml (cherry picked from commit 9ee15a1)
1 parent 00d8ec9 commit 93f3099

File tree

1 file changed

+50
-34
lines changed

1 file changed

+50
-34
lines changed

rules/windows/command_and_control_common_webservices.toml

Lines changed: 50 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[metadata]
22
creation_date = "2020/11/04"
3-
integration = ["endpoint"]
3+
integration = ["endpoint", "sentinel_one_cloud_funnel"]
44
maturity = "production"
5-
updated_date = "2025/08/13"
5+
updated_date = "2025/09/04"
66

77
[transform]
88
[[transform.investigate]]
@@ -70,7 +70,7 @@ allows the adversary to blend into legitimate traffic activity. These popular se
7070
have most likely been used before compromise, which helps malicious traffic blend in.
7171
"""
7272
from = "now-9m"
73-
index = ["logs-endpoint.events.network-*"]
73+
index = ["logs-endpoint.events.network-*", "logs-sentinel_one_cloud_funnel.*"]
7474
language = "eql"
7575
license = "Elastic License v2"
7676
name = "Connection to Commonly Abused Web Services"
@@ -141,13 +141,15 @@ tags = [
141141
"Tactic: Command and Control",
142142
"Resources: Investigation Guide",
143143
"Data Source: Elastic Defend",
144+
"Data Source: SentinelOne",
144145
]
145146
timestamp_override = "event.ingested"
146147
type = "eql"
147148

148149
query = '''
149-
network where host.os.type == "windows" and network.protocol == "dns" and
150-
process.name != null and user.id not in ("S-1-5-18", "S-1-5-19", "S-1-5-20") and
150+
network where host.os.type == "windows" and
151+
dns.question.name != null and process.name != null and
152+
not (?user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20") or user.domain == "NT AUTHORITY") and
151153
/* Add new WebSvc domains here */
152154
dns.question.name :
153155
(
@@ -240,23 +242,23 @@ network where host.os.type == "windows" and network.protocol == "dns" and
240242
process.executable : (
241243
"?:\\Program Files\\*.exe",
242244
"?:\\Program Files (x86)\\*.exe",
243-
"?:\\Windows\\system32\\svchost.exe",
244-
"?:\\Windows\\System32\\WWAHost.exe",
245-
"?:\\Windows\\System32\\smartscreen.exe",
246-
"?:\\Windows\\System32\\MicrosoftEdgeCP.exe",
247245
"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
248-
"?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
249246
"?:\\Users\\*\\AppData\\Local\\BraveSoftware\\*\\Application\\brave.exe",
250-
"?:\\Users\\*\\AppData\\Local\\Vivaldi\\Application\\vivaldi.exe",
247+
"?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
248+
"?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\OneDrive.exe",
251249
"?:\\Users\\*\\AppData\\Local\\Programs\\Opera*\\opera.exe",
252250
"?:\\Users\\*\\AppData\\Local\\Programs\\Fiddler\\Fiddler.exe",
253-
"?:\\Users\\*\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",
254-
"?:\\Users\\*\\AppData\\Local\\Microsoft\\OneDrive\\OneDrive.exe",
255251
"?:\\Users\\*\\AppData\\Local\\PowerToys\\PowerToys.exe",
252+
"?:\\Users\\*\\AppData\\Local\\Vivaldi\\Application\\vivaldi.exe",
253+
"?:\\Users\\*\\AppData\\Local\\Zen Browser\\zen.exe",
254+
"?:\\Users\\*\\Wavesor Software\\WaveBrowser\\wavebrowser.exe",
255+
"?:\\Windows\\System32\\MicrosoftEdgeCP.exe",
256256
"?:\\Windows\\system32\\mobsync.exe",
257257
"?:\\Windows\\SysWOW64\\mobsync.exe",
258+
"?:\\Windows\\system32\\svchost.exe",
259+
"?:\\Windows\\System32\\smartscreen.exe",
258260
"?:\\Windows\\System32\\wsl.exe",
259-
"?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe"
261+
"?:\\Windows\\System32\\WWAHost.exe"
260262
)
261263
) or
262264
@@ -265,19 +267,9 @@ network where host.os.type == "windows" and network.protocol == "dns" and
265267
process.code_signature.trusted == true) and dns.question.name : ("discord.com", "cdn.discordapp.com", "discordapp.com")
266268
) or
267269
268-
/* MS Sharepoint */
269-
(process.name : "Microsoft.SharePoint.exe" and (process.code_signature.subject_name : "Microsoft Corporation" and
270-
process.code_signature.trusted == true) and dns.question.name : "onedrive.live.com"
271-
) or
272-
273-
/* Firefox */
274-
(process.name : "firefox.exe" and (process.code_signature.subject_name : "Mozilla Corporation" and
275-
process.code_signature.trusted == true)
276-
) or
277-
278-
/* Dropbox */
279-
(process.name : "Dropbox.exe" and (process.code_signature.subject_name : "Dropbox, Inc" and
280-
process.code_signature.trusted == true) and dns.question.name : ("api.dropboxapi.com", "*.dropboxusercontent.com")
270+
/* MS Sharepoint / OneDrive */
271+
(process.name : ("Microsoft.SharePoint.exe", "OneDrive.Sync.Service.exe") and dns.question.name : "onedrive.live.com" and
272+
(process.code_signature.subject_name : "Microsoft Corporation" and process.code_signature.trusted == true)
281273
) or
282274
283275
/* Obsidian - Plugins are stored on raw.githubusercontent.com */
@@ -290,24 +282,48 @@ network where host.os.type == "windows" and network.protocol == "dns" and
290282
process.code_signature.trusted == true) and dns.question.name : ("onedrive.live.com", "skyapi.onedrive.live.com")
291283
) or
292284
293-
/* IntelliJ IDEA connecting to raw.githubusercontent.com m */
285+
/* IntelliJ IDEA connecting to raw.githubusercontent.com */
294286
(process.code_signature.subject_name : "JetBrains s.r.o." and
295-
process.code_signature.trusted == true and dns.question.name : "raw.githubusercontent.com") or
287+
process.code_signature.trusted == true and dns.question.name : ("api.github.com", "raw.githubusercontent.com")
288+
) or
296289
297290
(process.code_signature.subject_name : "Microsoft *" and process.code_signature.trusted == true and
298-
dns.question.name : ("*.sharepoint.com", "graph.microsoft.com", "g.live.com", "login.live.com", "login.live.com")) or
291+
dns.question.name : ("*.sharepoint.com", "graph.microsoft.com", "g.live.com", "login.live.com")
292+
) or
293+
294+
(process.code_signature.subject_name : "Python Software Foundation" and process.code_signature.trusted == true and
295+
dns.question.name : "files.pythonhosted.org") or
296+
297+
/* Zoom */
298+
(process.name : "Zoom.exe" and (process.code_signature.subject_name : "Zoom Video Communications, Inc." and
299+
process.code_signature.trusted == true) and dns.question.name : ("www.googleapis.com", "graph.microsoft.com")
300+
) or
299301
300-
(process.code_signature.trusted == true and
301-
process.code_signature.subject_name :
302-
("Johannes Schindelin",
302+
/* VSCode */
303+
(process.name : "Code.exe" and (process.code_signature.subject_name : "Microsoft Corporation" and
304+
process.code_signature.trusted == true) and dns.question.name : ("api.github.com", "raw.githubusercontent.com")
305+
) or
306+
307+
/* Terraform */
308+
(process.name : "terraform-provider*.exe" and (process.code_signature.subject_name : "HashiCorp, Inc." and
309+
process.code_signature.trusted == true) and dns.question.name : "graph.microsoft.com"
310+
) or
311+
312+
(
313+
process.code_signature.trusted == true and
314+
process.code_signature.subject_name : (
315+
"Johannes Schindelin",
303316
"Redis Inc.",
304317
"Slack Technologies, LLC",
305318
"Cisco Systems, Inc.",
306319
"Dropbox, Inc",
307320
"Amazon.com Services LLC",
308321
"Island Technology Inc.",
309322
"GitHub, Inc.",
310-
"Red Hat, Inc"))
323+
"Red Hat, Inc",
324+
"Mozilla Corporation"
325+
)
326+
)
311327
)
312328
'''
313329

0 commit comments

Comments
 (0)