Cybersecurity researchers have discovered a malicious package on the npm package registry designed to deploy a remote access trojan (RAT) on compromised systems. The package, named glup-debugger-log, targets users of the gulp toolkit by pretending to be a logger for gulp and its plugins. It has been downloaded 175 times, posing a significant risk to developers. Software supply chain security firm Phylum uncovered that the package contains two obfuscated files that work together to deploy the malicious payload.
The initial dropper sets the stage for the malware campaign by compromising the target machine if it meets certain requirements and downloading additional malware components. The second script provides persistent remote access to control the compromised machine. An analysis of the package.json file revealed the use of a test script to run a JavaScript file (“index.js”), which then invokes another obfuscated file (“play.js”). This file functions as a dropper for next-stage malware, performing checks for network interfaces, specific Windows operating systems, and the number of files in the Desktop folder to avoid detection in controlled environments.
If all checks are met, it launches another JavaScript file (“play-safe.js”) to establish persistence and execute arbitrary commands from a URL or local file. This script sets up an HTTP server on port 3004 to listen for incoming commands, which are then executed and the output sent back to the client. Phylum described this RAT as both crude and sophisticated, highlighting the ongoing evolution of malware in open-source ecosystems. Attackers continue to develop compact, efficient, and stealthy malware to evade detection while maintaining powerful capabilities.
Reference: