{
  "hunt": {
    "meta": {
      "tlp": "clear",
      "hunt": {
        "handoff": "keep-as-periodic-hunt",
        "trigger": "intel-report",
        "methodology": "model-assisted",
        "applicability": "campaign-specific",
        "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."
      },
      "name": "AI Runtime Post-Exploitation and Compute Theft",
      "type": "investigation",
      "labels": [
        "hunt",
        "attack.t1190",
        "attack.t1555",
        "attack.t1496",
        "attack.t1574.006",
        "attack.t1572",
        "command and control",
        "credential access",
        "impact",
        "initial access",
        "persistence"
      ],
      "series": {
        "slug": "open-by-default-already-occupied-threat-actors-are-renting-your-compute",
        "index": 2,
        "title": "Open by Default, Already Occupied: Threat Actors are Renting your Compute",
        "total": 2
      },
      "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"
        }
      ],
      "targets": {
        "hunter": {
          "name": "Hunt agent",
          "agent": true
        },
        "analyst": {
          "name": "Tier-2 analyst",
          "role": "analyst"
        },
        "endpoint": {
          "name": "Endpoint telemetry (hb_ surfaces)",
          "category": "endpoint",
          "telemetry": [
            "endpoint"
          ]
        },
        "identity": {
          "name": "Identity / sign-in telemetry",
          "category": "identity",
          "telemetry": [
            "identity"
          ]
        }
      },
      "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.",
      "coverage": [
        {
          "stage": "path-traversal-file-access",
          "steps": [
            "ollama-file-traversal",
            "triage-ai-compromise"
          ],
          "status": "covered"
        },
        {
          "stage": "persistence-and-execution-hijack",
          "steps": [
            "ollama-file-traversal",
            "analyst-review"
          ],
          "reason": "Monitors for writes to ld.so.preload and systemd override files used for persistence.",
          "status": "covered"
        },
        {
          "stage": "resource-hijacking-llmjacking",
          "steps": [
            "premium-model-usage",
            "rare-ollama-commands",
            "triage-ai-compromise"
          ],
          "status": "covered"
        },
        {
          "stage": "unauthenticated-api-exposure",
          "reason": "Belongs to another part of the 'Open by Default, Already Occupied: Threat Actors are Renting your Compute' series.",
          "status": "out_of_scope"
        },
        {
          "stage": "callback-verification-tunnels",
          "reason": "Belongs to another part of the 'Open by Default, Already Occupied: Threat Actors are Renting your Compute' series.",
          "status": "out_of_scope"
        }
      ],
      "scenario": {
        "stages": [
          {
            "name": "Unauthenticated AI API Exposure",
            "slug": "unauthenticated-api-exposure",
            "tactic": "initial-access",
            "techniques": [
              "T1190"
            ],
            "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"
            ]
          },
          {
            "name": "Outbound Callback and Tunneling",
            "slug": "callback-verification-tunnels",
            "tactic": "command-and-control",
            "techniques": [
              "T1572"
            ],
            "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"
            ]
          },
          {
            "name": "Path Traversal Credential Access",
            "slug": "path-traversal-file-access",
            "tactic": "credential-access",
            "techniques": [
              "T1555"
            ],
            "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"
            ]
          },
          {
            "name": "Execution Hijack and Persistence",
            "slug": "persistence-and-execution-hijack",
            "tactic": "persistence",
            "techniques": [
              "T1574.006"
            ],
            "observables": [
              "file_path:/etc/ld.so.preload",
              "file_path:override.conf",
              "process_name:ollama"
            ]
          },
          {
            "name": "Resource Hijacking (LLMjacking)",
            "slug": "resource-hijacking-llmjacking",
            "tactic": "impact",
            "techniques": [
              "T1496"
            ],
            "observables": [
              "model_name:gpt-4o",
              "model_name:claude-3-opus",
              "model_name:llama3.1:8b"
            ]
          }
        ],
        "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."
      },
      "severity": "high",
      "rationale": "Start with cloud-hosted Linux workloads in development or test accounts. Widen to any server with public IP addresses and open port 11434.",
      "guardrails": {
        "claims": "no_unsupported",
        "evidence": "citation_required",
        "telemetry": "untrusted",
        "missing_data": "not_benign"
      },
      "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.",
      "parameters": {
        "scope_hosts": {
          "from": {
            "ref": "analyst-scoping",
            "kind": "manual",
            "observed": "2024-05-20"
          },
          "type": "list[host]",
          "default": [],
          "description": "List of hostnames to focus the hunt on; if empty, the hunt runs fleet-wide."
        },
        "lookback_days": {
          "from": {
            "ref": "standard-retention",
            "kind": "manual",
            "observed": "2024-05-20"
          },
          "type": "number",
          "default": "14",
          "description": "Days of history to examine."
        },
        "premium_models": {
          "from": {
            "ref": "https://www.rapid7.com/blog/post/tr-self-hosted-ai-renting-compute-exposed-servers",
            "kind": "article",
            "observed": "2026-11-18"
          },
          "type": "list[string]",
          "default": [
            "gpt-4",
            "gpt-4o",
            "claude-3-opus",
            "llama3.1:8b"
          ],
          "description": "High-value or signature model names used in compute-theft (LLMjacking) scenarios."
        },
        "sensitive_files": {
          "from": {
            "ref": "https://www.rapid7.com/blog/post/tr-self-hosted-ai-renting-compute-exposed-servers",
            "kind": "article",
            "observed": "2026-11-18"
          },
          "type": "list[path]",
          "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."
        }
      },
      "provenance": {
        "authors": [
          {
            "org": "huntbase.io",
            "name": "Huntbase hunt generation"
          }
        ],
        "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"
        }
      },
      "references": [
        {
          "url": "https://www.rapid7.com/blog/post/tr-self-hosted-ai-renting-compute-exposed-servers",
          "name": "Rapid7 \u2014 Open by Default, Already Occupied: Threat Actors are Renting your Compute"
        }
      ],
      "blind_spots": [
        {
          "id": "no-linux-audit",
          "risk": "A failed exploit attempt looks identical to a successful one without detailed syscall auditing.",
          "owner": "Endpoint Engineering",
          "stage": "path-traversal-file-access",
          "question": "whether the sensitive file was successfully read or if the traversal attempt was blocked",
          "requires": "hb_linux_audit with file-read auditing",
          "remediation": "Enable auditd or eBPF-based file-read auditing for the Ollama service account."
        },
        {
          "id": "ephemeral-compute",
          "risk": "Attackers may pull and run models in bursts between scanning intervals, which snapshots might miss.",
          "owner": "SOC Architect",
          "stage": "resource-hijacking-llmjacking",
          "question": "whether short-lived model inference processes were missed by the snapshot tool",
          "requires": "hb_process_activity with high-frequency event capture",
          "remediation": "Transition to event-driven process monitoring to capture all execution events in real-time."
        }
      ]
    },
    "name": "AI Runtime Post-Exploitation and Compute Theft",
    "description": "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."
  },
  "nodes": [
    {
      "id": "hypothesis",
      "type": "hypothesis",
      "label": "Hypothesis",
      "config": {
        "tags": [],
        "series": {
          "slug": "open-by-default-already-occupied-threat-actors-are-renting-your-compute",
          "index": 2,
          "title": "Open by Default, Already Occupied: Threat Actors are Renting your Compute",
          "total": 2
        },
        "coverage": [
          {
            "stage": "path-traversal-file-access",
            "steps": [
              "ollama-file-traversal",
              "triage-ai-compromise"
            ],
            "status": "covered"
          },
          {
            "stage": "persistence-and-execution-hijack",
            "steps": [
              "ollama-file-traversal",
              "analyst-review"
            ],
            "reason": "Monitors for writes to ld.so.preload and systemd override files used for persistence.",
            "status": "covered"
          },
          {
            "stage": "resource-hijacking-llmjacking",
            "steps": [
              "premium-model-usage",
              "rare-ollama-commands",
              "triage-ai-compromise"
            ],
            "status": "covered"
          },
          {
            "stage": "unauthenticated-api-exposure",
            "reason": "Belongs to another part of the 'Open by Default, Already Occupied: Threat Actors are Renting your Compute' series.",
            "status": "out_of_scope"
          },
          {
            "stage": "callback-verification-tunnels",
            "reason": "Belongs to another part of the 'Open by Default, Already Occupied: Threat Actors are Renting your Compute' series.",
            "status": "out_of_scope"
          }
        ],
        "rationale": "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.",
        "blind_spots": [
          {
            "id": "no-linux-audit",
            "risk": "A failed exploit attempt looks identical to a successful one without detailed syscall auditing.",
            "owner": "Endpoint Engineering",
            "stage": "path-traversal-file-access",
            "question": "whether the sensitive file was successfully read or if the traversal attempt was blocked",
            "requires": "hb_linux_audit with file-read auditing",
            "remediation": "Enable auditd or eBPF-based file-read auditing for the Ollama service account."
          },
          {
            "id": "ephemeral-compute",
            "risk": "Attackers may pull and run models in bursts between scanning intervals, which snapshots might miss.",
            "owner": "SOC Architect",
            "stage": "resource-hijacking-llmjacking",
            "question": "whether short-lived model inference processes were missed by the snapshot tool",
            "requires": "hb_process_activity with high-frequency event capture",
            "remediation": "Transition to event-driven process monitoring to capture all execution events in real-time."
          }
        ],
        "scoping_notes": "Start with cloud-hosted Linux workloads in development or test accounts. Widen to any server with public IP addresses and open port 11434.",
        "beyond_detection": "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."
      }
    },
    {
      "id": "find-ai-workloads",
      "type": "query",
      "label": "Scope AI runtime workloads",
      "config": {
        "dsl": "sqlite",
        "role": "scoping",
        "source": "endpoint",
        "content": "SELECT DISTINCT device_hostname, package_name, package_version FROM hb_software_inventory WHERE LOWER(package_name) LIKE '%ollama%'",
        "surface": "hb_software_inventory",
        "description": "Identify hosts running Ollama or similar AI software to focus the subsequent behavioral checks.",
        "expected_signal": "A list of hosts currently hosting the AI runtime. Silence suggests no managed installations, but unmanaged binaries might still exist."
      },
      "parents": [
        {
          "id": "hypothesis"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "scoping",
        "label": "Scope AI runtime workloads",
        "reads": [
          "device_hostname",
          "package_name",
          "package_version"
        ],
        "source": "hb_software_inventory",
        "target": "endpoint",
        "content": "SELECT DISTINCT device_hostname, package_name, package_version FROM hb_software_inventory WHERE LOWER(package_name) LIKE '%ollama%'",
        "silence": "not_evidence_of_absence",
        "expected": "A list of hosts currently hosting the AI runtime. Silence suggests no managed installations, but unmanaged binaries might still exist.",
        "verified": "dry-run",
        "verified_at": "2026-11-19"
      }
    },
    {
      "id": "rare-ollama-commands",
      "type": "query",
      "label": "Rare Ollama command-line markers",
      "config": {
        "dsl": "sqlite",
        "role": "baseline",
        "source": "endpoint",
        "content": "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",
        "surface": "hb_process_activity",
        "description": "Stack-count process command lines to find rare model pulls or names that act as visitor log markers.",
        "expected_signal": "Unique command lines containing tunnel domains (bore.pub, trycloudflare.com) or probe names (pwn, verify, beacon)."
      },
      "parents": [
        {
          "id": "find-ai-workloads"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "baseline",
        "label": "Rare Ollama command-line markers",
        "reads": [
          "process_cmd_line",
          "device_hostname",
          "time"
        ],
        "source": "hb_process_activity",
        "target": "endpoint",
        "content": "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",
        "silence": "not_evidence_of_absence",
        "baseline": {
          "window": "{{lookback_days}}d",
          "compare": "first_seen"
        },
        "expected": "Unique command lines containing tunnel domains (bore.pub, trycloudflare.com) or probe names (pwn, verify, beacon).",
        "verified": "dry-run",
        "prevalence": {
          "by": "device_hostname",
          "key": [
            "process_cmd_line"
          ],
          "rare_below": 3
        },
        "verified_at": "2026-11-19"
      }
    },
    {
      "id": "ollama-file-traversal",
      "type": "query",
      "label": "AI runtime sensitive file access",
      "config": {
        "dsl": "sqlite",
        "role": "detection-candidate",
        "source": "endpoint",
        "content": "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')",
        "surface": "hb_file_activity",
        "description": "Identify path-traversal payloads (CVE-2024-37032) used to read credentials or modify persistence locations.",
        "expected_signal": "The Ollama daemon touching /etc/shadow or its own Ed25519 identity key. This is a definitive sign of exploitation."
      },
      "parents": [
        {
          "id": "find-ai-workloads"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "detection-candidate",
        "label": "AI runtime sensitive file access",
        "reads": [
          "device_hostname",
          "process_name",
          "file_path",
          "activity_name",
          "time"
        ],
        "source": "hb_file_activity",
        "target": "endpoint",
        "content": "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')",
        "silence": "not_evidence_of_absence",
        "expected": "The Ollama daemon touching /etc/shadow or its own Ed25519 identity key. This is a definitive sign of exploitation.",
        "verified": "dry-run",
        "verified_at": "2026-11-19"
      }
    },
    {
      "id": "premium-model-usage",
      "type": "query",
      "label": "Anomalous premium model usage",
      "config": {
        "dsl": "sqlite",
        "role": "enrichment",
        "source": "endpoint",
        "content": "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')",
        "surface": "hb_cloud_api_activity",
        "description": "Identify LLMjacking where unauthenticated runtimes are used to consume premium cloud model credits via the local AI gateway.",
        "expected_signal": "Cloud API calls for premium models (e.g. gpt-4o, claude-3-opus) originating from AI workloads that lack a legitimate business justification."
      },
      "parents": [
        {
          "id": "find-ai-workloads"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "enrichment",
        "label": "Anomalous premium model usage",
        "reads": [
          "cloud_account_uid",
          "actor_user_name",
          "resource_name",
          "api_operation",
          "time"
        ],
        "source": "hb_cloud_api_activity",
        "target": "endpoint",
        "content": "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')",
        "silence": "not_evidence_of_absence",
        "expected": "Cloud API calls for premium models (e.g. gpt-4o, claude-3-opus) originating from AI workloads that lack a legitimate business justification.",
        "verified": "dry-run",
        "verified_at": "2026-11-19"
      }
    },
    {
      "id": "triage-ai-compromise",
      "type": "analytic",
      "label": "Analyze AI runtime compromise",
      "config": {
        "cite": "required",
        "tools": [
          "endpoint"
        ],
        "context": [
          "find-ai-workloads",
          "rare-ollama-commands",
          "ollama-file-traversal",
          "premium-model-usage"
        ],
        "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.",
        "description": "Synthesize results from process, file, and cloud layers to confirm active exploitation or compute theft.",
        "max_iterations": 6,
        "expected_signal": "A per-host verdict of malicious | suspicious | benign citing specific model names or file paths.",
        "success_criteria": "Verdicts must distinguish between legitimate developer experimentation and malicious third-party activity indicators."
      },
      "parents": [
        {
          "id": "rare-ollama-commands",
          "kind": "merge"
        },
        {
          "id": "ollama-file-traversal",
          "kind": "merge"
        },
        {
          "id": "premium-model-usage",
          "kind": "merge"
        }
      ]
    },
    {
      "id": "route-remediation",
      "type": "checkpoint",
      "label": "Route on workload verdict",
      "config": {
        "fuzzy": true,
        "judge": "hunter",
        "question": "the triage verdict is malicious for at least one host, indicating confirmed path traversal or LLMjacking",
        "condition": "the triage verdict is malicious for at least one host, indicating confirmed path traversal or LLMjacking",
        "blind_spot": "no-linux-audit",
        "confidence": "high",
        "description": "Direct the response toward containment if the agent confirms malicious indicators.",
        "checkpoint_type": "mandatory"
      },
      "parents": [
        {
          "id": "triage-ai-compromise"
        }
      ]
    },
    {
      "id": "isolate-workload",
      "type": "action",
      "label": "Isolate compromised AI workload",
      "config": {
        "target": "endpoint",
        "description": "Halt data exfiltration and compute theft by severing the host's network connectivity.",
        "instructions": "Isolate the host and terminate the Ollama process immediately. Collect the .ollama directory and systemd unit logs for forensic review.",
        "action_approval": "required"
      },
      "parents": [
        {
          "id": "route-remediation",
          "branch": "on_supports"
        }
      ]
    },
    {
      "id": "revoke-and-rotate",
      "type": "action",
      "label": "Revoke and rotate credentials",
      "config": {
        "target": "identity",
        "description": "Invalidate potentially stolen credentials to prevent further access.",
        "instructions": "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.",
        "action_approval": "required"
      },
      "parents": [
        {
          "id": "isolate-workload"
        }
      ]
    },
    {
      "id": "analyst-review",
      "type": "task",
      "label": "Analyst forensic review",
      "config": {
        "assignee": "analyst",
        "description": "Conduct a manual review of the evidence to determine the depth of the breach.",
        "instructions": "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."
      },
      "parents": [
        {
          "id": "route-remediation",
          "branch": "default"
        },
        {
          "id": "route-remediation",
          "branch": "on_unavailable"
        },
        {
          "id": "revoke-and-rotate"
        }
      ]
    },
    {
      "id": "harden-runtimes",
      "type": "task",
      "label": "Harden AI runtimes",
      "config": {
        "assignee": "analyst",
        "description": "Finalize the hunt by ensuring residual AI workloads are secured.",
        "instructions": "Ensure remaining Ollama instances are bound to localhost (OLLAMA_HOST=127.0.0.1) and implement egress controls to approved registries only."
      },
      "parents": [
        {
          "id": "route-remediation",
          "branch": "on_refutes"
        },
        {
          "id": "analyst-review"
        }
      ]
    }
  ]
}