---
analysis: While a rule might alert on access to /etc/shadow, this hunt provides the
  specific context of the AI runtime process, correlates it with the 'visitors' log'
  found in rare command arguments, and assesses cloud financial impact which standard
  rules cannot see.
blind_spots:
- id: no-linux-audit
  owner: Endpoint Engineering
  question: whether the sensitive file was successfully read or if the traversal attempt
    was blocked
  remediation: Enable auditd or eBPF-based file-read auditing for the Ollama service
    account.
  requires: hb_linux_audit with file-read auditing
  risk: A failed exploit attempt looks identical to a successful one without detailed
    syscall auditing.
  stage: path-traversal-file-access
- id: ephemeral-compute
  owner: SOC Architect
  question: whether short-lived model inference processes were missed by the snapshot
    tool
  remediation: Transition to event-driven process monitoring to capture all execution
    events in real-time.
  requires: hb_process_activity with high-frequency event capture
  risk: Attackers may pull and run models in bursts between scanning intervals, which
    snapshots might miss.
  stage: resource-hijacking-llmjacking
coverage:
- stage: path-traversal-file-access
  status: covered
  steps:
  - ollama-file-traversal
  - triage-ai-compromise
- reason: Monitors for writes to ld.so.preload and systemd override files used for
    persistence.
  stage: persistence-and-execution-hijack
  status: covered
  steps:
  - ollama-file-traversal
  - analyst-review
- stage: resource-hijacking-llmjacking
  status: covered
  steps:
  - premium-model-usage
  - rare-ollama-commands
  - triage-ai-compromise
- reason: 'Belongs to another part of the ''Open by Default, Already Occupied: Threat
    Actors are Renting your Compute'' series.'
  stage: unauthenticated-api-exposure
  status: out_of_scope
- reason: 'Belongs to another part of the ''Open by Default, Already Occupied: Threat
    Actors are Renting your Compute'' series.'
  stage: callback-verification-tunnels
  status: out_of_scope
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: keep-as-periodic-hunt
  justification: Exposed AI runtimes provide a direct path to both compute resource
    exhaustion (LLMjacking) and system credential theft. A negative result confirms
    that these unmanaged workloads are not being used as open gateways for third-party
    compute or data exfiltration.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An intruder has exploited an unauthenticated AI runtime to access system
  credentials via path traversal or hijacked cloud model subscriptions, evidenced
  by sensitive file access and unauthorized cloud API calls for premium models.
labels:
- hunt
- attack.t1190
- attack.t1555
- attack.t1496
- attack.t1574.006
- attack.t1572
- command and control
- credential access
- impact
- initial access
- persistence
name: AI Runtime Post-Exploitation and Compute Theft
parameters:
  lookback_days:
    default: '14'
    description: Days of history to examine.
    from:
      kind: manual
      observed: '2024-05-20'
      ref: standard-retention
    type: number
  premium_models:
    default:
    - gpt-4
    - gpt-4o
    - claude-3-opus
    - llama3.1:8b
    description: High-value or signature model names used in compute-theft (LLMjacking)
      scenarios.
    from:
      kind: article
      observed: '2026-11-18'
      ref: https://www.rapid7.com/blog/post/tr-self-hosted-ai-renting-compute-exposed-servers
    type: list[string]
  scope_hosts:
    default: []
    description: List of hostnames to focus the hunt on; if empty, the hunt runs fleet-wide.
    from:
      kind: manual
      observed: '2024-05-20'
      ref: analyst-scoping
    type: list[host]
  sensitive_files:
    default:
    - /etc/shadow
    - /etc/passwd
    - /proc/self/environ
    - /etc/ld.so.preload
    - /.ssh/authorized_keys
    - /.ollama/id_ed25519
    description: Sensitive Linux files and Ollama keys often targeted for exfiltration
      or persistence.
    from:
      kind: article
      observed: '2026-11-18'
      ref: https://www.rapid7.com/blog/post/tr-self-hosted-ai-renting-compute-exposed-servers
    type: list[path]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://www.rapid7.com/blog/post/tr-self-hosted-ai-renting-compute-exposed-servers
    gates:
    - dry-run
    - lint
    - critic
    model: hb_google/gemini-3-flash-preview
rationale: Start with cloud-hosted Linux workloads in development or test accounts.
  Widen to any server with public IP addresses and open port 11434.
references:
- name: "Rapid7 \u2014 Open by Default, Already Occupied: Threat Actors are Renting\
    \ your Compute"
  url: https://www.rapid7.com/blog/post/tr-self-hosted-ai-renting-compute-exposed-servers
