AI Security AI安全 3d ago Updated 3d ago 更新于 3天前 41

16 Typosquatted RubyGems Packages Steal Browser Credentials and Crypto Wallets 16个仿冒RubyGems包窃取浏览器凭证和加密货币钱包

A typosquatting campaign dubbed "StubMaker" published 16 malicious RubyGems packages on August 15, 2026, designed to steal browser credentials, cryptocurrency wallets, seed phrases, and Telegram data from Windows users The attack exploits RubyGems' `extconf.rb` installation hook to fetch and execute a Rust-based loader from GitHub, which in turn launches a Go-based stealer payload called "wincfg" Threat actors exploited RubyGems' package name reuse policy and unvalidated Author field to reclaim 安全研究人员发现名为StubMaker的RubyGems包投毒活动,16个仿冒包通过typosquatting窃取浏览器凭据、加密货币钱包和Telegram数据 攻击者利用RubyGems包名复用机制和未验证的Author字段,在被删除后重新注册同名恶意包,绕过安全检测 攻击链通过extconf.rb钩子下载22MB Rust加载器,执行Go语言窃取程序wincfg,可绕过Chrome ABE加密保护 同期npm生态也爆发两起供应链攻击:21个包通过bin字段投毒植入后门,以及70个Baileys分叉包被用于WhatsApp账号劫持

62
Hot 热度
58
Quality 质量
55
Impact 影响力

Analysis 深度分析

TL;DR

  • A typosquatting campaign dubbed "StubMaker" published 16 malicious RubyGems packages on August 15, 2026, designed to steal browser credentials, cryptocurrency wallets, seed phrases, and Telegram data from Windows users
  • The attack exploits RubyGems' extconf.rb installation hook to fetch and execute a Rust-based loader from GitHub, which in turn launches a Go-based stealer payload called "wincfg"
  • Threat actors exploited RubyGems' package name reuse policy and unvalidated Author field to reclaim yanked gems under new accounts, evading detection and prolonging the campaign's effectiveness
  • The stealer circumvents Google's App-Bound Encryption (ABE) protections to extract credentials from Chromium-based browsers and exfiltrates data via password-protected ZIP archives uploaded to Gofile
  • This campaign coincides with parallel supply chain attacks on npm, including typosquatted CLI binary names and malicious Baileys WhatsApp bot forks, highlighting systemic vulnerabilities across package registries

Why It Matters

This incident exposes critical weaknesses in RubyGems' governance model—specifically package name reuse and unvalidated metadata fields—that threat actors can exploit to sustain long-running supply chain attacks even after initial takedowns. For AI practitioners and developers relying on Ruby ecosystems, it underscores the urgent need for stricter registry security policies, enhanced dependency verification, and awareness that malicious packages can masquerade as legitimate build toolchains.

Technical Details

  • Attack Vector: The 16 typosquatted gems (e.g., ubnuler, brumdler, activesupmport) mimic popular Ruby dependencies through clumsy character substitutions. They leverage the extconf.rb hook, which runs automatically during gem installation, to execute malicious code under the guise of native extension compilation.
  • Malware Chain: The extconf.rb hook fetches a 22 MB Rust-based loader from a GitHub release (account: bebraz1, now inaccessible). This loader embeds and launches a Go-based information stealer ("wincfg") containing a DLL payload (abe_payload.dll) designed to bypass Chromium browser App-Bound Encryption (ABE).
  • Data Exfiltration: The stealer harvests credentials from 9 Chromium-based browsers (Chrome, Edge, Brave, Opera, Vivaldi, Yandex, Avast, AVG, CCleaner), cryptocurrency wallets and seed phrases, Telegram Desktop data, browsing history, payment card numbers, and extension data. Collected data is compressed into password-protected ZIP archives and uploaded to Gofile, with download links sent to the attacker's C2 domain (dresslee.com) over unencrypted HTTP.
  • RubyGems Exploitation: Attackers exploited two key design flaws: (1) RubyGems allows package namespace reclamation once all versions are yanked, enabling threat actors to republish malicious versions under the same name, and (2) the Author field is an unvalidated plaintext field, allowing attackers to assign different author names per gem to appear unrelated despite sharing the same owner account.
  • Fake Build Toolchain: StubMaker generates a Makefile with empty all, install, and clean targets, plus stub scripts that return success, creating the appearance of a legitimate native extension build while the actual malicious execution occurs entirely within the installer hook.

