📚 OpenRCE is preserved as a read-only archive. Launched at RECon Montreal in 2005. Registration and posting are disabled.








Flag: Tornado! Hurricane!

 Forums >>  Brainstorms - General  >>  Compression

Topic created on: December 22, 2006 16:23 CST by phossal .

[Edited]

  igorsk     December 22, 2006 18:49.18 CST
Here's a little tutorial on how to recognize some of the common compression algorithms:
http://sekai.insani.org/archives/24
You can also: a) upload a sample somewhere for us to have a look or b) disassemble the application and try to reverse the algorithm

  phossal     December 22, 2006 19:46.12 CST
[Edited]

  drew     December 22, 2006 20:17.18 CST
Great link Igor.

It would be nice to add compression-detection to Ilfak's encryption-detection IDA plugin, FindCrypt.  There's also an OllyDbg port of FindCrypt.  Looking at the list, FindCrypt already detects zlib.  Adding in the other compression routines form Igor's link probably wouldn't be too difficult.

  phossal     December 25, 2006 16:46.05 CST
[Edited]

  phossal     December 26, 2006 06:58.16 CST
[Edited]

  PSUJobu     December 27, 2006 09:17.16 CST
Welcome to "File Format Reverse Engineering", a subset of the larger RE field. While it is often possible to learn a great deal about a file's format in a hex editor, when compression and/or encryption are involved, it is generally easier (for an experienced reverse engineer) to determine the algorithms by looking at the code (generally only available in assembly via a disassembler such as IDA Pro).

You need to open the application that created your file into IDA Pro, not the file itself. The file is unlikely to contain any code, as you have already found. You also need:

* A solid understanding of low-level machine architecture. It doesn't matter how many HLLs you know (though that often helps) if you don't know that 1 + 1 is sometimes 10. I have seen many good C++ / Java programmers fail to grasp RCE during an in-depth two week course.

* A good understanding of assembly language (in general, although specific knowledge of assembly for the processor the application runs on is a big "leg up").

* A disassembler and/or a debugger. If you're talking a host-based application (e.g., Windows or Unix program), you're way ahead of the game in that you can use a debugger.

* Good troubleshooting and problem-solving skills.

* Time. The problem you speak of sounds fairly trivial for an experienced reverse engineer (e.g., a few days to two weeks); however, many of us have built careers on learning and enhancing our RE knowledge. RCE projects can take anywhere from 15 minutes (e.g., quick triage of a new virus or worm) to multiple years, depending on the difficulty, goals, ...

Have fun!

PS - The application that creates the file would be more useful to someone like me than the file itself. It can take man years to reverse engineer the file format using only the file, and perhaps an hour or two to find and analyze the compression routine(s) by looking at the application.

PPS - I'm not volunteering to do the job -- I don't get paid for that, and prefer to spend my free time in other ways...  :)  Just trying to give some guidance.

  anonymouse     December 27, 2006 12:18.34 CST
I havent reversed any static file format yet
but like psujobu says above the most easy way out is to find the app that either created it or that uses it catch it when it is either writing it or reading it and then poke around those functions  

some where there has to be a CreateFile, WriteFile ,_lopen ,_lread , fread ,fwrite , NtCreateFile, NtWriteFile, int 0x80 , whatever it takes
and once you get hold of it you can make better sense
instead of feeling around in dark with some unknown file

Note: Registration is required to post to the forums.

There are 31,328 total registered users.


Recently Created Topics
[help] Unpacking VMP...
Mar/12
Reverse Engineering ...
Jul/06
let 'IDAPython' impo...
Sep/24
set 'IDAPython' as t...
Sep/24
GuessType return une...
Sep/20
About retrieving the...
Sep/07
How to find specific...
Aug/15
How to get data depe...
Jul/07
Identify RVA data in...
May/06
Question about memor...
Dec/12


Recent Forum Posts
Finding the procedur...
rolEYder
Question about debbu...
rolEYder
Identify RVA data in...
sohlow
let 'IDAPython' impo...
sohlow
How to find specific...
hackgreti
Problem with ollydbg
sh3dow
How can I write olly...
sh3dow
New LoadMAP plugin v...
mefisto...
Intel pin in loaded ...
djnemo
OOP_RE tool available?
Bl4ckm4n


Recent Blog Entries
halsten
Mar/14
Breaking IonCUBE VM

oleavr
Oct/24
Anatomy of a code tracer

hasherezade
Sep/24
IAT Patcher - new tool for ...

oleavr
Aug/27
CryptoShark: code tracer ba...

oleavr
Jun/25
Build a debugger in 5 minutes

More ...


Recent Blog Comments
nieo on:
Mar/22
IAT Patcher - new tool for ...

djnemo on:
Nov/17
Kernel debugger vs user mod...

acel on:
Nov/14
Kernel debugger vs user mod...

pedram on:
Dec/21
frida.github.io: scriptable...

capadleman on:
Jun/19
Using NtCreateThreadEx for ...

More ...


Imagery
SoySauce Blueprint
Jun 6, 2008

[+] expand

View Gallery (11) / Submit