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

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

网络安全

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 并执行