VertexElite/miasma-detection

GitHub: VertexElite/miasma-detection

针对 Miasma/Shai-Hulud AI 供应链蠕虫的检测工具包,提供 Phantom Gyp 扫描、AI 代理 Hook 检测、Sigma 规则及完整的 IOC 表。

Stars: 0 | Forks: 0

# 🛡️ miasma-detection **Miasma/Shai-Hulud AI 供应链蠕虫活动的检测工具包(2026 年 6 月)** [![TLP:CLEAR](https://img.shields.io/badge/TLP-CLEAR-white?style=flat-square)](https://www.cisa.gov/tlp) [![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE) [![VertexElite](https://img.shields.io/badge/VertexElite-Security%20Research-red?style=flat-square)](https://vertexelite.org) [![Sigma](https://img.shields.io/badge/Sigma-3%20Rules-orange?style=flat-square)](sigma/) ## 什么是 Miasma? Miasma/Shai-Hulud 是一种自我传播的供应链蠕虫,于 2026 年 6 月 1 日至 13 日期间对 npm 和 PyPI 生态系统发动了三轮攻击,将 AI 编码代理平台(Claude Code、Gemini CLI、Cursor、VS Code)同时作为传播和持久化机制。 **32 个 RedHat npm 包。57 个 Phantom Gyp 包。286 个恶意版本。Azure。Microsoft。PyPI。** ## 攻击面阶梯(原始分析) 本仓库记录了一个五层级的演进过程,其中**每一波攻击都明确地针对前一波攻击所部署的防御进行了针对性规避**。此框架尚未在其他地方发布。 | 级别 | 向量 | 触发条件 | 状态 | |-------|--------|---------|--------| | 1 | Preinstall hook (`npm scripts`) | `npm install` | 已观测 — 第一波 6月 1日 | | 2 | **Phantom Gyp** (`binding.gyp` command substitution) | `node-gyp rebuild` | 已观测 — 第二波 6月 3日 | | 3 | AI agent SessionStart hook (`.claude/`, `.gemini/`) | Agent session start | 已观测 — 第三波 6月 3–5日 | | 4 | MCP data poisoning (AgentJacking via Sentry) | MCP tool call | 2026年 6月 12日披露 | | 5 | **No-tool-call file injection** (`CLAUDE.md`, `GEMINI.md`) | Agent reads file | 架构性 — 尚未观测 | ## 关键原创发现:Phantom Gyp 零误报规则 对于既不构建任何内容也没有源文件的原生 addon 配置,不存在任何合法的用例。仅此单一规则即可捕获第二波攻击,且**零误报**。 恶意的 `binding.gyp`: ``` { "targets": [{ "target_name": "Setup", "type": "none", "sources": [" /dev/null 2>&1 && echo stub.c)"] }] } ``` `/dev/null; ls /usr/local/bin/bun 2>/dev/null` - [ ] 审计所有近期打开的 repo 中的 `.claude/settings.json`、`.gemini/settings.json`、`.vscode/tasks.json`、`.cursor/rules/` - [ ] 检查所有项目根目录中的 `CLAUDE.md` 和 `GEMINI.md` - [ ] 扫描 GitHub 账号,查找具有 dead-drop 命名模式的新建 repo **调查(24 小时内):** - [ ] 提取构建时间窗口内的网络出站日志 — 查找指向 Bun CDN 的 curl 流量,以及来自 node-gyp 子进程的 GitHub API 调用 - [ ] `find ~/.npm/_cacache -name "*.tgz" | xargs -I{} tar tzf {} 2>/dev/null | grep binding.gyp` - [ ] 检查 git log 中符合以下模式的提交:`chore: update dependencies [skip ci]` 且没有实际更改 - [ ] 审计 CI/CD pipeline 日志,查看不应包含原生 addon 的包中是否出现 node-gyp ## 关键 IOC | 指标 | 类型 | 置信度 | |-----------|------|------------| | ` /dev/null 2>&1 && echo stub.c)` | 代码模式 | Critical | | `api.anthropic.com/v1/api` (任何流量) | 网络 C2 | Critical | | `/tmp/b-/` 或 `/usr/local/bin/bun` | 文件系统 | High | | `DontRevokeOrItGoesBoom` | C2 字符串 | High | | `TheBeautifulSandsOfTime` | C2 字符串 | High | | `firedalazer` | C2 字符串 (Hades/PyPI) | High | | `Miasma: The Spreading Blight` | GitHub repo 描述 | High | | `liuende501` / `windy629` / `HerGomUli` | GitHub dead-drop 账号 | High | | `91.92.240.0/22` | IP 段 (Omegatech/ClawHavoc) | High | | `158.94.208.0/22` | IP 段 (Omegatech/ClawHavoc) | High | | `178.16.52.0/22` | IP 段 (Omegatech/ClawHavoc) | High | 完整 IOC 表格:[iocs/iocs.csv](iocs/iocs.csv) ## 基础设施背景 ClawHavoc/OpenClaw 活动 C2 (`91.92.242.30`) 于 2026 年 1 月至 5 月期间从 AS209800 (metaspinner) 迁移到了 **AS202412 (Omegatech LTD)**,同时保留了所有 IP 分配。Omegatech 和 TeamPCP 的 GHOSTYNETWORKS (AS205759) 在 **aurologic GmbH (AS30823)** bulletproof hosting 生态系统中共享一个共同的上游。 截至 2026 年 4 月 12 日,该基础设施仍在积极重新配置中(全新的 NexusVPN SSL 证书)。一个月后,Miasma 第一波攻击启动。 ## 相关提交 - ClawHavoc/OpenClaw 基础设施报告 — 于 2026 年 5 月 2 日提交给 Anthropic Trust & Safety - 完整检测指南 (PDF/DOCX) — 可通过 [vertexelite.org](https://vertexelite.org) 应要求获取 ## 许可证 MIT — 可自由使用,请注明出处。 ## 作者 **Nirmal Liyon** 创始人,VertexElite Security Research [vertexelite.org](https://vertexelite.org) · 斯里兰卡拉特纳普勒 *如果这对您有帮助,请给 repo 加星。如果您在该活动中发现了新内容,请提交 issue。*
标签:AMSI绕过, Cutter, DAST, 云计算, 威胁检测, 恶意软件分析, 文档安全, 规则引擎