sanitation

Crates.iosanitation
lib.rssanitation
version0.0.1
sourcesrc
created_at2023-10-27 00:39:20.124161
updated_at2023-10-27 02:09:46.097419
descriptiondata-types for capturing possibly malicious bytes - primarily intented for buffer-overflows mitigation
homepagehttps://github.com/gabrielfalcao/sanitation
repository
max_upload_size
id1015428
size10,230
Gabriel Falcão (gabrielfalcao)

documentation

https://docs.rs/sanitation

README

sanitation

data types for forensic analysis of protocol implementations et cetera.

Basic Design

Structs provide a garbage() method which returns potentially malicious bytes, particularly useful for detecting attempts to buffer-overflow in protocol implementations

cargo add sanitation

Mini Demo

// Based on https://www.exploit-db.com/exploits/51641
use sanitation::SString;
let general_device_manager = vec![0xeb, 0x06, 0x90, 0x90, 0x14, 0xd9, 0xc6, 0xbb, 0xae, 0xc7, 0xed, 0x8e, 0xd9, 0x74, 0x24, 0xf4];
let gdm = SString::new(&general_device_manager);

assert_eq!(gdm.garbage(), vec![235, 144, 144, 217, 174, 199, 237, 142, 217]);
assert_eq!(&gdm.soft_word(), "\u{6}\u{14}ƻt$");
Commit count: 0

cargo fmt