Formats

August 3, 2007 at 4:12 am Leave a comment

Cracking formats doesn’t seem be too hard.  I figured out most of the simple 16-color bitmap this afternoon using a hex editor.  It’s pretty simple.  Create a bunch of files of a format of your choosing.  Open these up in a hex editor (my pick is XVI32, a great freeware editor), and take a look at how the file is structured.  Find out what numbers represent and changes that take place in the hex when you change the file (coloring pixels, changing width, etc.).  Then you can see what parts of the file do.  Find out what changing numbers represent, when you mess around with the files these will change.  You have to see how these changes will work in the file.  A description of file size might only take up one byte in one instance, but if the file gets bigger it might take up a few bytes.  Of course, most formats have been explored already, and in great depth.  I ran into a few problems with my hacking of the bitmap, because I was forgetting the whole issue of palettes and compression, but you can learn a lot about a file by looking at it in a hex editor.  Change things with the hex, and look at changes in the file.  When you discover functions of the hex, make sure you write it down.  Here’s some documentation I did on bitmaps.  I have a more full explanation of what I discovered on another computer, but here’s a template for your file:

–Bitmap File Info–
Byte Structure:
Header- 42|4D|C6
File Size- 3rd address and more, ab|cd=cd|ab
Height- 12th address
Width- 16th address
Pixels, bytes before final 3 bytes-Stores two pixels per byte. End of file starts at top-right.

Colors:
0- Black
1- Dark Red
2- Dark Green
–EOF– 

If you’re interested in the bitmap format there are some very good guides, here’s one that is very informative and useful if you need to use the bitmap format.  For more information on formats visit Wotsit, or if you want to get into reverse engineering see this excellent wikibook.

Cheers,

Ivan

Advertisements

Entry filed under: Computers, Hacking, Internet, Programming, Software, Technology.

Writing a Virus Scanner (Part 1 of 2) MyPodcast.com, Free Podcasting Service

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


August 2007
M T W T F S S
« Jul   Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Contact

vainentree@gmail.com

%d bloggers like this: