Friday, December 27, 2024
HomeCyber Security NewsNew malicious NPM packages Used by Attackers Install njRAT Remote Access Trojan

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

Published on

SIEM as a Service

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.

- Advertisement - SIEM as a Service

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

Gurubaran
Gurubaran
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.

Latest articles

Lumma Stealer Attacking Users To Steal Login Credentials From Browsers

Researchers observed Lumma Stealer activity across multiple online samples, including PowerShell scripts and a...

New ‘OtterCookie’ Malware Attacking Software Developers Via Fake Job Offers

Palo Alto Networks reported the Contagious Interview campaign in November 2023, a financially motivated...

NjRat 2.3D Pro Edition Shared on GitHub: A Growing Cybersecurity Concern

The recent discovery of the NjRat 2.3D Professional Edition on GitHub has raised alarms...

Palo Alto Networks Vulnerability Puts Firewalls at Risk of DoS Attacks

A critical vulnerability, CVE-2024-3393, has been identified in the DNS Security feature of Palo...

API Security Webinar

72 Hours to Audit-Ready API Security

APIs present a unique challenge in this landscape, as risk assessment and mitigation are often hindered by incomplete API inventories and insufficient documentation.

Join Vivek Gopalan, VP of Products at Indusface, in this insightful webinar as he unveils a practical framework for discovering, assessing, and addressing open API vulnerabilities within just 72 hours.

Discussion points

API Discovery: Techniques to identify and map your public APIs comprehensively.
Vulnerability Scanning: Best practices for API vulnerability analysis and penetration testing.
Clean Reporting: Steps to generate a clean, audit-ready vulnerability report within 72 hours.

More like this

Lumma Stealer Attacking Users To Steal Login Credentials From Browsers

Researchers observed Lumma Stealer activity across multiple online samples, including PowerShell scripts and a...

New ‘OtterCookie’ Malware Attacking Software Developers Via Fake Job Offers

Palo Alto Networks reported the Contagious Interview campaign in November 2023, a financially motivated...

NjRat 2.3D Pro Edition Shared on GitHub: A Growing Cybersecurity Concern

The recent discovery of the NjRat 2.3D Professional Edition on GitHub has raised alarms...