StepSecurity Details CanisterWorm’s npm Backdoor and Self-Propagation

· Original article ↗

Summary

StepSecurity says TeamPCP used npm tokens stolen through the Trivy v0.69.4 compromise to spread CanisterWorm, which installs a persistent Python backdoor, steals npm tokens, and can deliver destructive Kubernetes payloads.

Key points

  • StepSecurity reports finding matching suspicious releases across multiple npm scopes, including @opengov, and describes them as a coordinated worm deployment.
  • The article links the spread to the Trivy v0.69.4 compromise, which it says exposed npm tokens in affected CI/CD pipelines.
  • Compromised packages add a postinstall hook that runs code to install a Python backdoor and a persistent systemd user service without root access.
  • The backdoor polls an Internet Computer-hosted C2 endpoint, tdtqy-oyaaa-aaaae-af2dq-cai[.]raw[.]icp0[.]io, about every 50 minutes for second-stage payloads.
  • A separate component harvests npm tokens, finds packages those tokens can publish to, and republishes infected patch versions.
  • StepSecurity says the second stage can deploy destructive Kubernetes payloads against targeted environments; the backdoor may remain active even when destructive behavior does not run.
  • Recommended response includes checking for the listed host artifacts, rotating exposed tokens and other accessible secrets, reviewing outbound traffic, and pinning dependencies to clean versions.

Article Details

Attack Vectors
  • According to the article, attackers compromised Trivy release v0.69.4 and the trivy-action and setup-trivy GitHub Actions, using credential-harvesting payloads to steal CI/CD secrets, including npm tokens.
  • Backdoored npm package versions add a postinstall hook that runs node index.js when the package is installed.
  • A detached worm component harvests npm publishing tokens, enumerates packages those tokens can publish, then increments package versions and republishes the backdoored packages.
  • The implant installs a Python backdoor and a persistent systemd user service, which polls an Internet Computer Protocol C2 endpoint and downloads second-stage binaries.
  • The article reports that the second-stage payload can deploy Kubernetes DaemonSets or wipe the filesystem for targeted Iranian environments.
Defensive Notes
  • Check affected machines for ~/.local/share/pgmon/service.py and ~/.config/systemd/user/pgmon.service; the article identifies their presence as evidence of execution.
  • Check for /tmp/pglog to determine whether a second-stage payload was downloaded.
  • Rotate npm tokens and other secrets accessible on affected machines or in CI/CD environments during package installation.
  • Review outbound network logs for connections to the reported C2 URL.
  • Pin affected dependencies to the last confirmed clean version until maintainers publish remediated releases.

Indicators of compromise

TypeIndicatorContext
DOMAINscan[.]aquasecurtiy[.]orgTyposquat domain the article identifies as the Trivy-stage exfiltration endpoint.
URLhxxps[:]//tdtqy-oyaaa-aaaae-af2dq-cai[.]raw[.]icp0[.]io/Internet Computer-hosted C2 endpoint polled by the Python implant.

MITRE ATT&CK

Threat Actors

Malware

Vendors

Products

Tools

Countries

Related Articles