THN

Malicious npm Packages Pose as PostCSS Tools to Deliver Windows RAT_THN:0860E9752FEC58321D74A703FD67C25B

Description

![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiENcFC1DFPXKuRCT_WmSwq-wpzC8IcZUdZzu5IHi597n77W8LFs9qSUdDPCuMK9QzkRZEBMbBh4p2xhnI1OXZu4akIgR5suIv_yRA7AtEkojDcyXaU5x0UiZKRDRvTn0n0wy9HIQnhJj9zUO0rpemNOFNZEmMl4NQsCj5aDEpDrqXUkivsOX1QoLRqeKZh/s1600/npmm.jpg)

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 -

* aes-decode-runner-pro (145 downloads)
* postcss-minify-selector (256 downloads)
* postcss-minify-selector-parser (615 downloads)



All the packages were published over the past month by an npm user named "abdrizak" 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 said 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 "postcss-selector-parser," 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 Nuitka.

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 -

* config.pyd, which contains constants, command IDs, C2 URL, registry key names
* api.pyd, which handles HTTP C2 packet exchange
* audiodriver.pyd, which handles the main RAT orchestration loop
* command.pyd, which profiles the host, runs virtual machine (VM) checks, file transfer, and shell execution
* auto.pyd, which performs Chrome credential and extension theft, bypassing app-bound encryption (ABE) protections
* util.pyd, which acts as tar/gzip archive helpers



"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 -

* A malicious package named "apintergrationpost" that delivers a full-featured Linux RAT dubbed MYRA, while claiming to be a Node.js integration client for authorized red team exercises. "It compiles a native C rootkit during install, establishes three independent persistence mechanisms, masquerades as a systemd service, supports fileless execution, and provides interactive shell access with live screen streaming," SafeDep said.
* A malicious package named "@withgoogle/stitch-sdk" that impersonates Google's Stitch AI design tool but comes with capabilities to steal developer credentials from eight sources (Claude Code, git config, ~/.git-credentials, SSH public keys, GitHub CLI, npm config, ~/.npmrc, and ~/.docker/config.json) and exfiltrates them to an attacker-controlled domain ("stitch-production[.]org/api/v1").
* A cluster of five packages ("procwire," "routecraft," "endpointmap," "bytecraft," and "staticlayer") that delivers a dropper binary on Windows hosts from an external server and executes it during npm install. The "routecraft" package lists "procwire" as a dependency, while the latter lists "endpointmap" and "bytecraft" as dependencies. The last package, "staticlayer," is designed to run on the server side and deliver files to a client that presents the dropper's exact User-Agent.



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.

The findings also coincide with a supply chain attack targeting the "gonex-AI/Understand-Anything" 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 PolinRider, which has been observed 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 BeaverTail, 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.

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.
Visit Original Source

Basic Information

ID THN:0860E9752FEC58321D74A703FD67C25B
Published Jun 23, 2026 at 08:54
Modified Jun 23, 2026 at 09:01

💭 Join the Security Discussion

🔒 Your email address will not be published. Required fields are marked *

⚠️ Please be respectful and constructive in your comments. Security discussions should remain professional.