related:
- hunt: unauthenticated-api-exposure-network-scoping
  reason: This hunt focuses on post-exploitation behavior; identifying the open ports
    belongs to a network exposure hunt.
  relation: out-of-scope-alternative
- hunt: exposed-ai-runtime-probing-callbacks
  relation: follows
scenario:
  stages:
  - name: Unauthenticated AI API Exposure
    observables:
    - port:11434
    - port:8888
    - port:8501
    - port:8000
    - url_path:/api/tags
    - url_path:/api/pull
    - url_path:/api/push
    - url_path:/api/kernels
    slug: unauthenticated-api-exposure
    tactic: initial-access
    techniques:
    - T1190
  - name: Outbound Callback and Tunneling
    observables:
    - domain:bore.pub
    - domain:trycloudflare.com
    - domain:ttl.sh
    - domain:pinggy.io
    - model_name:zzvitals-beacon
    - model_name:verif_sys
    - model_name:ops-verify
    - model_name:*-copy-test
    slug: callback-verification-tunnels
    tactic: command-and-control
    techniques:
    - T1572
  - name: Path Traversal Credential Access
    observables:
    - file_path:/etc/shadow
    - file_path:/etc/passwd
    - file_path:/proc/self/environ
    - file_path:~/.ssh/authorized_keys
    - file_path:~/.ollama/id_ed25519
    - CVE-2024-37032
    slug: path-traversal-file-access
    tactic: credential-access
    techniques:
    - T1555
  - name: Execution Hijack and Persistence
    observables:
    - file_path:/etc/ld.so.preload
    - file_path:override.conf
    - process_name:ollama
    slug: persistence-and-execution-hijack
    tactic: persistence
    techniques:
    - T1574.006
  - name: Resource Hijacking (LLMjacking)
    observables:
    - model_name:gpt-4o
    - model_name:claude-3-opus
    - model_name:llama3.1:8b
    slug: resource-hijacking-llmjacking
    tactic: impact
    techniques:
    - T1496
  summary: Threat actors are targeting unauthenticated Ollama AI servers to hijack
    compute resources and linked cloud model subscriptions (LLMjacking). Beyond resource
    theft, attackers use path traversal vulnerabilities (CVE-2024-37032) to read sensitive
    host files like /etc/shadow and establish persistence via system configuration
    hijacking.
series:
  index: 2
  slug: open-by-default-already-occupied-threat-actors-are-renting-your-compute
  title: 'Open by Default, Already Occupied: Threat Actors are Renting your Compute'
  total: 2
severity: high
targets:
  analyst:
    name: Tier-2 analyst
    role: analyst
  endpoint:
    category: endpoint
    name: Endpoint telemetry (hb_ surfaces)
    telemetry:
    - endpoint
  hunter:
    agent: true
    name: Hunt agent
  identity:
    category: identity
    name: Identity / sign-in telemetry
    telemetry:
    - identity
tlp: clear
type: investigation
---


# AI Runtime Post-Exploitation and Compute Theft

This hunt targets the post-exploitation phase of unauthenticated AI runtimes, specifically Ollama. It identifies attempts to read sensitive system files (CVE-2024-37032), such as shadow files or SSH keys, and detects the unauthorized usage of premium cloud models through hijacked AI gateway configurations. The hunt uses a funnel approach, scoping the estate for AI software before fanning out to detect rare command-line indicators, sensitive file access, and anomalous cloud API calls associated with high-value models. An agent then evaluates the combined evidence per host to differentiate between legitimate developer experimentation and malicious third-party activity.

## find-ai-workloads
<!-- Scope AI runtime workloads -->
Identify hosts running Ollama or similar AI software to focus the subsequent behavioral checks.

```sqlite target=endpoint role=scoping
~~~yaml
expected: A list of hosts currently hosting the AI runtime. Silence suggests no managed
  installations, but unmanaged binaries might still exist.
reads:
- device_hostname
- package_name
- package_version
silence: not_evidence_of_absence
source: hb_software_inventory
verified: dry-run
verified_at: '2026-11-19'
~~~
SELECT DISTINCT device_hostname, package_name, package_version FROM hb_software_inventory WHERE LOWER(package_name) LIKE '%ollama%'
```

## parallel-investigation
<!-- Investigate activity side-by-side -->
parallel:
- → rare-ollama-commands
- → ollama-file-traversal
- → premium-model-usage
join: → triage-ai-compromise

## rare-ollama-commands
<!-- Rare Ollama command-line markers -->
Stack-count process command lines to find rare model pulls or names that act as visitor log markers.

