Log in

View Full Version : Extracting java classes from exe ?


MrSmith
June 18th, 2006, 11:36
Hi everybody,

there are some utilities around that pack java class and jar files into an executable. One of these is exe4j . The resulting executables can not be opened with Winzip, as it is the case with some other jar2exe utilites.

So does anybody know how to extract jar and class files that are "packed" with this utility ?

MrSmith

P.S. This time without links :-)

dELTA
June 18th, 2006, 12:54
If the program compiles the java code into native code, the answer is no. If it just wraps it, then yes, there is a good chance you should be able to dump them.

MrSmith
June 19th, 2006, 06:06
exe4j does not compile the classes into native code. I know this, since the program crashed on one occasion and the jvm produced an error log showing in which class the error occurred.

But that does not really help me to extract the class files. Any idea how to go about this ?

MrSmith

dELTA
June 19th, 2006, 09:31
Ok, that's a good first step. Then I suggest you read the following thread, which should give you a pretty good idea about what to do next:

http://www.woodmann.com/forum/showthread.php?t=1692

OHPen
June 19th, 2006, 17:04
lo mRsMITH,

finally it's rather easy in the most cases. If the author of your target applications uses some custome made stuff then in most cases you will find the classes inside a jar package which is included in the resource of the concerning exe file. Then you have a rather simple job and it can be done by using a resource editor like ResourceHacker or any other appropriate tool.

I have seen other commercial software, but not well know product, which probably are written by some reverse engineer which uses additional sections added to the target exe file which containing the encrypted jar or class files.
Then they get dycrypted by runtime which using the dynamic class loader of java. In this case is kind of "FiZZLEDiZZLE" to extract all need classes 'cause you have to dump the encrypted streams out of memory.

But it's not unpossible. You only need to have a bit patience
If you PM me your target i will take a look, maybe i can help you to extract all needed files.

Regards,

PAPiLLiON aka OHPen aka PiTcH_SiLoW

MrSmith
June 20th, 2006, 02:48
Hi OHPen,

no, unfortunately the classes are not included as resources :-(
It would be great if you could have a look at the target. It's the demo version of [I'M A MORON WHO DIDN'T READ THE FAQ AND DON'T KNOW WHAT "PM ME" MEANS]

Cheers,
MrSmith

LLXX
June 20th, 2006, 03:14
READ THE FAQ! Do NOT post TARGET NAMES!

OHPen
June 20th, 2006, 08:14
Hrhr,

i like the "MORON" - insertion spell

SKiLLa
June 25th, 2006, 16:24
If it's a Visual J++ compiled app you can use J++ Extracter to extract the packages ... otherwise you'll probably have to dump manually; good luck !

I upped J++ Extractor here: hxxp://www.megaupload.com/?d=V5UVEQ0B

rpgiacon
December 17th, 2008, 16:35
exe4j extracts the jar file to a folder in your temp folder, named 4j(and a random number)... i searched for a unpacked before but unpacking is a bit anoying when it is just not compressed... u cant just uncompress because 4j mix 2 jars and a dll to make the not executable jar to run as a exe