Ollama
Quick Reference
Category: InferenceEngine |
OS: Windows, Linux, macOS |
Privileges: user |
Free: Yes |
Trust (lowest): source-cited
Ollama is an open-source runtime that packages and serves GGUF/safetensors model weights as a local OpenAI-compatible REST API on port 11434. It installs a persistent system service and pulls multi-gigabyte model files from registry.ollama.ai. An adversary or insider can deploy Ollama to run uncensored LLMs entirely air-gapped from corporate DLP controls, exfiltrate data via the local API, or use it as a covert AI-assisted reasoning layer for C2 scripting.
Details
| Field | Value |
|---|---|
| Website | https://ollama.com |
| License | MIT |
Capabilities: LocalInference, APIServer, ModelDownload, GPUAcceleration
Disk Artifacts
| Path | OS | Type | Phase | Trust | Description |
|---|---|---|---|---|---|
/usr/local/bin/ollama |
Linux | Binary | Install | lab-observed | Main Ollama binary — default install script location |
~/.ollama/bin/ollama |
Linux | Binary | Install | source-cited | User-space Ollama binary for non-root installs |
C:\Users\*\AppData\Local\Programs\Ollama\ollama.exe |
Windows | Binary | Install | source-cited | Ollama Windows installer binary |
C:\Users\*\AppData\Local\Programs\Ollama\ollama_llama_server.exe |
Windows | Binary | Install | source-cited | Underlying llama.cpp inference subprocess spawned by Ollama on Windows |
~/.ollama/logs/server.log |
Linux | Log | Use | source-cited | Server log containing model load events and API request history |
C:\Users\*\AppData\Local\Ollama\logs\server.log |
Windows | Log | Use | source-cited | Server log (Windows) |
Model Storage
~/.ollama/models/ (Linux) — Default model blob store on Linux/macOS — contains multi-GB GGUF blobs (Install) (trust: lab-observed)
| Format | Magic Bytes (hex) | Offset |
|---|---|---|
| GGUF | 47 47 55 46 |
0 |
C:\Users\*\.ollama\models\ (Windows) — Default model blob store on Windows (Install) (trust: source-cited)
| Format | Magic Bytes (hex) | Offset |
|---|---|---|
| GGUF | 47 47 55 46 |
0 |
Process Artifacts
ollama (Use) (trust: ai-generated)
Main server and CLI process
Expected parent: systemd
| CLI Pattern | Phase | Trust | Description |
|---|---|---|---|
ollama\s+serve |
Activation | source-cited | Starts the OpenAI-compatible REST API server on :11434 |
ollama\s+run\s+\S+ |
Use | source-cited | Pulls (if absent) and runs a named model interactively |
ollama\s+pull\s+\S+ |
Install | source-cited | Downloads model weights from registry.ollama.ai |
ollama_llama_server (Use) (trust: source-cited)
llama.cpp inference subprocess — spawned per-session by ollama
Expected parent: ollama
| CLI Pattern | Phase | Trust | Description |
|---|---|---|---|
ollama_llama_server.*--model\s+\S+\.gguf |
Use | source-cited | Inference subprocess loading a specific GGUF model file |
Network Artifacts
| Description | Protocol | Ports | Bind Address | Domains | Phase | Trust |
|---|---|---|---|---|---|---|
| Default local OpenAI-compatible REST API | TCP | 11434 | 127.0.0.1 |
— | Use | lab-observed |
| Model registry — Ollama pulls weight blobs from here | TCP | 443 | — |
registry.ollama.ai, ollama.com | Install | lab-observed |
Persistence Mechanisms
| OS | Type | Path | Phase | Trust | Description |
|---|---|---|---|---|---|
| Linux | Service | /etc/systemd/system/ollama.service |
Activation | source-cited | systemd unit installed by install.sh; runs as a dedicated 'ollama' system user |
| macOS | LaunchAgent | ~/Library/LaunchAgents/com.ollama.ollama.plist |
Activation | source-cited | per-user LaunchAgent for macOS persistence |
| Windows | Registry | HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Ollama |
Activation | source-cited | Auto-start Run key written by the Windows installer |
Windows Event Log
| Event ID | Provider | Log File | Phase | Trust | Description |
|---|---|---|---|---|---|
| 7045 | Service Control Manager | System.evtx | Install | ai-generated | New service 'Ollama' registered on first Windows installation |
| 4688 | Microsoft-Security-Auditing | Security.evtx | Use | ai-generated | Process creation event for ollama.exe or ollama_llama_server.exe |
Registry Artifacts
| Path | Phase | Trust | Description |
|---|---|---|---|
HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Ollama |
Activation | source-cited | Auto-start persistence key written by the Ollama Windows installer |
Detection Rules
Sigma
-
detections/sigma/ollama_network.yml(Install; trust: ai-generated) — Detects outbound connections to registry.ollama.ai indicating model pull activity -
detections/sigma/ollama_service_install.yml(Install; trust: ai-generated) — Detects Ollama service registration via Windows Event ID 7045 -
detections/sigma/llama_server_spawn.yml(Use; trust: ai-generated) — Detects ollama_llama_server child process creation
YARA
detections/yara/gguf_magic_bytes.yar(Install; trust: ai-generated) — Matches GGUF magic bytes — flags model weight files at rest or in transit
References
-
https://ollama.com/download
-
https://github.com/ollama/ollama
-
https://github.com/ollama/ollama/blob/main/docs/api.md