Malicious npm Packages Deliver NodeCordRAT, Stealing Credentials and Crypto Data

· Original article ↗

Summary

ThreatLabz found three malicious npm packages that install NodeCordRAT, a RAT using Discord for command-and-control and targeting Chrome credentials, secrets, and MetaMask data. The packages have been removed from npm.

Key points

  • ThreatLabz identified bitcoin-main-lib, bitcoin-lib-js, and bip40 in November 2025; the first two run an installation script that installs bip40, which contains NodeCordRAT.
  • The package names mimic repositories in the legitimate bitcoinjs project, and the packages recorded several thousand downloads.
  • NodeCordRAT fingerprints infected hosts and uses a hardcoded Discord server and private channels for command-and-control.
  • Its commands can execute shell instructions, capture screenshots, and upload files from infected machines.
  • The malware targets Chrome credentials, files containing .env in users’ home directories, and MetaMask wallet data, including keys and seed phrases.
  • The packages have been removed from npm.

Article Details

Attack Vectors
  • Malicious npm packages bitcoin-main-lib and bitcoin-lib-js run postinstall.cjs to install bip40, which contains the NodeCordRAT payload; bip40 can also be installed directly.
  • The packages use name variations of legitimate bitcoinjs project repositories to deceive developers into downloading them.
Defensive Notes
  • The three identified malicious packages were removed from the npm database.
  • Review npm dependencies for the packages bitcoin-main-lib, bitcoin-lib-js, and bip40.

Indicators of compromise

TypeIndicatorContext
MD57a05570cda961f876e63be88eb7e12b8MD5 hash listed for the malicious npm package bitcoin-lib-js.
MD59a7564542b0c53cb0333c68baf97449cMD5 hash listed for the malicious npm package bip40.
MD5c1c6f4ec5688a557fd7cc5cd1b613649MD5 hash listed for the malicious npm package bitcoin-main-lib.

MITRE ATT&CK

Malware

Vendors

Products

Tools

Related Articles