OpenSourceMalware Show #20: Mini Shai-Hulud Payload Resurfaces on npm

· Original article ↗

Summary

The episode discusses four npm packages containing a Mini Shai-Hulud payload that resurfaced after 111 days, plus supply-chain threats, PolinRider’s execution method, GitHub defenses and developer precautions.

Key points

  • Four packages published from one npm account within an hour on September 7 contained a static Mini Shai-Hulud payload linked to the May campaign against AntV.
  • The payload went undetected for 111 days despite npm publish-time scanning; its command-and-control infrastructure was down, but the malware could still run locally.
  • The hosts said the packages likely resurfaced through source-code cleanup or merging, and characterized the event as lingering malware rather than a new worm wave.
  • PolinRider can use a VS Code tasks file to run a JavaScript payload when a repository is opened, regardless of the repository’s primary programming language.
  • The hosts described inspecting VS Code task files, suspicious non-font font files, and obfuscated code in configuration files as useful checks for developers.
  • The episode also discussed the limits of YARA rules against changing supply-chain malware and called for stronger detection and response by code-hosting and package platforms.

Article Details

Attack Vectors
  • Four npm packages published from the same account within one hour on September 7 contained the Mini Shai-Hulud payload previously associated with the May attack against AntV. The hosts attribute discovery to a matching malware hash.
  • The hosts and the cited researcher suspect that old infected source code was inadvertently republished through development pipelines or branch merges; they do not describe the resurfacing as a new worm wave.
  • PolinRider compromises repositories and force-pushes malicious commits while manipulating Git history to conceal changes from ordinary inspection in the GitHub web interface.
  • Malicious VS Code task files automatically execute JavaScript payloads when a repository folder is opened, including in repositories primarily written in languages other than JavaScript.
  • Payload delivery includes fake font files, poisoned configuration files, and malicious JavaScript placed in files such as app.js and database.js.
  • The hosts describe malicious Baileys copycats used in Southeastern Asia to redirect WhatsApp payments to unintended recipients.
Defensive Notes
  • Inspect repository VS Code task configuration before opening unfamiliar projects, particularly tasks configured to run automatically on folder opening.
  • Check for fake font payloads, including the source-mentioned fa-solid-900.woff2 filename, and inspect configuration and application files for obfuscated JavaScript.
  • Do not assume a repository is safe because its primary programming language is not JavaScript; VS Code tasks can launch a separate JavaScript payload.
  • The hosts recommend signed commits as an additional authenticity signal and caution that displayed Git commit identities and timestamps originate from locally supplied history.
  • The hosts argue that registry and repository providers could scan proactively and retrospectively using known malware hashes and detection strings.
  • YARA can contribute to detection, but the hosts caution that effective dependency inspection requires recursive coverage and that changing obfuscation and dynamically retrieved dependencies limit signature-only approaches.
  • Although the resurfaced Mini Shai-Hulud C2 infrastructure was reportedly offline, the hosts emphasize that its malicious code could still execute locally.

MITRE ATT&CK

People

Threat Actors

Malware

Vendors

Products

Tools

Countries

Industries

Related Articles