Security researchers have identified and removed a malicious crate named evm-units from the official Rust package registry, crates.io. This package, part of a software supply chain attack, targeted developers in the Web3 and cryptocurrency space by impersonating a legitimate Ethereum Virtual Machine (EVM) utility. Downloaded over 7,200 times, evm-units contained a hidden, cross-platform malware loader. The loader would detect the host operating system (Windows, macOS, or Linux) and download a corresponding second-stage payload. Notably, the malware included a specific check to avoid execution if 360 Total Security, a popular Chinese antivirus, was present, indicating a targeted campaign likely aimed at crypto-theft from developers in Asia.
This incident is another example of a supply chain attack targeting a popular open-source ecosystem, this time the Rust programming language. The threat actor published a seemingly useful package, evm-units, to trick developers into including it in their projects. The name was chosen to sound like a legitimate tool for working with Ethereum, a popular platform for Web3 development.
The attack was amplified by a second package, uniswap-utils, which was also published by the same author and listed evm-units as a dependency. This tactic increases the chances of the malicious code being pulled into a developer's project indirectly. The ultimate goal of the campaign appears to be financial gain through the theft of cryptocurrency from compromised developers.
The attack employed a multi-stage infection process initiated during the package's build process:
evm-units as a dependency in their Cargo.toml file. This is an instance of T1195.001 - Compromise Software Dependencies and Development Tools.build.rs script, a standard Rust feature that executes code at compile time. This script contains the malicious logic.T1059 - Command and Scripting Interpreter.360 Total Security, an antivirus product from the Chinese company Qihoo 360. If the antivirus is detected, the payload does not execute. This is a clear defense evasion technique, mapped to T1497.001 - System Checks.The primary risk is the theft of cryptocurrency and other sensitive credentials from Web3 developers. A compromised development machine can lead to:
The specific targeting of the Asian market, a major hub for cryptocurrency activity, suggests the attacker had a clear and focused financial motive.
| Type | Value | Description |
|---|---|---|
file_name |
evm-units |
Malicious Rust crate name. |
file_name |
uniswap-utils |
Malicious Rust crate that depends on evm-units. |
cargo-audit and cargo-vet to scan Rust project dependencies (Cargo.lock) for known malicious or unvetted crates. Immediately remove evm-units and uniswap-utils if found.cargo or rustc build processes. Build scripts should generally not be making outbound network connections to unknown URLs. This can be detected via D3FEND's Network Traffic Analysis.cargo or rustc processes spawning shells or executing downloaded scripts, which is highly anomalous behavior.crates.io and other necessary, trusted domains.Dynamic Analysis.Regularly audit software dependencies using automated tools to detect malicious or vulnerable packages.
Run build processes in isolated, network-restricted environments to prevent malicious build scripts from downloading payloads or exfiltrating data.
Train developers to be skeptical of new or unfamiliar open-source packages and to follow best practices for vetting dependencies.
To counter threats like the evm-units crate, development teams should implement dynamic analysis of dependencies within a sandboxed CI/CD pipeline. Before a dependency is approved, the build process should be executed in an isolated environment that monitors for suspicious behaviors. For this specific threat, the analysis would flag the build.rs script for making an unauthorized outbound network connection to download a second-stage payload. This behavioral analysis is superior to static checks, as it catches malicious activity that is obfuscated or executed at compile time. Tools that hook into cargo and monitor its actions can automatically block such dependencies from being introduced into the codebase.
Developer workstations and CI/CD build agents should be subject to strict outbound traffic filtering rules. By default, all egress traffic to the internet should be denied. An explicit allow-list should be created for necessary services like crates.io, github.com, and other vetted corporate resources. This 'deny-by-default' posture would have prevented the malicious build.rs script in evm-units from successfully connecting to its remote server to download the OS-specific malware. Logging the blocked connection attempts would also serve as a valuable alert for security teams, indicating a compromised dependency is present in the environment.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats