New npm malware finds a way around install script defenses
Checkmarx details npm supply-chain malware hiding in BTree methods, using Ethereum smart-contract C2 and Slack/Telegram exfiltration; ten packages pulled.
Checkmarx uncovered malicious npm packages, including btree-core with more than 1.9 million downloads, that embed their payload in the BTree.prototype.set runtime method to bypass npm's June lifecycle-script restrictions. A detached Node.js loader fingerprints the host (architecture, hostname, CPU, memory, uptime) and exfiltrates data to hardcoded Slack and Telegram channels. The C2 address is hidden in a Sepolia Ethereum testnet smart contract whose getter/setter functions the malware polls, providing takedown resilience; a second-stage payload is unlocked from encrypted contract chunks. Nine additional packages were removed from the registry, and attackers maintained a legitimate-looking GitHub repository with an AI-generated profile image; the campaign is ongoing and IOCs were shared.
- Malware embedded in BTree.prototype.set runtime method, not install scripts, dodging npm's June defenses
- C2 address hidden in Sepolia Ethereum testnet smart contract with getter/setter polling
- Host fingerprint exfiltrated to hardcoded Slack channel and Telegram chats
- Ten packages removed; btree-core alone had 1.9M+ downloads
- ATT&CK
- T1059.007 Command and Scripting Interpreter: JavaScriptT1082 System Information DiscoveryT1102 Web ServiceT1567 Exfiltration Over Web Service
From the original article
2 min read at csoonline.com
Blocking suspicious install scripts may no longer be enough to mitigate threats from malicious JavaScript dependencies used in software supply-chain attacks. Security researchers at Checkmarx are warning of attackers using a malicious package called “indexed-btree” to impersonate the legitimate sorted-btree library, to spread malware hidden in the package’s normal runtime code.
csoonline.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.