Four pirate-themed npm packages (blackbeards-navigator, beusy, sirens-lament, gunpowder-ghost) were published by the npm account beusy with heavily inflated version numbers (209.0.0–210.0.0), a hallmark of dependency confusion attacks. Each package contains identical malicious lifecycle scripts (preinstall, install, and postinstall) that run on npm install, searching the entire filesystem (up to 8 directory levels deep) for HackTheBox CTF flags matching the pattern HTB{. If no flags are found, the scripts collect environment variables and /proc/1/environ as a fallback. The collected data is base64-encoded and exfiltrated via an HTTPS GET request to an attacker-controlled ngrok tunnel (https://7f83-194-51-113-30.ngrok-free.app), with the package name and hostname included as query parameters. The packages have no legitimate functionality; index.js exports an empty object.
This package (sirens-lament) identifies itself as pkg=sirens-lament in the exfil request. All three lifecycle hooks run the same payload, ensuring execution regardless of npm lifecycle ordering.
-= Per source details. Do not edit below this line.=-
The package sirens-lament was found to contain malicious code.
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
The OpenSSF Package Analysis project identified...
209.0.0210.0.0211.0.0212.0.0213.0.0214.0.0217.0.0219.0.0220.0.0225.0.0Exploitability
AV:NAC:LPR:NUI:NScope
S:CImpact
C:HI:HA:H10.0/CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H