ChainVeil Returns to Target the Vite Ecosystem
Detection stack
- AIDR
- Alert
- ETL
- Query
Summary
A newly identified malicious npm cluster known as ViteVenom is targeting the Vite build tool ecosystem. The campaign uses carefully crafted scoped package names to impersonate legitimate tools and delivers a 77 KB remote access trojan. It also relies on a resilient four-tier blockchain-based command-and-control architecture spanning Tron, Aptos, and Binance Smart Chain.
Investigation
Researchers identified seven malicious npm packages that shared the same XOR decryption keys and Tier-2 blockchain wallet addresses previously seen in the ChainVeil campaign. Their investigation uncovered a multi-stage execution chain in which payload locations are resolved through blockchain transactions, helping the operators avoid traditional domain takedowns. The malware also uses array-indexed string shuffling to complicate static analysis.
Mitigation
Organizations should review dependency trees for suspicious scoped packages such as @vite-pro/*, @vitets/*, and @vite-ts/*. Immediate mitigation steps include removing the identified malicious packages, rotating all exposed credentials such as SSH keys, npm tokens, and API keys, and blocking the related command-and-control IP addresses at the network layer. Developers should also verify that Vite dependencies originate from the official @vitejs/* namespace.
Response
If this activity is detected, remove the identified malicious packages immediately and perform a thorough review of lockfiles, including package-lock.json, pnpm-lock.yaml, and yarn.lock. Security teams should terminate any orphaned node -e processes running as detached child processes. A full credential rotation should follow for every environment accessed by the affected systems, and shell configuration files such as .bashrc and .zshrc should be inspected for injected persistence code.
Attack Flow
Detections
Possible Publicnode Ethereum Abuse Attempt As C2 Channel (via dns_query)
View
IOCs (HashMd5) to detect: Sequel to ChainVeil npm Malware Targets Vite Ecosystem
View
IOCs (SourceIP) to detect: Sequel to ChainVeil npm Malware Targets Vite Ecosystem
View
IOCs (DestinationIP) to detect: Sequel to ChainVeil npm Malware Targets Vite Ecosystem
View
Detection of IP Blocking for ViteVenom and ChainVeil Campaigns [Firewall]
View
Detection of ViteVenom Malware Network Activity [Windows Network Connection]
View
Simulation Execution
Prerequisite: The Telemetry & Baseline Pre-flight Check must have passed.
Rationale: This section details the precise execution of the adversary technique (TTP) designed to trigger the detection rule. The commands and narrative MUST directly reflect the TTPs identified and aim to generate the exact telemetry expected by the detection logic. Abstract or unrelated examples will lead to misdiagnosis.
-
Attack Narrative & Commands: The adversary has deployed a piece of malware (simulating the ViteVenom campaign) that attempts to establish a heartbeat/C2 connection to its command server. The malware attempts to connect to the hardcoded IP
43.249.154.132. Because this IP is already blacklisted in the corporate firewall, the firewall drops the packet and generates a ‘block’ event. This simulation usescurlto attempt a connection to one of the specific IPs identified in the detection logic to trigger the alert. -
Regression Test Script: [Provide the exact, self-contained, and executable code snippet for the simulation.]
#!/bin/bash # Simulation of an adversary attempting to connect to a known ChainVeil C2 IP # Target IP: 43.249.154.132 (from detection logic) TARGET_IP="43.249.154.132" echo "[*] Simulating connection attempt to $TARGET_IP..." # We use curl to attempt a connection. # The firewall should intercept this and log a 'block' action. curl -m 5 http://$TARGET_IP/ping > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "[+] Connection failed as expected (Firewall should have blocked it)." else echo "[!] Warning: Connection succeeded. Firewall did not block the IP." fi -
Cleanup Commands:
# No persistent changes made to the system. # Simply ensure any temporary test files are removed if created. rm -f /tmp/sim_test_result.txt