Research Blogs Feed 09月29日
npm蠕虫Shai-Hulud威胁分析
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

ReversingLabs研究人员发现npm开源仓库中的自复制蠕虫Shai-Hulud,通过劫持维护者账户注入恶意代码,在9月14日至18日期间感染超过200个npm包。该蠕虫窃取敏感数据并自我传播,影响ngx-bootstrap、ng2-file-upload等百万下载量包。建议使用SCA工具监控第三方包,移除受感染版本,并应用权限最小化原则。受影响系统需隔离或重装,同时启用多因素认证。

🔍 Shai-Hulud蠕虫通过劫持npm维护者账户,在9月14日至18日期间感染超过200个公开及私有包,利用恶意post-install脚本执行凭证窃取、包污染和自我复制,影响Windows、Linux及macOS系统。

📦 受影响包包括ngx-bootstrap(4.1.1/2)、ng2-file-upload等百万下载量组件,威胁者通过GitHub webhook和命名含Shai-Hulud的私有仓传播数据,形成供应链攻击链。

🛡️ 防御建议包括部署SCA工具过滤第三方包,清除受感染版本并缓存重建,采用scope化短时效key/tokens,以及监控npm发布异常和CI/CD中的密钥扫描日志。

🔐 建议将受影响系统隔离扫描或重装,对npm/GitHub/云服务启用MFA,同时限制构建环境访问权限,并通过代码仓库权限审计阻断恶意工作流。

🔄 蠕虫通过发布感染包版本、公开私有仓和注入恶意工作流实现级联传播,暴露了开源生态中凭证管理和包维护的漏洞,需建立主动监测和应急响应机制。

IntroductionOn September 15th 2025, ReversingLabs (RL) researchers discovered a self-replicating worm called “Shai-Hulud” in the npm open-source registry. The worm autonomously spreads through the npm registry by hijacking maintainer accounts and injecting malicious code into public and private packages. Over 200 npm packages and more than 500 versions were compromised between September 14th and 18th. Each infected package helps the Shai-Hulud worm spread further which creates a chain reaction across the npm ecosystem.Named after its repository, the Shai-Hulud worm targets sensitive data like tokens, keys, and private repositories. While end-user applications are less directly affected, build environments may have been exposed through leaked credentials or code. RL has identified hundreds of compromised packages, including widely used ones like ngx-bootstrap, ng2-file-upload, and @ctrl/tinycolor, which have millions of weekly downloads. The interconnected nature of npm packages makes it difficult to predict the worm’s impact.RecommendationsUse private registry proxies and software composition analysis (SCA) tools to filter and monitor third-party packages. Remove compromised package versions, clear caches, and reinstall clean ones. Use private package managers to block malicious versions.Apply least privilege principles by using scoped, short-lived keys and tokens. Revoke npm tokens, GitHub personal access tokens (PATs), cloud keys, and CI/CD secrets.Flag abnormal npm publish events, GitHub workflow additions, or the unexpected use of secret scanners in CI processes. Hunt for indicators of compromise (IOCs) like bundle.js, workflows named shai-hulud-workflow.yml, or outbound traffic to webhook[.]site.Update response playbooks for supply chain attacks and conduct practice drills. Treat impacted systems as compromised by isolating, scanning, or reimaging them.Restrict build environments to internal package managers or trusted mirrors, and limit internet access to reduce data exfiltration risks. Enable multifactor authentication (MFA) across all platforms, including npm, GitHub, and cloud services.Reinforce phishing awareness, and the secure handling of tokens and secrets with developer teams.Affected VersionsNotable examples of compromised packages and their versions include: @ctrl/tinycolor - Versions 4.1.1 and 4.1.2@crowdstrike/* - Multiple versions of packagesImpacted platformsAll major operating systems (OS), including Windows, Linux, and macOS, are affected and become vulnerable when compromised npm packages are installed.Vulnerability DetailsThe Shai-Hulud worm exploits compromised npm packages by planting a malicious post-install script. When executed, the script executes several actions:Uses TruffleHog to steal sensitive data, such as tokens, API keys, environment variables, and cloud credentials.Sends exfiltrated data to threat actor-controlled webhooks and GitHub repositories named Shai-Hulud.Publishes infected versions of all packages owned by the victim.Injects malicious workflows and converts private repositories to public access.This combination of credential theft, package trojanization, and self-replication makes the Shai-Hulud worm uniquely dangerous.ConclusionThe Shai-Hulud worm rapidly compromised hundreds of npm packages and versions across Windows, Linux, and macOS, showing how quickly and widely vulnerabilities in open-source ecosystems can be exploited. By combining credential theft, automated propagation, and repository tampering, the Shai-Hulud worm has set a precedent for future supply chain attacks. To prevent similar incidents, organizations must act immediately by revoking exposed credentials, strengthening supply chain defenses, and implementing enhanced monitoring to detect and respond to potential threats.Zscaler CoverageZscaler has enhanced its security measures to cover this threat, ensuring that any attempts to download a malicious npm package will be detected under the following threat classifications:Advanced Threat ProtectionJS/Shulud.AJS.Malicious.npmpackageAttempts to access the web service for data exfiltration will be identified and flagged under the following threat name:Advanced Threat ProtectionJS.Worm.Shai-Hulud.LZ

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

npm蠕虫 Shai-Hulud 供应链攻击 凭证窃取 开源安全
相关文章