
Socket: Popular Rust Crates Compromised in Build-Time Supply Chain Attack
Socket's Threat Research Team documents a supply chain attack in which three legitimate Rust crates (arrayref, internment, append-only-vec) maintained by droundy were republished with a dependency on proc-macro1, a typosquat of proc-macro2 whose build.rs downloads and executes cross-platform malware during Cargo compilation. The stage-2 backdoor profiles the host, inventories Chromium browser login origins and extensions, establishes user-level persistence (HKCU Run key, systemd service, or LaunchAgent), and beacons to a C2 with a DGA fallback of ten date-based domains, with all analyzed variants sharing the same embedded RSA key. The report includes full IOCs (C2 IPs, payload hashes, host artifacts, DGA domains) and remediation guidance for CI/CD and developer environments that built the malicious versions.
What it is
A build-time supply chain attack (disclosed August 20, 2026) against three legitimate Rust crates maintained by David Roundy (droundy): arrayref@0.3.10, internment@0.8.7, and append-only-vec@0.1.9. Each republished release added a dependency on proc-macro1 (= "1.0.107"), a typosquat of proc-macro2 whose build.rs executes automatically during Cargo compilation. The Rust Security Response Team removed the releases and locked the account, believing the maintainer's machine or crates.io credentials were compromised rather than the maintainer acting maliciously.
How it works
The compromised crates contain no obviously malicious code — the payload lives in proc-macro1's build.rs, which Cargo runs during compilation without the application importing anything. The loader reconstructs Base64-split C2 addresses, detects OS/architecture, disables TLS certificate verification, downloads a platform-specific payload from 23[.]254[.]165[.]112:9089, and runs it passing 23[.]254[.]165[.]112:443 as the C2 endpoint. The IP is not embedded in stage-2 — it is passed at runtime, letting the actor rotate infrastructure without rebuilding implants.
Stage-2 drop paths:
- Linux/macOS:
/tmp/rust-setup(made executable, launched detached) - Windows:
%TEMP%\rust-setup.ps1and%TEMP%\rust-setup-launch.vbs, launched viawscript.exerunning hidden PowerShell withExecutionPolicy Bypass
The backdoor profiles the host, inventories Chromium browsers (login origins, usernames, extension IDs — it does not decrypt stored passwords in the analyzed stage), persists via HKCU Run key / systemd user service / LaunchAgent, and beacons to /49890878. If the primary C2 is unreachable it falls back to ten deterministic date-based .com DGA domains and permanently adopts the first responsive one.
Preconditions / Affected
Any system that built one of the three malicious versions — a normal cargo build is sufficient; no runtime execution of the crate is needed. The actor also yanked older legitimate arrayref releases to steer resolution toward malicious 0.3.10 (later restored).
What to do
Treat any host that built an affected version as potentially compromised. Related actor-controlled packages removed from crates.io: proc-macro-en (contained the same malicious build.rs as proc-macro1@1.0.107), plus staging clones aovine, arone, aronenao, and tinymember. Hunt for the drop paths above, the beacon URI, and the C2 IP.
Key IOCs:
- C2 / payload host:
23[.]254[.]165[.]112(ports9089download,443C2) - Beacon path:
/49890878
Caveats
Socket found little anti-analysis beyond the Base64-split infrastructure. The same RSA private key is embedded across all recovered payloads with no exclusive operator authentication; combined with the predictable DGA this enables defensive sinkholing and victim identification — but Socket explicitly warns defenders should not issue commands to third-party systems.
Organisations named here
- droundy
- Nextron Systems
- Rust Security Response Team
Technologies named here
- Socket AI scanner
- arrayref
- Cargo
- internment
- append-only-vec
- RustSec
- proc-macro1
- crates.io
- proc-macro-en
- aovine
- arone
- aronenao
- tinymember
- Linux x86-64 systems
- Windows x86-64 systems
- macOS x86-64 systems
- macOS ARM64 systems
- Rust
- PowerShell
Techniques named here
- Typosquatting / dependency confusion
- Malicious build script execution
- Base64-obfuscated C2 address reconstruction
- TLS certificate verification disabling
- Detached/hidden process execution
- User-level persistence
- Domain Generation Algorithm fallback
- Credential/publishing account compromise
- Version yanking to steer dependency resolution
- Browser data reconnaissance
- Runtime C2 address delivery
Threat actors named here
- Unnamed threat actor
- Cross-platform Rust supply chain backdoor
Related in Supply Chain


