60个恶意npm包窃取主机名、IP及DNS服务器信息
针对npm生态系统的复杂恶意软件活动通过60个恶意包入侵开发者环境,累计下载超3000次。这些包在安装时自动执行脚本,收集敏感网络信息并发送至Discord webhook。攻击者利用三个npm账户发布恶意包,并采用沙盒检测机制避免被发现。 2025-5-26 10:24:55 Author: cybersecuritynews.com(查看原文) 阅读量:14 收藏

60 Malicious npm Packages Exfiltrates Exfiltrate Hostnames, IP’s, DNS Servers Details

A sophisticated malware campaign targeting the npm ecosystem has compromised developer environments through 60 malicious packages designed to silently harvest sensitive network information.

The operation, which began eleven days ago and remains active as of publication, demonstrates the growing threat to software supply chains through compromised open-source packages.

The malicious packages span three npm accounts and have accumulated over 3,000 downloads, creating an extensive reconnaissance network for the threat actors.

Google News

Each package contains identical post-install scripts that execute automatically during npm installation, targeting Windows, macOS, and Linux systems across developer workstations and continuous integration environments.

Socket.dev researchers identified the campaign through their threat detection systems, revealing that the malware collects hostnames, internal and external IP addresses, DNS server configurations, and user directory paths before exfiltrating this data to a Discord-controlled webhook endpoint.

The operation’s persistence and scale indicate a well-coordinated effort to map enterprise networks and identify high-value targets for future attacks.

First three malicious packages (Source – Socket.dev)

The threat actors published packages under three accounts with registration emails following the pattern npm9960+[1-3]@gmail.com, each containing exactly twenty malicious packages with legitimate-sounding names like “react-xterm2,” “seatable,” and “garena-admin.”

Combined with the rapid publication timeline and identical payloads, this suggests systematic automation in the campaign’s execution.

The exfiltrated data provides attackers with comprehensive network mapping capabilities, linking private developer environments to public-facing infrastructure and revealing organizational relationships that could facilitate targeted intrusions.

On continuous integration servers, the malware exposes internal package registry URLs and build paths, intelligence particularly valuable for subsequent supply chain attacks.

Technical Infection Mechanism

The malware employs sophisticated reconnaissance techniques wrapped within seemingly innocuous post-install hooks.

The core payload utilizes Node.js built-in modules to enumerate network interfaces and extract IPv4 addresses while querying ipinfo.io for external network information.

Before exfiltration, the script implements sandbox evasion by checking for known cloud computing domains including “compute.amazonaws.com” and “bc.googleusercontent.com,” as well as research environment indicators like usernames containing “justin,” “mal_data,” or “malicious”.

This selective targeting ensures the malware operates only in genuine development environments, maximizing the value of collected intelligence while avoiding detection in security research environments.

Equip your SOC team with deep threat analysis for faster response -> Get Extra 𝗦𝗮𝗻𝗱𝗯𝗼𝘅 𝗹𝗶𝗰𝗲𝗻𝘀𝗲𝘀 for Free


文章来源: https://cybersecuritynews.com/60-malicious-npm-packages-exfiltrates-exfiltrate-hostnames/
如有侵权请联系:admin#unsafe.sh