KQLHunting query: tune before alertingCloud AI abuse: Azure OpenAI, Vertex AI, self-hosted
Ollama API (port 11434) listening on all interfaces or accepting public connections
Ollama binds 127.0.0.1:11434 by default and has no built-in authentication; setting OLLAMA_HOST to 0.0.0.0 exposes it. GreyNoise recorded 91,403 attack sessions against an Ollama honeypot between October 2025 and January 2026, including SSRF through model pulls and enumeration of model endpoints. This hunt finds hosts listening on 11434 on all interfaces or accepting connections from public addresses.
- Log source
- Microsoft Defender for Endpoint: DeviceNetworkEvents
- Techniques
- AML.T0132 Misconfigured or Publicly Exposed AI Services · AML.T0040 AI Model Inference API Access · LLM10 Unbounded Consumption · AML.T0034 Cost Harvesting
- MITRE ATT&CK
- T1190Exploit Public-Facing ApplicationT1496.001Compute Hijacking
- Reviewed
- 2026-11-10
Query
DeviceNetworkEvents
| where Timestamp > ago(7d)
| where LocalPort == 11434
| where (ActionType == "InboundConnectionAccepted" and RemoteIPType == "Public")
or (ActionType == "ListeningConnectionCreated" and LocalIP in ("0.0.0.0", "::"))
| summarize Events = count(), PublicPeers = make_set_if(RemoteIP, RemoteIPType == "Public", 50),
Actions = make_set(ActionType), FirstSeen = min(Timestamp), LastSeen = max(Timestamp)
by DeviceName, InitiatingProcessFileName
| extend PublicPeerCount = array_length(PublicPeers)
| order by PublicPeerCount desc, Events desc Expected false positives
- Inference servers intentionally shared on a lab network (listening on all interfaces but firewalled)
- Internet scanners hitting a host that is published behind an authenticating reverse proxy
Sources
- Ollama FAQ (default bind 127.0.0.1:11434, OLLAMA_HOST)
- GreyNoise: Threat actors actively targeting LLMs (Jan 2026)
- Defender XDR: DeviceNetworkEvents table
- Elastic rule: Ollama API accessed from external network
Reviewed against vendor documentation, not tested in your environment. Defensive use only.