How can you reverse engineer a binary saving file?

I was asked to process some files serialized as binary (not text / JSON, unfortunately) Thrift objects, I have access to the program or programmer who created the files, so I have no idea about their structure, field orders, etc. d. Is there a way to use Thrift libraries to open a binary file and parse it, get a list of field types, values, nesting, etc.?

+5
source share
1 answer

Unfortunately, it seems that the Thrift binary protocol does not tag data very much; for decoding it seems that you have a .thrift file in your hand so you know, say that the next 4 bytes should be integers and are not really the first half of the float. So it seems you were stuck mostly looking at files in a hex editor (or equivalent) and trying to infer fields based on the exact patterns you see.

There are very few useful bits:

, . 6 , ( , ) 4 . ( TProtocol.h Thrift, , 2, UTF-8 16 ..), 4 , (1 ) 4 . , big-endian, IEEE (, , .)

TBinaryProtocol * Thrift ; , , , , .

, , , , , , , Thrift; , , , , , .

+7

All Articles