Friday, June 14, 2024

New malicious NPM packages Used by Attackers Install njRAT Remote Access Trojan

No, not the one that nibbles at your Thanksgiving leftovers. RAT, Remote Access Trojan, is a type of malware that enables attackers to take over an infected system, execute arbitrary commands, run keyloggers, and discreetly conduct other surveillance activities. 

This Thanksgiving weekend, Sonatype discovered a new malware within the npm registry. The malicious packets being “jdb.js” and “db-json.js”, both published by the same author.

Upon further investigation, it was found that the author behind “jdb.js” had published another malicious npm package “db-json.js”. “jdb.js” is a malicious package that has been clubbed with njRAT a.k.a Bladabindi, which had in 2014 caused Microsoft to shut down 4 million sites.

Variants of njRAT have recently been circulated via Bitcoin scams on Youtube and via Excel phishing emails.

Investigation on “jdb.js”

“jdb.js” is an npm package with the only version 1.0.0.

This contains 3 files in it:

  • package.json, the manifest file
  • module.js, an obfuscated script
  • patch.exe, Windows executable containing the njRAT payload

Once the package is installad, the package.json file first launches ‘module.js’ file which is a strongly obfuscated script containing multiple base64-encoded chunks that cannot be easily deciphere. This script does data gathering and reconnaissance and launches patch.exe file

The patch.exe file runs and copies itself into the local “TEMP” folder on the system and renames itself to “dchps.exe” establishes a connection to also the malicious executable edits Windows firewall rules to ensure it would have no trouble communicating with the hardcoded IP. To do so, it issues the legitimate “netsh” command multiple times, starting with:

netsh firewall add allowedprogram “C:\Users\admin\AppData\Local\Temp\dchps.exe” “dchps.exe” ENABLE

RAt 3

Just by infecting the target with the malware, a remote attacker gains the ability to log keystrokes, modify registry values, initiate system shutdown or restart at will, edit web browser (IE) start page, “speak” to the user via text-to-speech synthesis (via SAPI.Spvoice), kill or relaunch critical system processes like task manager, system restore, and PING, in addition to taking control of hardware devices like CD drives, monitors, mouse, keyboard, etc.

Investigation on “db-json.js

After investigation, it is seen that the Genuine-looking “db-json.js” hides “jdb.js” within.

“db-json.js” had a proper README page with working documetation on npm pretending to be JsonDb, which has now been removed for goodness saying ‘This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future’

Therefore, if someone is able to dodge “jdb.js,” by using “db-json.js” in their application, they will put other developers at risk and just limit to risking themselves.

You can follow us on LinkedinTwitterFacebook for daily Cybersecurity and hacking news updates.

Also Read

Linux Foundation Releases List of Most commonly used open-source Software & Security Problems


Latest articles

Sleepy Pickle Exploit Let Attackers Exploit ML Models And Attack End-Users

Hackers are targeting, attacking, and exploiting ML models. They want to hack into these...

SolarWinds Serv-U Vulnerability Let Attackers Access sensitive files

SolarWinds released a security advisory for addressing a Directory Traversal vulnerability which allows a...

Smishing Triad Hackers Attacking Online Banking, E-Commerce AND Payment Systems Customers

Hackers often attack online banking platforms, e-commerce portals, and payment systems for illicit purposes.Resecurity...

Threat Actor Claiming Leak Of 5 Million Ecuador’s Citizen Database

A threat actor has claimed responsibility for leaking the personal data of 5 million...

Ascension Hack Caused By an Employee Who Downloaded a Malicious File

Ascension, a leading healthcare provider, has made significant strides in its investigation and recovery...

AWS Announced Malware Detection Tool For S3 Buckets

Amazon Web Services (AWS) has announced the general availability of Amazon GuardDuty Malware Protection...

Hackers Exploiting MS Office Editor Vulnerability to Deploy Keylogger

Researchers have identified a sophisticated cyberattack orchestrated by the notorious Kimsuky threat group.The...
Guru baran
Guru baran
Gurubaran is a co-founder of Cyber Security News and GBHackers On Security. He has 10+ years of experience as a Security Consultant, Editor, and Analyst in cybersecurity, technology, and communications.

Free Webinar

API Vulnerability Scanning

71% of the internet traffic comes from APIs so APIs have become soft targets for hackers.Securing APIs is a simple workflow provided you find API specific vulnerabilities and protect them.In the upcoming webinar, join Vivek Gopalan, VP of Products at Indusface as he takes you through the fundamentals of API vulnerability scanning..
Key takeaways include:

  • Scan API endpoints for OWASP API Top 10 vulnerabilities
  • Perform API penetration testing for business logic vulnerabilities
  • Prioritize the most critical vulnerabilities with AcuRisQ
  • Workflow automation for this entire process

Related Articles