Aaron Portnoy (deft) <aportnoy tippingpoint com> |
Tuesday, June 27 2006 11:38.28 CDT |
Thought it might be useful to visualize what a file format would look like as an image to identify blocks of similar data.
Could be useful for more effective file format fuzzing and whatnot. Here's the output when run on putty.exe:
bash-2.03$ python.exe image_gen.py putty.exe
Aaron Portnoy - Binary2Image
-----------------------------
[*] Attempting to identify blocks...
[+] Block found from 2 to 53.
[+] Block found from 5 to 56.
[+] Block found from 6 to 57.
[+] Block found from 32 to 83.
[+] Block found from 47 to 98.
[+] Block found from 69 to 120.
[+] Block found from 71 to 122.
[+] Block found from 75 to 126.
[+] Block found from 77 to 128.
[+] Block found from 115 to 166.
[+] Block found from 117 to 168.
[+] Block found from 120 to 171.
[+] Block found from 123 to 174
...
[+] Block found from 8942 to 9008.
[+] Block found from 8944 to 9010.
[+] Block found from 8950 to 9015.
[+] Block found from 8971 to 9045.
[+] Block found from 8990 to 9089.
[+] Block found from 9069 to 9173.
[+] Block found from 9073 to 9175.
[*] Creating image...
[*] 25% complete...
[*] 50% complete...
[*] 75% complete...
[*] 100% complete...
[*] Resizing image...
[*] Saving image...
[*] Image saved successfully as output.png
bash-2.03$
Results in:

The yellow are 0x00, dark blue are within ASCII, light blue is 0x20, and gray are everything else.
The code is very basic at the moment, and I've done a lot of development since this, but here's the source used to create that image: http://deft.thunkers.net/code/image_gen.py_
|