```sqlite target=endpoint role=baseline params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: Unique command lines containing tunnel domains (bore.pub, trycloudflare.com)
  or probe names (pwn, verify, beacon).
prevalence:
  by: device_hostname
  key:
  - process_cmd_line
  rare_below: 3
reads:
- process_cmd_line
- device_hostname
- time
silence: not_evidence_of_absence
source: hb_process_activity
verified: dry-run
verified_at: '2026-11-19'
~~~
SELECT LOWER(process_cmd_line) AS cmd, COUNT(DISTINCT device_hostname) AS hosts, COUNT(*) AS execs, MIN(time) AS first_seen FROM hb_process_activity WHERE (LOWER(process_name) LIKE '%ollama%' OR LOWER(process_cmd_line) LIKE '%ollama%') AND time >= datetime('now', '-{{lookback_days}} days') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) GROUP BY cmd HAVING hosts <= 3 ORDER BY hosts, execs
```

## ollama-file-traversal
<!-- AI runtime sensitive file access -->
Identify path-traversal payloads (CVE-2024-37032) used to read credentials or modify persistence locations.

```sqlite target=endpoint role=detection-candidate params=(sensitive_files=sensitive_files, scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
expected: The Ollama daemon touching /etc/shadow or its own Ed25519 identity key.
  This is a definitive sign of exploitation.
reads:
- device_hostname
- process_name
- file_path
- activity_name
- time
silence: not_evidence_of_absence
source: hb_file_activity
verified: dry-run
verified_at: '2026-11-19'
~~~
SELECT device_hostname, process_name, file_path, activity_name, time FROM hb_file_activity WHERE LOWER(process_name) LIKE '%ollama%' AND (instr(',' || '{{sensitive_files}}' || ',', ',' || LOWER(file_path) || ',') > 0 OR LOWER(file_path) LIKE '%/override.conf') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## premium-model-usage
<!-- Anomalous premium model usage -->
Identify LLMjacking where unauthenticated runtimes are used to consume premium cloud model credits via the local AI gateway.

```sqlite target=endpoint role=enrichment params=(premium_models=premium_models, lookback_days=lookback_days)
~~~yaml
expected: Cloud API calls for premium models (e.g. gpt-4o, claude-3-opus) originating
  from AI workloads that lack a legitimate business justification.
reads:
- cloud_account_uid
- actor_user_name
- resource_name
- api_operation
- time
silence: not_evidence_of_absence
source: hb_cloud_api_activity
verified: dry-run
verified_at: '2026-11-19'
~~~
SELECT cloud_account_uid, actor_user_name, resource_name, api_operation, time FROM hb_cloud_api_activity WHERE instr(',' || '{{premium_models}}' || ',', ',' || LOWER(resource_name) || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days')
```

## triage-ai-compromise
<!-- Analyze AI runtime compromise -->
```agent target=hunter
cite: required
context:
- find-ai-workloads
- rare-ollama-commands
- ollama-file-traversal
- premium-model-usage
max_iterations: 6
objective: Determine if the identified AI workloads have been compromised by path-traversal
  payloads or are being used for unauthorized cloud model inference by third parties.
success_criteria: Verdicts must distinguish between legitimate developer experimentation
  and malicious third-party activity indicators.
tools:
- endpoint
```

## route-remediation
<!-- Route on workload verdict -->
if~: "the triage verdict is malicious for at least one host, indicating confirmed path traversal or LLMjacking" (confidence: high, judge=hunter)
then: → isolate-workload
indeterminate: → analyst-review
unavailable: → analyst-review (blind_spot: no-linux-audit)
else: → harden-runtimes

## isolate-workload
<!-- Isolate compromised AI workload -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the host and terminate the Ollama process immediately. Collect the .ollama directory and systemd unit logs for forensic review.
```
→ revoke-and-rotate

## revoke-and-rotate
<!-- Revoke and rotate credentials -->
```action target=identity
~~~yaml
approval: required
~~~
Revoke the Ollama Ed25519 identity key on ollama.com. Rotate any cloud access keys (AWS/OCI) discovered in the host's environment or config files.
```
→ analyst-review

## analyst-review
<!-- Analyst forensic review -->
```manual target=analyst
Review the cited rows and forensics data. Check SSH authorized_keys for unauthorized entries and examine the /etc/ld.so.preload file for persistence markers.
```
→ harden-runtimes

## harden-runtimes
<!-- Harden AI runtimes -->
```manual target=analyst
Ensure remaining Ollama instances are bound to localhost (OLLAMA_HOST=127.0.0.1) and implement egress controls to approved registries only.
```
→ end
