← 返回列表

Rust Supply Chain Attack on arrayref: Significant Overlap with DPRK Campaigns

单站 Wiz Blog 作者 Rami McCarthy 发布 Thu, 20 Aug 2026 15:56:39 GMT 入库 2026-11-18T05:29:58

On August 20, 2026, malicious versions of three Rust crates were published to crates.io: arrayref@0.3.10, internment@0.8.7, and append-only-vec@0.1.9. The malicious crates added a typosquatted dependency (proc-macro1) whose build script downloads and executes a remote binary. Notably, proc-macro1 was the first dependency added to arrayref in its ten-year history.

Because build scripts run during compilation, building an affected project was sufficient to execute the payload. arrayref can be found in over 35% of all environments. Even more notably, it's used in ¾ of all environments where Rust is present.

The Rust Security Response Team deleted the malicious versions and locked the account, and assesses that the maintainer's machine or credentials were compromised.

Wiz customers should review our Threat Intel Center advisory: arrayref and Other Rust Crates Hijacked in Supply Chain Attack

The impacted package versions add a malicious dependency to the Cargo.toml:

[dependencies]
proc-macro1 = "1.0.107"

proc-macro1 is a typosquat of the legitimate proc-macro2 crate (154M+ downloads). Its build.rs contains the malicious logic. Because Cargo executes build scripts at compile time, building a project that depends on proc-macro1 is sufficient to trigger the payload.

At compile time, the build script:

  1. Reconstructs a C2 URL from Base64 fragments (e.g. https://23.254.165[.]112:9089/)
  2. Disables TLS certificate validation via a custom AcceptAll verifier
  3. Downloads a platform-specific payload based on OS and architecture
  4. Writes it to /tmp/rust-setup (Unix) or %TEMP%\rust-setup.ps1 (Windows)
  5. Executes the payload, passing the C2 beacon address as an argument

The build otherwise completes and the package functions normally. The second stage payload is selected based on the platform, with support for x86_64 versions of Linux, Windows, and macOS, in addition to aarch64 macOS.

Wiz Research was able to analyze the malicious Rust crates, retrieved from Google Threat Intelligence. The implant is a featureful backdoor that:

Configuration is encrypted with AES-128-GCM using the hardcoded key i am botking. Commands are authenticated via an embedded RSA-2048 private key.

The arrayref infrastructure substantially overlaps with operations attributed to recent North Korean actors.

Shared C2 endpoint pattern: The arrayref payloads beacon to /49890878. This endpoint has been used in the Mastra campaign, attributed by Microsoft to DPRK / Sapphire Sleet. The IP address used in the arrayref beacon also shares an SSL issuer (WIN-A6QF8AHPQH1\Administrator@WIN-A6QF8AHPQH1) with 23.254.167[.]13 - also used in the Mastra campaign.

Victim-reported infrastructure overlap: A victim has reported C2 traffic to 23.254.167[.]216. This IP appears in Google Cloud Threat Intelligence's analysis of UNC1069's axios npm attack, which Mandiant links to North Korea.

Preferred Host: Both campaigns generally use the same 23.254.164.0/23 range of Hostwinds LLC infrastructure we see repeated in this incident.

Wiz customers should review our Threat Intel Center advisory: arrayref and Other Rust Crates Hijacked in Supply Chain Attack.

find ~/.cargo/registry/cache -type f \( \
  -name 'arrayref-0.3.10.crate' -o \
  -name 'internment-0.8.7.crate' -o \
  -name 'append-only-vec-0.1.9.crate' -o \
  -name 'proc-macro1-*.crate' -o \
  -name 'proc-macro-en-*.crate' -o \
  -name 'aovine-*.crate' -o \
  -name 'arone-*.crate' -o \
  -name 'aronenao-*.crate' -o \
  -name 'tinymember-*.crate' \
\) -print

Category Indicator Details
Package arrayref @0.3.10 Hijacked release
Package internment @0.8.7 Hijacked release
Package append-only-vec @0.1.9 Hijacked release
Package proc-macro1 Typosquat of proc-macro2, all versions deleted
Package proc-macro-en Attacker-controlled, all versions deleted
Package aovine Attacker-controlled, all versions deleted
Package arone Attacker-controlled, all versions deleted
Package aronenao Attacker-controlled, all versions deleted
Package tinymember Attacker-controlled, all versions deleted
SHA256 25ad700976873c76af785cb99b33c48db7df8b81f21d1e9e06b3676b9a9373ae arrayref-0.3.10.crate
SHA256 61198155da51b838772eecf5bfaac6cbc4dcc388dccc56658fc28a8e831b34d4 proc-macro1-1.0.107.crate
SHA256 b5c1b5b0763a8809a644a8f92224653f0aca623a98eecc714d27f74b80fbe436 proc-macro1-1.0.106.crate
SHA1 f22e3e01e38bcdf001f0d15a2dbfdec5a1cf8eff proc-macro1-1.0.107.crate
SHA1 f4767ad92cb61401fd69139cade563501c39b991 rust-crate_0.1.0, Linux stage-2 payload
SHA1 fc0fdb978eac72f4484b48db058e4473f1bc516e rust-crate_0.2.0, Windows stage-2 payload
SHA1 ff7e20cf642346bf893f1eca808df82035bb53d0 rust-crate_0.4.0, macOS arm64 stage-2 payload
IP 23.254.165[.]112:9089 Stage-2 payload host (Hostwinds VPS)
IP 23.254.165[.]112:443 C2 address passed to the payload as argv[1]
IP 23.254.167[.]107:443 Stage-2 C2, live at publication
Domain hwsrv-798836.hostwindsdns[.]com Attacker infrastructure hostname
Network POST /49890878 Stage-2 C2 request path
File /tmp/rust-setup Stage-2 payload, Unix
File %TEMP%\rust-setup.ps1 Stage-2 payload, Windows
File %TEMP%\rust-setup-launch.vbs Hidden Windows launcher, executed via wscript.exe
Binary rust-crate_0.1.0 / _0.2.0 / _0.3.0 / _0.4.0 Platform-specific stage-2 payloads on the payload host
Account dtolney Impersonation account, publisher of proc-macro1
Account droundy Legitimate maintainer; machine or credentials likely compromised, account locked as a precaution
rchaitm@gmail[.]com Forged author metadata in proc-macro1
原文链接:https://www.wiz.io/blog/rust-supply-chain-attack-on-arrayref-significant-overlap-with-dprk-campaigns