Skip to content

Commit fa9a2df

Browse files
Samirboustradebot-elastic
authored andcommitted
[New] Connection to Common Large Language Model Endpoints (#5044)
* [New] Connection to Common Large Language Model Endpoints * [New] Connection to Common Large Language Model Endpoints * Update rules/windows/command_and_control_common_llm_endpoint.toml Co-authored-by: Jonhnathan <[email protected]> * Update command_and_control_common_llm_endpoint.toml * Update rules/windows/command_and_control_common_llm_endpoint.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/command_and_control_common_llm_endpoint.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/command_and_control_common_llm_endpoint.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/command_and_control_common_llm_endpoint.toml Co-authored-by: Jonhnathan <[email protected]> * Update rules/windows/command_and_control_common_llm_endpoint.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> Co-authored-by: shashank-elastic <[email protected]> (cherry picked from commit 4079436)
1 parent d27bf1c commit fa9a2df

File tree

1 file changed

+155
-0
lines changed

1 file changed

+155
-0
lines changed
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
[metadata]
2+
creation_date = "2025/09/01"
3+
integration = ["endpoint", "windows", "sentinel_one_cloud_funnel"]
4+
maturity = "production"
5+
updated_date = "2025/09/01"
6+
7+
8+
[rule]
9+
author = ["Elastic"]
10+
description = """
11+
Identifies DNS queries to known Large Language Model domains by unsigned binaries or common Windows scripting utilities.
12+
Malwares may leverage the capabilities of LLM to perform actions in the affected system in a dynamic way.
13+
"""
14+
from = "now-9m"
15+
index = [
16+
"endgame-*",
17+
"logs-endpoint.events.network-*",
18+
"logs-sentinel_one_cloud_funnel.*",
19+
"logs-windows.sysmon_operational-*",
20+
"winlogbeat-*"
21+
]
22+
language = "eql"
23+
license = "Elastic License v2"
24+
name = "Connection to Common Large Language Model Endpoints"
25+
note = """## Triage and analysis
26+
27+
### Investigating Connection to Common Large Language Model Endpoints
28+
29+
#### Possible investigation steps
30+
31+
- Investigate the process execution chain (parent process tree) for unknown processes or malicious scripts.
32+
- Verify if the executed process is persistent on the host like common mechanisms Startup folder, task or Run key.
33+
- Review any unusual network, files or registry events by the same process.
34+
- Investigate other alerts associated with the user/host during the past 48 hours.
35+
- Extract this communication's indicators of compromise (IoCs) and use traffic logs to search for other potentially compromised hosts.
36+
37+
### False positive analysis
38+
39+
- Trusted applications from an expected process running in the environment.
40+
41+
### Response and remediation
42+
43+
- Initiate the incident response process based on the outcome of the triage.
44+
- Isolate the involved host to prevent further post-compromise behavior.
45+
- Immediately block the identified indicators of compromise (IoCs).
46+
- Implement any temporary network rules, procedures, and segmentation required to contain the attack.
47+
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
48+
- Update firewall rules to be more restrictive.
49+
- Reimage the host operating system or restore the compromised files to clean versions.
50+
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
51+
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
52+
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
53+
"""
54+
references = ["https://malpedia.caad.fkie.fraunhofer.de/details/py.lamehug"]
55+
risk_score = 47
56+
rule_id = "4ae94fc1-f08f-419f-b692-053d28219380"
57+
severity = "medium"
58+
tags = [
59+
"Domain: Endpoint",
60+
"OS: Windows",
61+
"Use Case: Threat Detection",
62+
"Tactic: Command and Control",
63+
"Resources: Investigation Guide",
64+
"Data Source: Elastic Endgame",
65+
"Data Source: Elastic Defend",
66+
"Data Source: SentinelOne",
67+
"Data Source: Sysmon",
68+
]
69+
timestamp_override = "event.ingested"
70+
type = "eql"
71+
72+
query = '''
73+
network where host.os.type == "windows" and dns.question.name != null and
74+
(
75+
process.name : ("MSBuild.exe", "mshta.exe", "wscript.exe", "powershell.exe", "pwsh.exe", "msiexec.exe", "rundll32.exe",
76+
"bitsadmin.exe", "InstallUtil.exe", "RegAsm.exe", "vbc.exe", "RegSvcs.exe", "python.exe", "regsvr32.exe", "dllhost.exe",
77+
"node.exe", "javaw.exe", "java.exe", "*.pif", "*.com") or
78+
79+
?process.code_signature.subject_name : ("AutoIt Consulting Ltd", "OpenJS Foundation", "Python Software Foundation") or
80+
81+
(process.executable : ("?:\\Users\\*.exe", "", "?:\\ProgramData\\*.exe") and ?process.code_signature.trusted != true)
82+
) and
83+
dns.question.name : (
84+
// Major LLM APIs
85+
"api.openai.com",
86+
"*.openai.azure.com",
87+
"api.anthropic.com",
88+
"api.mistral.ai",
89+
"api.cohere.ai",
90+
"api.ai21.com",
91+
"api.groq.com",
92+
"api.perplexity.ai",
93+
"api.x.ai",
94+
"api.deepseek.com",
95+
"api.gemini.google.com",
96+
"generativelanguage.googleapis.com",
97+
"api.azure.com",
98+
"api.bedrock.aws",
99+
"bedrock-runtime.amazonaws.com",
100+
101+
// Hugging Face & other ML infra
102+
"api-inference.huggingface.co",
103+
"inference-endpoint.huggingface.cloud",
104+
"*.hf.space",
105+
"*.replicate.com",
106+
"api.replicate.com",
107+
"api.runpod.ai",
108+
"*.runpod.io",
109+
"api.modal.com",
110+
"*.forefront.ai",
111+
112+
// Consumer-facing AI chat portals
113+
"chat.openai.com",
114+
"chatgpt.com",
115+
"copilot.microsoft.com",
116+
"bard.google.com",
117+
"gemini.google.com",
118+
"claude.ai",
119+
"perplexity.ai",
120+
"poe.com",
121+
"chat.forefront.ai",
122+
"chat.deepseek.com"
123+
) and
124+
125+
not process.executable : (
126+
"?:\\Program Files\\*.exe",
127+
"?:\\Program Files (x86)\\*.exe",
128+
"?:\\Windows\\System32\\svchost.exe",
129+
"?:\\Windows\\SystemApps\\Microsoft.LockApp_*\\LockApp.exe",
130+
"?:\\Users\\*\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
131+
"?:\\Users\\*\\AppData\\Local\\BraveSoftware\\*\\Application\\brave.exe",
132+
"?:\\Users\\*\\AppData\\Local\\Vivaldi\\Application\\vivaldi.exe",
133+
"?:\\Users\\*\\AppData\\Local\\Programs\\Opera*\\opera.exe",
134+
"?:\\Users\\*\\AppData\\Local\\Programs\\Fiddler\\Fiddler.exe"
135+
) and
136+
not (?process.code_signature.trusted == true and
137+
?process.code_signature.subject_name : ("Anthropic, PBC", "Google LLC", "Mozilla Corporation", "Brave Software, Inc.", "Island Technology Inc.", "Opera Norway AS"))
138+
'''
139+
140+
141+
[[rule.threat]]
142+
framework = "MITRE ATT&CK"
143+
[[rule.threat.technique]]
144+
id = "T1102"
145+
name = "Web Service"
146+
reference = "https://attack.mitre.org/techniques/T1102/"
147+
148+
149+
150+
[rule.threat.tactic]
151+
id = "TA0011"
152+
name = "Command and Control"
153+
reference = "https://attack.mitre.org/tactics/TA0011/"
154+
155+

0 commit comments

Comments
 (0)