Skip to main content
UNIFIED SOC INCIDENT RESPONSE BLUEPRINT

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

Popular Python package LiteLLM 1.107.0 compromised via stolen GitHub CLI tokens, dropping cook.pth stealers and backdoors. Here is how to defend.

Detection & Hunting Detectors (1)

[T1195.002] LiteLLM Hunt QueryStandalone Rule
// 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

Verified Indicators of Compromise (8)

Indicators of Compromise (IOCs)
8 Identified
COMPROMISED WHEELlitellm-1.107.0-cp310-abi3-win_amd64.whl
COMPROMISED WHEELlitellm-1.107.0-cp310-abi3-manylinux_2_28_x86_64.whl
COMPROMISED WHEELlitellm-1.107.0-cp310-abi3-macosx_11_0_arm64.whl
DEAD-DROP REPOSITORYgithub.com/letters9813
EXFILTRATION ENDPOINTlitellm.dev/healthcheck
FILE PATHcook.pth
PAYLOAD IDENTIFIERprivcollect
SAFE RELEASE PIN1.106.2