惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

网络安全

iPhone 上莫名其妙的请求,请教一下如何分析? GitHub 约 3,800 个仓库受影响,疑似源于恶意 VS Code 扩展 想请教下企业防勒索方案和报价的判断 《“词元”这么火,该注意点啥?》 求推荐代码审计软件/平台/插件 litellm 投毒事件自查脚本 Apifox 桌面端被投毒? LiteLLM 高危漏洞 litellm PyPI package (v1.82.7 + v1.82.8) compromised 警惕中转站中间人攻击风险 收到自己发给自己的邮件〔钓鱼邮件〕 想问下各位大佬,学习网络该从哪开始看? V2EX RustDesk 遭受大规模僵尸网络攻击 - V2EX 现在哪款网页防篡改软件好用? google 账号被添加陌生号码,怎么排查问题在哪里? 我创建了"网络安全"节点
好像遇到了 npm 投毒事件
imik · 2026-05-19 · via 网络安全

今天用 pnpm update 更新依赖后,mac 提示添加了新的启动项、背景任务,文件是个 cat.py 文件,让 codex 分析了代码内容,发现是远程执行代码,流程:

1. 静默安装依赖:requests 、cryptography ,失败也尽量隐藏。
2. 每小时访问 GitHub Commit Search API: https://api.github.com/search/commits 。
3. 搜索最新包含 firedalazer 的 commit 。
4. 从 commit message 里解析:
firedalazer <base64-url>.<base64-signature>
5. 用脚本内置 RSA 公钥验证签名。也就是说,只有持有对应私钥的人能下发“合法命令”。
6. 解码出 URL ,下载该 URL 返回的 Python 代码。
7. 写入临时 .py 文件并执行:
subprocess.run(["python3", temp_path], ...)
8. 把已执行 URL 的 hash 记录到:
/var/tmp/.gh_update_state

搜索到类似的一个攻击是 vscode 扩展 nx console 的投毒: https://www.stepsecurity.io/blog/nx-console-vs-code-extension-compromised

但我这是 npm ,告诉 codex 是执行 pnpm 操作后发生的,它查了相关日志,最终锁定是一个叫做 @antv/setup 的包有问题:

你的项目 package.json
└── @antv/g6 ^4.8.24
    └── @antv/g6 4.8.25
        └── @antv/g6-pc 0.8.25
            ├── @antv/dom-util 2.2.4
            │   └── optionalDependencies: @antv/setup
            ├── @antv/matrix-util 3.2.4
            │   └── optionalDependencies: @antv/setup
            └── @antv/layout / @antv/util 分支
                └── @antv/util 3.5.11
                    └── optionalDependencies: @antv/setup

@antv/setup: github:antvis/G2#1916faa365f2788b6e193514872d51a242876569

完整流程:

1. 执行 pnpm update 做依赖更新
2. 项目依赖 @antv/g6 被解析/更新
3. @antv/g6 的子依赖里出现可疑 AntV 包 metadata
4. 这些包声明 optionalDependencies: @antv/setup
5. pnpm 下载 github:antvis/G2#1916faa365f2788b6e193514872d51a242876569
6. 该 tarball 被当作 @antv/[email protected] 安装
7. @antv/setup 的 prepare 脚本执行:
      bun run index.js && exit 1
8. 混淆的 index.js 在你机器上落地持久化文件
9. 写入 LaunchAgent 启动项
10. 启动 ~/.local/share/kitty/cat.py
11. cat.py 每小时轮询 GitHub commit 搜索结果
12. 如果攻击者发布带签名的指令,就下载远程 Python 并执行