Friday, March 29, 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 46.185.116.2:5552 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

Website

Latest articles

Beware Of Weaponized Air Force invitation PDF Targeting Indian Defense And Energy Sectors

EclecticIQ cybersecurity researchers have uncovered a cyberespionage operation dubbed "Operation FlightNight" targeting Indian government...

WarzoneRAT Returns Post FBI Seizure: Utilizing LNK & HTA File

The notorious WarzoneRAT malware has made a comeback, despite the FBI's recent efforts to...

Google Revealed Kernel Address Sanitizer To Harden Android Firmware And Beyond

Android devices are popular among hackers due to the platform’s extensive acceptance and open-source...

Compromised SaaS Supply Chain Apps: 97% of Organizations at Risk of Cyber Attacks

Businesses increasingly rely on Software as a Service (SaaS) applications to drive efficiency, innovation,...

IT and security Leaders Feel Ill-Equipped to Handle Emerging Threats: New Survey

A comprehensive survey conducted by Keeper Security, in partnership with TrendCandy Research, has shed...

How to Analyse .NET Malware? – Reverse Engineering Snake Keylogger

Utilizing sandbox analysis for behavioral, network, and process examination provides a foundation for reverse...

GoPlus’s Latest Report Highlights How Blockchain Communities Are Leveraging Critical API Security Data To Mitigate Web3 Threats

GoPlus Labs, the leading Web3 security infrastructure provider, has unveiled a groundbreaking report highlighting...
Guru baran
Guru baranhttps://gbhackers.com
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.

Mitigating Vulnerability Types & 0-day Threats

Mitigating Vulnerability & 0-day Threats

Alert Fatigue that helps no one as security teams need to triage 100s of vulnerabilities.

  • The problem of vulnerability fatigue today
  • Difference between CVSS-specific vulnerability vs risk-based vulnerability
  • Evaluating vulnerabilities based on the business impact/risk
  • Automation to reduce alert fatigue and enhance security posture significantly

Related Articles