Basic implementation of a binary file visualization algorithm. The idea is to generate a visual representation of a binary file, in order to have a quick overview of its content.
Link to the Christopher Domas's video
Here is the explanation of the
main.rs
file.
We get the raw byte data from a file :
let slice = load_file(file_path);
Then calculate a map (of 256x256 pixels) using slice parcour with a window size of 2 bytes :
let mut map = Map256::zeros();
generate_visualization(&slice, &mut map);
Finally, we generate an RGB image from the map and save it :
let img: RgbImage = map_to_image(&map);
img.save(&args.output).unwrap();
Output example (using rust exec as input) :
# run locally from the root of the project
cargo run -- -p ./target/debug/bvtool
- Christopher Domas - The future of RE Dynamic Binary Visualization
- ppm P6 format (for V0, now it's using png format)
- Corte.si - entropy in raw bin files (for next steps)
WIP
Actually I'm working on creating a large and diverse dataset of binary files representations. It aims to be used for training a neural network to recognize the type of file from its visual representation or other applications.
- [IMG] Car
- [IMG] Cat + Faces
- [IMG] Bitmap
- [AUDIO] Speech emotions -> .wav
- [EXEC] All my executables in my $PATH dirs (ARM)