| ID | Technique | Tactic |
|---|
Detection: Ollama Abnormal Network Connectivity
Description
Detects repeated Ollama warning-level network errors, such as DNS lookup failures, TCP connection issues, or host resolution problems. These events can indicate a connectivity issue and warrant investigation, but do not by themselves establish unauthorized access or reconnaissance.
Search
1`ollama_server`
2level=WARN
3msg IN (
4 "*connection*",
5 "*dial tcp*",
6 "*failed*",
7 "*lookup*",
8 "*network*",
9 "*no such host*",
10 "*refused*",
11 "*timeout*",
12 "*unreachable*"
13)
14
15
16| eval dest=coalesce(dest, host)
17
18| bin _time span=5m
19
20| stats count as incidents
21 values(msg) as warning_messages
22 latest(_time) as last_incident
23 by _time dest
24
25
26| where incidents > 3
27
28
29| eval last_incident=strftime(last_incident, "%Y-%m-%d %H:%M:%S")
30
31
32| eval severity="medium"
33
34
35| eval attack_type="Abnormal Network Connectivity"
36
37
38| table last_incident dest incidents warning_messages severity attack_type
39
40
41| `ollama_abnormal_network_connectivity_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Ollama Server | Other | 'ollama:server' |
'server.log' |
Macros Used
| Name | Value |
|---|---|
| ollama_server | (sourcetype="ollama:server") |
| ollama_abnormal_network_connectivity_filter | search * |
ollama_abnormal_network_connectivity_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | No |
| Creates Intermediate Finding (Risk Event) | Yes |
Implementation
Ingest Ollama logs via Splunk TA-ollama add-on by configuring file monitoring inputs pointed to your Ollama server log directories (sourcetype: ollama:server), or enable HTTP Event Collector (HEC) for real-time API telemetry and prompt analytics (sourcetypes: ollama:api, ollama:prompts). CIM compatibility using the Web datamodel for standardized security detections.
Known False Positives
Legitimate remote access from authorized users or applications connecting from non-localhost addresses, temporary network infrastructure issues causing DNS resolution failures, firewall or network configuration changes resulting in connection timeouts, cloud-hosted Ollama instances receiving valid external API requests, or intermittent connectivity problems during network maintenance may trigger this detection during normal operations.
Associated Analytic Story
Intermediate Findings
| Message | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| Abnormal network activity on [$dest$] with [$incidents$] matching warnings [$warning_messages$]. Investigate DNS and network reachability. | dest | system | 20 |
References
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | app.log |
ollama:server |
| Integration | ✅ Passing | Dataset | app.log |
ollama:server |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 6