Article Details

Scrape Timestamp (UTC): 2024-06-03 14:01:56.613

Source: https://thehackernews.com/2024/06/researchers-uncover-rat-dropping-npm.html

Original Article Text

Click to Toggle View

Researchers Uncover RAT-Dropping npm Package Targeting Gulp Users. Cybersecurity researchers have uncovered a new suspicious package uploaded to the npm package registry that's designed to drop a remote access trojan (RAT) on compromised systems. The package in question is glup-debugger-log, which targets users of the gulp toolkit by masquerading as a "logger for gulp and gulp plugins." It has been downloaded 175 times to date. Software supply chain security firm Phylum, which discovered the package, said the package comes fitted with two obfuscated files that work in tandem to deploy the malicious payload. "One worked as a kind of initial dropper setting the stage for the malware campaign by compromising the target machine if it met certain requirements, then downloading additional malware components, and the other script providing the attacker with a persistent remote access mechanism to control the compromised machine," it said. Phylum's closer examination of the library's package.json file – which acts as a manifest file outlining all metadata associated with a package – found the use of a test script to run a JavaScript file ("index.js") that, in turn, invokes an obfuscated JavaScript file ("play.js"). The second JavaScript file functions as a dropper to fetch next-stage malware, but not before running a series of checks for network interfaces, specific types of Windows operating systems (Windows NT), and, in an unusual twist, the number of files in the Desktop folder. "They check to ensure that the Desktop folder of the machine's home directory contains seven or more items," Phylum explained. "At first glance, this may seem absurdly arbitrary, but it's likely that this is a form of user activity indicator or a way to avoid deployment on controlled or managed environments like VMs or brand new installations. It appears the attacker is targeting active developer machines." Assuming all the checks go through, it launches another JavaScript configured in the package.json file ("play-safe.js") to set up persistence. The loader further packs in the capability to execute arbitrary commands from a URL or a local file. The "play-safe.js" file, for its part, establishes an HTTP server and listens on port 3004 for incoming commands, which are then executed. The server sends the command output back to the client in the form of a plaintext response. Phylum described the RAT as both crude and sophisticated, owing to its minimal functionality, self-contained nature, and its reliance on obfuscation to resist analysis. "It continues to highlight the ever-evolving landscape of malware development in the open source ecosystems, where attackers are employing new and clever techniques in an attempt to create compact, efficient, and stealthy malware they hope can evade detection while still possessing powerful capabilities," the company said. Continuous Attack Surface Discovery & Penetration Testing Continuously discover, prioritize, & mitigate exposures with evidence-backed ASM, Pentesting, and Red Teaming.

Daily Brief Summary

MALWARE // Researchers Discover Malicious npm Package That Installs RAT

Cybersecurity firm Phylum detected a malicious package named glup-debugger-log on the npm registry, designed to mimic a logging tool for gulp users.

The package, downloaded 175 times, contains obfuscated files meant to deploy a remote access trojan (RAT) on targeted systems.

It includes initial checks for specific Windows OS types, network interfaces, and the count of desktop items, aiming to target actively used developer machines.

The RAT sets up persistence on the compromised machine, can execute commands remotely, and relays command outputs back to the attacker.

This malware exemplifies the ongoing evolution and sophistication in malicious software developments within open-source ecosystems.

The RAT’s design integrates user activity indicators as a deployment tactic, highlighting a strategic approach to avoid detection and enhance infection success.

Phylum's findings stress the need for heightened security awareness and measures among developers using open-source libraries and tools.