Initial Access (TA0001)(external, opens in a new tab or window)
text code block:network where event.action == "connection_accepted" and process.name in ("ollama", "ollama.exe") and destination.port == 11434 and source.ip != null and source.ip != "0.0.0.0" and not cidrmatch(source.ip, "10.0.0.0/8", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.168.0.0/16", "100.64.0.0/10", "::1", "fe80::/10", "fc00::/7", "ff00::/8" )
Install detection rules in Elastic Security
Detect Ollama API Accessed from External Network in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).