Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not sure if this question was asked. I searched for it and could not find it.

How can I unpack a compressed executable without knowing what compression algorithm was used to compress it?

For instance, if I receive a random executable and it was compressed with a self written compression algorithm (one that is not common by any means), is there a tool or way to unpack this?

share|improve this question
This is assuming there is no decompression code packed with it – Marc M Nov 15 '12 at 16:55
If it had no decompression code in it then how it would it decompress itself when executed? – Dan D. Nov 15 '12 at 17:11
I was researching lossless compression and it mentioned that with the proper decompression program or if the decompression code is packaged with the packed executable, you can decompress it to recreate the executable to its original state. But if you don't have either of those associated with the packaged executable how do you decompress and unpackage it? So in response to your question, yes how would it decompress itself when executed and would you even be able to execute it? – Marc M Nov 15 '12 at 17:16
About the best you could do is try to uncompress it with different decompressors and if they don't error-out you might then be able to look for some kind of OS-specific executable header in the output to verify the result. That wouldn't work for some custom arbitrary algorithm however since you would have any idea how to decompress it. – martineau Nov 15 '12 at 17:56

You must log in to answer this question.

Browse other questions tagged .