Skip to main content

LiteLLM Hunt Query

The malicious build embeds 'cook.pth' to auto-execute the 'privcollect' credential stealer on Python startup, harvesting AI API keys (OpenAI, Anthropic), cloud tokens, and proxy configs while running a background dead-drop backdoor.

// Query 1: Hunt for Network Connections to Exfiltration Endpoint
DeviceNetworkEvents
| where RemoteUrl has "litellm.dev/healthcheck" or RemoteUrl has "letters9813"
| project
    TimeGenerated,
    DeviceId,
    DeviceName,
    InitiatingProcessFileName,
    InitiatingProcessCommandLine,
    RemoteIP,
    RemoteUrl
| order by TimeGenerated desc

// Query 2: Hunt for File Creation of cook.pth in Site-Packages
DeviceFileEvents
| where FileName =~ "cook.pth" or FileName =~ "cook.py"
| project
    TimeGenerated,
    DeviceId,
    DeviceName,
    InitiatingProcessFileName,
    FolderPath,
    FileName
| order by TimeGenerated desc
Need to defang indicators or test triage logs?
Use our zero-telemetry client-side parser to extract, defang & format indicators.
Open SOC Defanger Workbench
Target Log Sources & Tables
DeviceNetworkEventsDeviceFileEvents

Ensure telemetry connector is actively ingesting this table into your Sentinel workspace or Defender XDR.

False Positives & Tuning Guidance

Legitimate administrative software deployment scripts, authorized security testing, or system maintenance tasks.

Source Incident Analysis

LiteLLM: How to Detect & Remove cook.pth Supply Chain Backdoor

Disclosed: 2026-10-22

Read Attack Chain
DETECTION_ENGINEERING_FEEDBACK

Have tuning recommendations, encounter false positives in your environment, or want to contribute rule improvements?

Submit Feedback →