Stealthy Npm Malware Backdoors Popular Ethereum Library

Image by AltumCode, from Unsplash

Stealthy Npm Malware Backdoors Popular Ethereum Library

Reading time: 2 min

Security researchers at ReversingLabs have discovered a sophisticated malware campaign targeting the npm package repository.

In a rush? Here are the quick facts:

  • Malicious npm packages ethers-provider2 and ethers-providerz create a backdoor in infected systems.
  • The malware uses multi-stage attacks, modifying ethers to embed a hidden reverse shell.
  • Attackers maintain persistence by creating loader.js, ensuring infection even after package removal.

The malicious packages, ethers-provider2 and ethers-providerz, secretly modify a widely used npm package, ethers, to create a backdoor on infected systems. The malware differs from standard npm malware because it uses complex multi-stage attacks to function.

These packages present themselves as real tools by duplicating the SSH2 package, which has received more than 350 million downloads, as noted by the researchers. The malware installs itself by stealing more harmful code, which transforms ethers to embed a concealed reverse shell feature for remote hacker access.

ReversingLabs detected the threat using its Spectra platform. The infection process begins when ethers-provider2 is installed. The downloaded script executes a second-stage malware file which self-deletes following its execution to prevent detection.

The malware checks for the presence of ethers until it detects the package then swaps provider-jsonrpc.js with a fake version that contains hidden malicious code.

The attack doesn’t stop there. The malware creates another file named  loader.js that keeps the infection active after the removal of ethers-provider2.

The attackers establish a reverse shell connection during the third phase of their attack, which enables hackers to execute commands remotely through compromised SSH clients. ReversingLabs described this approach as evidence of advanced threat actor capabilities that requires additional investigation.

The researchers identified ethers-providerz as a potential test version because its coding contained multiple errors but it followed the same pattern as the first malicious package.

The security experts discovered that ethers-provider2 remained accessible on npm at the time of reporting, even though ethers-providerz had been eliminated.

Developers need to check their systems for infection signs while exclusively using trusted npm packages according to security experts.

Did you like this article? Rate it!
I hated it I don't really like it It was ok Pretty good! Loved it!

We're thrilled you enjoyed our work!

As a valued reader, would you mind giving us a shoutout on Trustpilot? It's quick and means the world to us. Thank you for being amazing!

Rate us on Trustpilot
0 Voted by 0 users
Title
Comment
Thanks for your feedback
Loader
Please wait 5 minutes before posting another comment.
Comment sent for approval.

Leave a Comment

Loader
Loader Show more...