席卷JavaScript生态圈的Shy Hulud…通过npm自主扩散

TechubNews

瞄准JavaScript开发生态系统的恶意代码"沙虫(Shai Hulud)"不断进化,软件供应链攻击水平被证实已进一步提升。最新分析显示,该恶意代码已超越以往单纯渗透个别软件包的水平,能够将开发者变成无意识且持续传播感染的媒介,具备了自动扩散的体系。

根据安全专业公司Expel公开的报告,近期变种的沙虫具备了自动感染开发者环境,并通过他们管理的npm注册表进行再扩散的结构。该恶意代码在安装阶段会执行植入了病毒的npm软件包,分两步进行感染程序。首先,若目标环境中未安装"Bun"JavaScript运行时,则会自动安装它;随后,通过复杂混淆的载荷,在后台诱导进行凭据窃取、数据泄露和再次感染。

此次变种尤其值得注意的是其凭据收集方式非常精巧。它采用了直接访问AWS Secrets Manager、Microsoft Azure Key Vault、Google Cloud Secret Manager等主要云基础设施的秘密管理系统,以额外提取敏感数据的方式。已确认其在本地系统本身也会全面收集NPM发布令牌、GitHub认证信息乃至云密钥。在此过程中使用的工具是TruffleHog,这是一款能自动从源代码、配置文件、Git记录等中搜索硬编码秘密信息的工具。

沙虫最典型的战术是滥用GitHub基础设施。与以往恶意代码连接命令控制(C2)服务器的方式不同,该恶意代码会将窃取的信息上传到公开存储库,并将受感染的设备注册为GitHub Actions的自托管运行器。这使得外部可以持续进行远程访问,攻击者以受感染开发者的账户为武器,向其他软件包注入恶意代码,并通过自动将更改后的版本重新注册到npm的方式来扩大感染范围。

报告称,截至目前,据推测受感染的存储库超过2.5万个,受影响的软件包达数百个。其中包含开源社区也广泛使用的流行工具。

Expel通过此案例警告,软件供应链安全的"信任层"已不再是安全区。沙虫虽然攻击了JavaScript生态系统,但Python(PyPI)、Ruby(RubyGems)、PHP(Composer)等拥有类似信任基础的其他语言社区,同样很可能暴露在类似的攻击之下。针对开发工具生态系统的自主扩散型恶意代码的出现,可能在未来引发更持续、更广泛的威胁,这一点需要警惕。

Disclaimer: The information on this page may come from third parties and does not represent the views or opinions of Gate. The content displayed on this page is for reference only and does not constitute any financial, investment, or legal advice. Gate does not guarantee the accuracy or completeness of the information and shall not be liable for any losses arising from the use of this information. Virtual asset investments carry high risks and are subject to significant price volatility. You may lose all of your invested principal. Please fully understand the relevant risks and make prudent decisions based on your own financial situation and risk tolerance. For details, please refer to Disclaimer.
Commento
0/400
Nessun commento