Xpersona
L

litellm attack detector

CLAWHUB · Unverified

Detect the LiteLLM supply chain attack (v1.82.7/1.82.8). Scans for compromised packages, malicious .pth files, backdoor persistence, suspicious network conne... Skill: litellm attack detector Owner: tjefferson Summary: Detect the LiteLLM supply chain attack (v1.82.7/1.82.8). Scans for compromised packages, malicious .pth files, backdoor persistence, suspicious network conne... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-03-25T05:34:33.400Z | user Initial release: Detects compromise from the LiteLLM supply chain attack (v1.82.7/1.82.8) in a safe, read-only manner. - Sca

62
Rank
84
Safety
991
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 991 downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s170z4mt16txtqsqz0ea9rph3183f336:litellm-attack-detector
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-tjefferson-litellm-attack-detector/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

7,567 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: litellm-attack-detector
description: "Detect the LiteLLM supply chain attack (v1.82.7/1.82.8). Scans for compromised packages, malicious .pth files, backdoor persistence, suspicious network connections, and Kubernetes IoCs. No dependencies, read-only, safe to run."
metadata:
  {
    "openclaw":
      {
        "emoji": "🛡️",
        "requires": { "bins": ["bash"] },
        "tags": ["security", "supply-chain", "litellm", "malware", "incident-response", "安全", "供应链攻击"],
      },
  }
---

# LiteLLM Supply Chain Attack Detector

检测 LiteLLM 供应链攻击(v1.82.7 / v1.82.8,TeamPCP)的入侵指标。纯只读脚本,不修改任何文件,不发送任何数据,安全可靠。

Detect indicators of compromise (IoCs) from the LiteLLM supply chain attack (versions 1.82.7 / 1.82.8). Read-only script — no files modified, no data exfiltrated.

**Reference**: https://github.com/BerriAI/litellm/issues/24512

**Original script**: https://gist.github.com/sorrycc/30a765b9a82d0d8958e756b251828a19#file-check-litellm-sh (by [@sorrycc](https://github.com/sorrycc), adapted with bug fix: `set -euo pipefail` → `set -u`)

## Overview

2026 年 3 月,LiteLLM PyPI 包的 1.82.7 和 1.82.8 版本被植入恶意代码(供应链攻击)。攻击者通过 `.pth` 文件持久化后门,窃取环境变量中的凭据,并在 Kubernetes 环境中部署特权 Pod。

本 skill 提供一键检测脚本,覆盖 7 个检测维度:

| # | 检测项 | 说明 |
|---|--------|------|
| 1 | 版本检测 | 检查 pip/pip3/uv 中是否安装了受影响版本 |
| 2 | .pth 文件扫描 | 搜索 site-packages 和缓存目录中的恶意 `litellm_init.pth` |
| 3 | 后门持久化 | 检查 `~/.config/sysmon/`、`sysmon.service`、`/tmp/.pg_state` 等已知后门路径 |
| 4 | 网络连接 | 检查是否有到 `litellm.cloud` / `checkmarx.zone` 的活跃连接 |
| 5 | DNS 解析 | 确认恶意域名的 DNS 可达性 |
| 6 | Kubernetes | 检查 kube-system 中的可疑 Pod 和特权容器 |
| 7 | 依赖链 | 检查哪些包间接依赖了 litellm |

## When to Use

当用户的请求涉及以下场景时触发此技能:

- 检测 LiteLLM 供应链攻击:"检查一下有没有中招"
- 安全扫描:"扫描一下 litellm 是否被篡改"
- 事件响应:"litellm 后门检测"
- 关键词触发:"litellm attack"、"litellm 1.82.7"、"litellm 1.82.8"、"TeamPCP"、"supply chain"、"供应链攻击"

## How to Use

### 运行检测脚本

```bash
bash {{SKILL_DIR}}/scripts/detect.sh
```

脚本无需任何参数,无需 root 权限,自动检测当前环境。

### 输出说明

脚本使用彩色输出标识检测结果:

- 🟢 `[+]` 绿色 — 该项安全
- 🔴 `[!]` 红色 — 发现入侵指标(IoC)
- 🟡 `[*]` 黄色 — 信息提示

### 输出示例(安全环境)

```
============================================
 LiteLLM Supply Chain Attack Detector
 Target: litellm 1.82.7 / 1.82.8 (TeamPCP)
============================================

[*] Checking installed litellm version...
[+] litellm not installed via pip
[*] Searching for litellm_init.pth in Python site-packages...
[+] No litellm_init.pth found
[*] Checking for persistence artifacts...
[+] No persistence artifacts found
[*] Checking for suspicious network connections...
[+] No suspicious connections to known C2 domains
[*] Checking DNS resolution...
[*] Checking Kubernetes environment...
[*] kubectl not found, skipping Kubernetes checks
[*] Checking if litellm is a transitive dependency...

============================================
 CLEAN — No indicators of compromise found.
============================================
```

### 输出示例(受感染环境)

```
============================================
 ALERT — Indicators of compromise dete

_meta.json

{
  "ownerId": "kn72jm08z8zg612dswg2c11sbs80w1w8",
  "slug": "litellm-attack-detector",
  "version": "1.0.0",
  "publishedAt": 1774416873400
}

skill-card.md

## Description:

Detects the LiteLLM supply chain attack (v1.82.7/1.82.8) by scanning for compromised packages, malicious .pth files, backdoor persistence, suspicious network connections, and Kubernetes IoCs in a read-only, dependency-free workflow.

This skill is ready for commercial/non-commercial use.

## Publisher:

[tjefferson](https://clawhub.ai/user/tjefferson)

### License/Terms of Use:

MIT-0

## Use Case:

Developers, security teams, and incident responders use this skill to run a read-only LiteLLM compromise detector for known supply-chain attack indicators in local Python, network, and Kubernetes environments.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The detector may issue DNS queries for known indicator domains during execution.

Mitigation: Run it knowingly in sensitive or air-gapped environments, and account for those DNS lookups in monitoring or change records.

Risk: When kubectl is available, the detector may use the current Kubernetes context for read-only cluster checks.

Mitigation: Confirm the active kubectl context before running, or run without kubectl access if cluster inspection is not intended.

Risk: The tool is scoped to known LiteLLM 1.82.7 and 1.82.8 compromise indicators and may not detect unrelated threats.

Mitigation: Use results as one incident-response signal and continue normal host, credential, cloud, and Kubernetes review when compromise is suspected.

## Reference(s):

- [LiteLLM issue 24512](https://github.com/BerriAI/litellm/issues/24512)
- [Original check-litellm script](https://gist.github.com/sorrycc/30a765b9a82d0d8958e756b251828a19#file-check-litellm-sh)

## Skill Output:

**Output Type(s):** [Shell commands, Analysis, Guidance]

**Output Format:** [Markdown guidance with bash command and terminal output]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Read-only detector output uses color-coded status markers and exit code 0 or 1.]

## Skill Version(s):

1.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to litellm attack detector and adjacent AI workflows.