Trivy Supply Chain Attack Triggers Self-Spreading CanisterWorm Across 47 npm Packages
好的,我现在要帮用户总结这篇文章的内容。首先,我需要仔细阅读文章,理解其主要信息。文章讲的是针对Trivy扫描器的供应链攻击,导致大量npm包被入侵,出现了一个新的蠕虫CanisterWorm。 接下来,我得找出关键点:攻击者利用了ICP容器作为命令控制服务器的中继点,这是首次被记录的滥用行为。受影响的npm包包括多个范围和具体包名。蠕虫通过postinstall钩子执行加载器,进而投放Python后门,与ICP容器通信获取下一阶段的payload。 此外,蠕虫利用systemd服务实现持久化,并伪装成PostgreSQL工具以避免被发现。后门每隔50分钟联系ICP容器获取URL,并下载执行payload。如果URL指向YouTube,则进入休眠状态。攻击者还可以通过更新容器链接来控制payload的传播。 文章还提到CanisterWorm的新变种能够自我传播,无需手动干预。它会在postinstall阶段收集npm令牌,并自动传播恶意软件到其他包中。这使得攻击能够自我延续,影响更多开发者和CI管道。 最后,用户要求总结在100字以内,不需要特定开头。我需要将这些关键点浓缩成简洁的描述,确保涵盖主要事件、技术细节和影响范围。 </think> 针对Trivy扫描器的供应链攻击导致大量npm包被入侵,出现新型蠕虫CanisterWorm。该蠕虫利用互联网计算机区块链上的ICP容器作为命令控制服务器中继点,并通过postinstall钩子投放Python后门实现持久化和传播。受影响包包括@EmilGroup、@opengov等范围内的多个包。 2026-3-21 07:28:0 Author: thehackernews.com(查看原文) 阅读量:13 收藏

Malware / Threat Intelligence

The threat actors behind the supply chain attack targeting the popular Trivy scanner are suspected to be conducting follow-on attacks that have led to the compromise of a large number of npm packages with a previously undocumented self-propagating worm dubbed CanisterWorm.

The name is a reference to the fact that the malware uses an ICP canister, which refers to tamperproof smart contracts on the Internet Computer blockchain, as a dead drop resolver. The development marks the first publicly documented abuse of an ICP canister for the explicit purpose of fetching the command-and-control (C2) server, Aikido Security researcher Charlie Eriksen said.

The list of affected packages is below -

  • 28 packages in the @EmilGroup scope
  • 16 packages in the @opengov scope
  • @teale.io/eslint-config
  • @airtm/uuid-base32
  • @pypestream/floating-ui-dom

The development comes within a day after threat actors leveraged a compromised credential to publish malicious trivy, trivy-action, and setup-trivy releases containing a credential stealer. A cloud-focused cybercriminal operation known as TeamPCP is suspected to be behind the attacks.

The infection chain involving the npm packages involves leveraging a postinstall hook to execute a loader, which then drops a Python backdoor that's responsible for contacting the ICP canister dead drop to retrieve a URL pointing to the next-stage payload. The fact that the dead drop infrastructure is decentralized makes it resilient and resistant to takedown efforts.

"The canister controller can swap the URL at any time, pushing new binaries to all infected hosts without touching the implant," Eriksen said.

Persistence is established by means of a systemd user service, which is configured to automatically start the Python backdoor after a 5-second delay if it gets terminated for some reason by using the "Restart=always" directive. The systemd service masquerades as PostgreSQL tooling ("pgmon") in an attempt to fly under the radar.

The backdoor, as mentioned before, phones the ICP canister with a spoofed browser User-Agent every 50 minutes to fetch the URL in plaintext. The URL is subsequently parsed to fetch and run the executable.

"If the URL contains youtube[.]com, the script skips it," Eriksen explained. "This is the canister's dormant state. The attacker arms the implant by pointing the canister at a real binary, and disarms it by switching back to a YouTube link. If the attacker updates the canister to point to a new URL, every infected machine picks up the new binary on its next poll. The old binary keeps running in the background since the script never kills previous processes."

It's worth noting that a similar youtube[.]com-based kill switch has also been flagged by Wiz in connection with the trojanized Trivy binary (version 0.69.4), which reaches out to the same ICP canister via another Python dropper ("sysmon.py"). As of writing, the URL returned by the C2 is a rickroll YouTube video.

The Hacker News found that the ICP canister supports three methods – get_latest_link, http_request, update_link – the last of which allows the threat actor to modify the behavior at any time to serve an actual payload.

In tandem, the packages come with a "deploy.js" file that the attacker runs manually to spread the malicious payload to every package a stolen npm token provides access to in a programmatic fashion. The worm, assessed to be vibe-coded using an artificial intelligence (AI) tool, makes no attempt to conceal its functionality.

"This isn't triggered by npm install," Aikido said. "It's a standalone tool the attacker runs with stolen tokens to maximize blast radius."

To make matters worse, a subsequent iteration of CanisterWorm detected in "@teale.io/eslint-config" versions 1.8.11 and 1.8.12 has been found to self-propagate on its own without the need for manual intervention.

Unlike "deploy.js," which was a self-contained script the attacker had to execute with the pilfered npm tokens to push a malicious version of the npm packages to the registry, the new variant incorporates this functionality in "index.js" within a findNpmTokens() function that's run during the postinstall phase to collect npm authentication tokens from the victim's machine.

The main difference here is that the postinstall script, after installing the persistent backdoor, attempts to locate every npm token from the developer's environment and spawns the worm right away with those tokens by launching "deploy.js" as a fully detached background process.

Interestingly, the threat actor is said to have swapped out the ICP backdoor payload for a dummy test string ("hello123"), likely to ensure that the entire attack chain is working as intended before adding the malware.

"This is the point where the attack goes from 'compromised account publishes malware' to 'malware compromises more accounts and publishes itself,'" Eriksen said. "Every developer or CI pipeline that installs this package and has an npm token accessible becomes an unwitting propagation vector. Their packages get infected, their downstream users install those, and if any of them have tokens, the cycle repeats."

(This is a developing story. Please check back for more details.)

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.


文章来源: https://thehackernews.com/2026/03/trivy-supply-chain-attack-triggers-self.html
如有侵权请联系:admin#unsafe.sh