Industry Insight

  • Registry Governance Reform: Package registries (RubyGems, npm, PyPI) must implement immutable package name deletion policies and validate metadata fields to prevent namespace reclamation attacks and author impersonation. The RubyGems design choice allowing name reuse is a systemic vulnerability that demands immediate remediation.
  • Supply Chain Monitoring: Organizations should adopt continuous monitoring of dependency registries and enforce lockfile pinning with integrity verification. The parallel npm attacks (21 typosquatted CLI binaries and 70+ malicious Baileys forks) demonstrate that threat actors are actively exploiting similar gaps across ecosystems, making proactive surveillance essential.
  • Developer Awareness and Defense: Developers should scrutinize unfamiliar gems, verify package ownership history, and audit extconf.rb or lifecycle hooks in dependencies. The rise of "clumsy" typosquats suggests attackers are prioritizing volume and speed over sophistication, increasing the likelihood of accidental installation—making automated dependency scanning and least-privilege installation practices critical safeguards.

TL;DR

  • 安全研究人员发现名为StubMaker的RubyGems包投毒活动,16个仿冒包通过typosquatting窃取浏览器凭据、加密货币钱包和Telegram数据
  • 攻击者利用RubyGems包名复用机制和未验证的Author字段,在被删除后重新注册同名恶意包,绕过安全检测
  • 攻击链通过extconf.rb钩子下载22MB Rust加载器,执行Go语言窃取程序wincfg,可绕过Chrome ABE加密保护
  • 同期npm生态也爆发两起供应链攻击:21个包通过bin字段投毒植入后门,以及70个Baileys分叉包被用于WhatsApp账号劫持

为什么值得看

本文揭示了开源包管理器生态中包名复用和字段验证缺失带来的供应链安全风险,为Ruby和npm开发者提供了重要的防御参考。攻击者利用registry设计缺陷实现恶意包复活的技术手法,对软件供应链安全治理具有警示意义。

技术解析

  • 包投毒机制:16个恶意RubyGems包采用粗劣的typosquatting手法(如ubnuler模仿builder、ri18nr模仿r18n),攻击者mod8rz41mje和rbq95bwt6q利用RubyGems在包被yanked后释放包名的行为,重新注册同名恶意版本
  • 攻击链架构:extconf.rb安装钩子触发执行,从GitHub下载22MB Rust加载器,加载器内嵌Go语言窃取程序wincfg;wincfg使用abe_payload.dll绕过Chrome App-Bound Encryption保护,窃取浏览器凭据、加密货币钱包、Telegram数据等
  • 伪装技术:生成空的Makefile和stub脚本使扩展构建阶段报告成功,实际恶意行为在安装钩子中执行;每个包使用不同Author字段制造无关假象,利用未验证的plaintext字段特性
  • 数据外泄:窃取数据打包为密码保护ZIP上传至Gofile,通过未加密HTTP将下载链接发送至dresslee.com C2服务器
  • npm关联攻击:21个npm包利用scoped包的bin字段创建未注册的可执行命令名投毒;70个Baileys分叉包(343个版本)和15个libsignal-node冒充包(38个版本)被用于WhatsApp账号劫持和广告注入

行业启示

  • 包管理器安全设计缺陷:RubyGems的包名复用机制和npm的bin字段注册漏洞暴露了开源生态的结构性风险,需推动registry层面增加包名永久保留或作者验证机制
  • 供应链监控常态化:开发者应启用依赖锁定文件、定期审计包变更,企业级环境需部署软件物料清单(SBOM)和运行时行为监控,及时发现异常网络外联
  • 防御纵深建设:针对浏览器凭据窃取,需关注ABE等加密保护的绕过风险;建议采用密码管理器隔离浏览器数据,对加密货币钱包使用硬件钱包,降低单点泄露损失

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Security 安全 Open Source 开源 Research 科学研究 Programming 编程