Malicious npm Packages Pose as PostCSS Tools to Deliver Windows RAT

Security Intelligence

Malicious npm Packages Pose as PostCSS Tools to Deliver Windows RAT


Cybersecurity researchers have discovered a set of malicious npm packages that are designed to deliver a Windows-based remote access trojan (RAT).

The list of identified packages, is below -

All the packages were published over the past month by an npm user named "

" and continue to be available for download from npm as of writing. 

"Aes-decode-runner-pro and postcss-minify-selector-parser both present themselves as layered AES/custom-codec packages and depend on the legitimate postcss-selector-parser," JFrog

in an analysis. "Postcss-minify-selector presents itself as a PostCSS selector minifier and depends on postcss-minify-selector-parser."

As for "postcss-minify-selector-parser," the name is a reference to "

," a widely used npm library with more than 127 million weekly downloads. Regardless of the package downloaded, the attack chain leads to the deployment of the same Windows malware.

The packages come embedded with a JavaScript dropper that writes a PowerShell script ("settings.ps1") to disk and executes it. The PowerShell script then acts as a downloader for a next-stage payload retrieved from an external server ("nvidiadriver[.]net") using the "curl.exe."

The retrieved payload is a ZIP archive, from which a Visual Basic Script ("update.vbs") file is extracted and run using "wscript.exe." Also bundled in the downloaded ZIP file is a Python runtime, a Python loader ("loader.py"), and a number of Python extension modules (*.pyd) compiled using

Visual Basic is responsible for setting up the Python environment on the compromised host and launching the "loader.py" script, which then triggers the core logic of the malware. The RAT is equipped to gather host information, siphon credentials from Google Chrome, collect data from Chrome extensions, run shell commands, and download/upload files to and from a command-and-control (C2) server ("95.216.92[.]207:8080").

These features are realized through a set of Python native extension modules -

"This case shows how a small parser-like package can hide a multi-stage Windows payload while appearing related to legitimate build tooling with massive weekly usage," JFrog said. "For defenders, the important lesson is to treat lookalike build dependencies as potential delivery mechanisms, not just harmless naming noise."

The discovery coincides with three other campaigns targeting the npm and TypeScript ecosystem -

Users who have installed any of the above packages are advised to remove them with immediate effect, remove any artifacts created by them, and rotate credentials from impacted developer machines.

" knowledge graph tool to push a malicious payload that "beacons one of three hardcoded C2 servers, exfiltrates a campaign marker, XOR-decrypts and evaluates a downloaded bot client, then independently resolves a second-stage command from a Tron blockchain address whose latest transaction encodes a BSC transaction hash carrying the active payload."

The activity overlaps with a North Korean supply chain operation dubbed

injecting obfuscated JavaScript into legitimate developers' configuration files across nearly 2,000 compromised GitHub repositories to deliver a known malware downloader and stealer referred to as

, which then paves the way for the InvisibleFerret backdoor.

"This attack combines three things that individually are familiar but together open a detection gap: an elaborate fake PR description with fabricated test evidence, a diff that hides its payload in horizontal whitespace, and a two-stage C2 where the second stage uses public blockchain infrastructure as a write-once, read-anywhere relay," SafeDep said.