一夜间“供应链攻击”刷屏:发生了什么?如何规避风险?

Odaily星球日报Опубликовано 2025-09-09Обновлено 2025-09-09

原创 | Odaily 星球日报(@OdailyChina)

作者|Azuma(@azuma_eth)

北京时间 9 月 9 日,Ledger 首席技术官 Charles Guillemet 于 X 发文预警表示:“目前正在发生一起大规模供应链攻击,一名知名开发者的 NPM 账号遭到入侵。受影响的软件包下载量已超过 10 亿次,这意味着整个 JavaScript 生态系统都可能面临风险。

Guillemet 补充表示:“恶意代码的工作原理是在后台静默篡改加密货币地址,以此窃取资金。如果你使用硬件钱包,请仔细核对每一笔签名交易,你就是安全的。如果你没有使用硬件钱包,请暂时避免进行任何链上交易。目前尚不清楚攻击者是否已经在直接窃取软件钱包的助记词。”

发生了什么?

根据 Guillemet 所援引的安全报告内容,本次事件发生的直接原因在于:知名开发者 @qix 的 NPM 账户遭到入侵,导致数十个软件包被发布恶意版本,包括 chalk、strip-ansi 和 color-convert 等,恶意代码可能已经在开发者或用户自动安装依赖时扩散至终端。

Odaily注:受损软件包的周下载量数据。

简而言之,这是一起经典的供应链攻击案例 —— 即攻击者通过在开发工具或依赖系统中植入恶意代码(如 NPM 包)来进行作恶。所谓 NPM,全称为 Node Package Manager,它是JavaScript/Node.js 生态里最常用的软件包管理工具,其主要作用包括管理依赖、安装和更新软件包、共享代码等等。

NPM 的生态规模极大,目前已有数百万个软件包,几乎所有 Web3 项目、加密钱包、前端工具都会依赖 NPM —— 也正是因为 NPM 依赖数量庞大且链路复杂,所以它是供应链攻击的高危入口,攻击者只要在一个常用软件包里植入恶意代码,就可能影响成千上万的应用和用户。

如上图的恶意代码扩散流程图所示:

  • 某项目(蓝色框)会直接依赖一些常见的开源库,比如 express。
  • 这些直接依赖(绿色框)又会依赖其他间接依赖(黄色框,如 lodash)。
  • 如果某个间接依赖被攻击者偷偷植入了恶意代码(红色框),它会顺着依赖链条进入到该项目中。

这对加密货币意味着什么?

该起安全事件与加密货币行业的直接关系在于,黑客向上述受污染的软件包中植入的恶意代码是一个精密的“加密货币剪贴板劫持程序”,通过替换钱包地址和劫持交易来窃取加密资产。

Stress Capital 创始人 GE(@GuarEmperor)于 X 就此进行了更详细的解释,黑客所注入的"剪贴板劫持程序“采用了两种攻击模式 —— 被动模式下使用“莱文斯坦距离算法(Levenshtein distance algorithm)”替换钱包地址,由于视觉上近似因此极难察觉;主动模式下则会在检测浏览器内的加密钱包,在用户签署交易前篡改目标地址。

由于本次攻击针对的是 JavaScript 项目基础层库,意味着即使间接依赖这些库的项目也可能受到影响。

黑客获利情况如何?

黑客所植入的恶意代码也披露了其攻击地址,黑客在以太坊上的主要攻击地址为 0xFc4a4858bafef54D1b1d7697bfb5c52F4c166976,资金上则主要来源于以下三个地址:

  • 0xa29eEfB3f21Dc8FA8bce065Db4f4354AA683c0240
  • x40C351B989113646bc4e9Dfe66AE66D24fE6Da7B
  • 0x30F895a2C66030795131FB66CBaD6a1f91461731

Arkham 方面已就本次攻击事件制作了跟踪页面,在该页面可实时查询黑客攻击获利情况及转移情况。

截至发文,黑客攻击岁仅获利 496 美元,但考虑到目前尚未确定恶意代码的已扩散范围,预计该数据可能还会继续上升 —— 开发者本人现已收到通知,正在与 NPM 安全团队积极合作解决问题,恶意代码目前已从大部分受影响的软件包中移除,所以情况正在得到控制。

该如何规避风险?

Defillama 创始人 @0xngmi 于 X 表示,本次事件虽然听起来很危险,但实际影响范围实际并没有那么夸张 —— 因为本事件只会影响自被黑的 NPM 软件包发布以来推送过更新的网站,其他项目仍将使用旧版本;且大多数项目都会固定它们的依赖关系,所以即使它们推送更新,仍会继续使用旧的安全代码。

不过,由于用户侧无法真正知道某个项目是否固定了依赖项,或者它们是否有一些动态下载的依赖项,所以目前首先需要由项目方出面自检并进行披露。

截至发文,包括 MetaMask、Phantom、Aave、Fluid、Jupiter 等多个钱包或应用端项目方均已披露自身不受本次事件影响,故理论上用户可放心使用已确认安全的钱包正常访问已确认安全的协议,但对于其他尚未进行安全披露的钱包或项目,暂时避免使用可能会是更安全的做法。

Похожее

To Those Ordinary People Who Haven't Invested in AI: You Think You're Late, You're Just Lacking Your Own Worldview

**Summary:** The article argues that ordinary investors feeling FOMO over missing the AI investment boom lack not timing, but their own independent worldview. Most people chase "what to buy" based on others' opinions (FOMO, envy) rather than fundamental analysis. This leads to costly mistakes: not knowing when to exit winning trades or cut losses on losing ones. The core solution is to develop a personal, long-term (5-10 year) worldview about societal shifts and technological bottlenecks. For most, building this from scratch (Path A) is too demanding. A practical alternative (Path B) is to follow the **capital expenditures (capex)** and strategic investments of visionary leaders, as their money reveals true conviction more reliably than their words. Five key figures to track for different AI perspectives are highlighted: Jensen Huang (NVIDIA, infrastructure), Elon Musk (Tesla/SpaceX/xAI, capex signals), Sam Altman (OpenAI, commercialization, but beware hype), Dario Amodei (Anthropic, technical/safety focus), and Liang Wenfeng (DeepSeek, efficiency/anti-consensus view). The article details how to read capex signals from hyperscalers' financial reports, NVIDIA's revenue breakdown, and strategic investments. It maps the complete AI产业链 (supply chain) from raw materials/energy to models/applications, explaining value flow and inter-dependencies (e.g., how a model release triggers demand across chips, memory, and optics). Finally, it provides an action plan: secure personal finances first, allocate a limited portfolio percentage (max 25%) to the theme, prefer broad ETFs (like QQQ), use dollar-cost averaging over 6-12 months, and write down strict investment rules beforehand to combat emotional errors during market volatility. The conclusion is that a stable, personally-held worldview enables disciplined, long-term investment far more than chasing short-term trends.

marsbit37 мин. назад

To Those Ordinary People Who Haven't Invested in AI: You Think You're Late, You're Just Lacking Your Own Worldview

marsbit37 мин. назад

Microsoft Halts Vibe Coding: "Burning Tokens" Is Now More Expensive Than Employees

Microsoft has halted the widespread internal use of Claude Code, withdrawing licenses from most employees by the end of its fiscal year, June 30, 2026. This reversal comes just six months after actively promoting the AI coding tool to boost productivity via "vibe coding"—where developers describe intent in natural language and let the LLM generate code. The core issue isn't the tool's effectiveness; internal reports suggest employees preferred Claude Code over Microsoft's own Copilot CLI. The problem is financial: the "copilot mode" adds a variable, consumption-based token cost on top of existing employee salaries without a proportional revenue increase. As usage grew, the token bills became unsustainable, leading to what sources describe as a cost-structure failure. Similar overruns have been reported at other firms like Uber. The article contrasts this with the approach of AI-native startups, exemplified by Y Combinator's philosophy. Here, high token consumption is strategic—it replaces, rather than supplements, human labor. Startups operate with tiny teams where AI agents handle work previously done by many, making the high token bill financially viable as it offsets much larger personnel costs. The conclusion is that "vibe coding" isn't dead, but its economics fail within traditional corporate structures that treat AI as a productivity add-on for existing staff. Success requires a foundational shift to an AI-native organization, where processes are built to be "legible to AI," and the company's core knowledge and assets reside in documented, AI-accessible systems rather than solely in employees' minds. The future divide will be between companies that merely add AI tools and those that redesign their organizations around them.

marsbit56 мин. назад

Microsoft Halts Vibe Coding: "Burning Tokens" Is Now More Expensive Than Employees

marsbit56 мин. назад

Торговля

Спот
Фьючерсы
活动图片