News for hackers. Stuff that matters.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by OneOneOneOne on Wednesday April 08, 2015 @04:46PM (#9343850)
"Not in here mister! This is a Mercedes!"

Can anyone recommend a good tool for exploring and decoding other binary formats? I am interested in analysis of non-code binary data.

Re:BARF – A Binary Analysis and Reverse Engineering Framework by galapago on Wednesday April 08, 2015 @04:55PM (#9343917)
Maybe binglide (https://github.com/wapiflapi/binglide). A few alternative are also detailed in its README
Re:BARF – A Binary Analysis and Reverse Engineering Framework by guiambros on Wednesday April 08, 2015 @09:34PM (#9345324)
What a great project. Thanks for sharing.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by jakobdabo on Wednesday April 08, 2015 @04:57PM (#9343926)
Sweetscape's 010 Editor [1] is very nice, but it's not free.

[1] http://www.sweetscape.com/010editor/

Re:BARF – A Binary Analysis and Reverse Engineering Framework by dr_zoidberg on Wednesday April 08, 2015 @05:09PM (#9344019)
What binary formats are you interested in? For my graduate thesis I had to read a lot about JPG, PNG, SQLite3 and MS-OLE file formats and I could give you some references to read from and shamelessly link to my github project where you can find some tools related to this (and others) file formats.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by pmorici on Wednesday April 08, 2015 @06:02PM (#9344361)
How would you diagnose an unknown compression format? That's a problem I've encountered recently and I'm hoping there is an easier way than stepping through the reference compressor in a debugger.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by Kalium on Wednesday April 08, 2015 @06:43PM (#9344618)
If you're looking to find out what it is and what's in it, there are some very flexible unpackers out there. Titanium Core from Reversing Labs is excellent.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by pmorici on Wednesday April 08, 2015 @08:40PM (#9345128)
I've already know what it is, and it isn't maleware or a packer. What I'm looking for is something that can do analysis on a bit of data and say what compression scheme is likely used.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by Kalium on Wednesday April 08, 2015 @10:34PM (#9345524)
Ah. Well, the product I mentioned can usually identify packing schemes and unpack them. Commercial close-source, though.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by OneOneOneOne on Wednesday April 08, 2015 @05:19PM (#9344070)
I work in and around embedded software. Custom API's and internal dumps often contain custom binary formats.

A tool that interactively generates a parser for these would be great.

Re:BARF – A Binary Analysis and Reverse Engineering Framework by dr_zoidberg on Wednesday April 08, 2015 @05:42PM (#9344218)
For "free exploring" of formats I usually dive with the IPython interpreter and a bunch of modules, struct and array are helpful for packing/unpacking of values.

With struct you write a string that describes the data and the modules packs/unpacks the bytes. For example you can do: struct.unpack(">4sBhLq", data) and you are asking struct to parse a 19 byte long string, data (it has to be strictly 19 btyes), because you expect the following:

* ">" big endian data * "4s" a 4 byte field to read as a string * "B" one unsigned byte * "h" one signed short (2 bytes) * "L" one unsigned long (4 bytes) * "q" one signed quad (8 bytes)

I haven't read of anything that's automatic, if you have the API or some docs this is the closest I can think of. Of course, the online help of Python covers this module to greater detail: https://docs.python.org/2/library/struct.html

Re:BARF – A Binary Analysis and Reverse Engineering Framework by andrewchambers on Wednesday April 08, 2015 @06:13PM (#9344441)
https://github.com/construct/construct This is the best thing I have ever used for parsing binary file formats.
Re:BARF – A Binary Analysis and Reverse Engineering Framework by moyix on Wednesday April 08, 2015 @10:15PM (#9345472)
Construct is lovely. I've used it on everything from MS debug symbols [1] to talking with USB devices [2].

[1] https://github.com/moyix/pdbparse

[2] https://github.com/moyix/fbtools

Re:BARF – A Binary Analysis and Reverse Engineering Framework by dr_zoidberg on Wednesday April 08, 2015 @07:24PM (#9344842)
That looks very interesting!
Re:BARF – A Binary Analysis and Reverse Engineering Framework by andrewchambers on Wednesday April 08, 2015 @07:34PM (#9344899)
The examples are really cool, checkout the elf executable binary parser https://github.com/construct/construct/blob/master/construct... or the png parser https://github.com/construct/construct/blob/master/construct....
Re:BARF – A Binary Analysis and Reverse Engineering Framework by sweetbinary on Thursday April 09, 2015 @02:18AM (#9346015)
"Hachoir" is also very good, It allows you to "browse" and edit any binary stream just like you browse directories and files. A file is split in a tree of fields, where the smallest field is just one bit. Has parser for jpeg, png and many more. Written in python:

https://bitbucket.org/haypo/hachoir/wiki/Home