Monday, December 18, 2006
Java Decompilers Compared
The object of a Java decompiler is to convert Java class files into Java source code. In the chaotic world of software development there are many reasons, legitimate and otherwise, to wish for such a tool. Decompilers can save the day when you have the binary for your own code, but have misplaced or otherwise lost the corresponding source code. On the other hand, decompilers are the prized components of any good software piracy kit. Most often, however, decompilers help programmers clarify poor documentation (one decompiled function is worth a thousand words) or provide a means for creating not-yet-written documentation. When was the last time you thought the documentation for any software was complete and correct?
In any case, the transparent and information-rich structure of Java class files -- a feature that makes Java's dynamic linking much better than previous models -- also makes such tools particularly easy to build. In fact, there is an arms race brewing between decompilers and so-called obfuscators, which profess to provide Java code some measure of protection from decompilers. In essence, obfuscators remove all non-essential symbolic information from your class files and, optionally, replace it with fake symbolic information designed to confuse the decompiler. Crema, the companion obfuscator to the Mocha decompiler, was examined in detail in the December issue of JavaWorld. (See the Resources section at the end of this column for a link to this article and to several obfuscator products.)
In any case, the transparent and information-rich structure of Java class files -- a feature that makes Java's dynamic linking much better than previous models -- also makes such tools particularly easy to build. In fact, there is an arms race brewing between decompilers and so-called obfuscators, which profess to provide Java code some measure of protection from decompilers. In essence, obfuscators remove all non-essential symbolic information from your class files and, optionally, replace it with fake symbolic information designed to confuse the decompiler. Crema, the companion obfuscator to the Mocha decompiler, was examined in detail in the December issue of JavaWorld. (See the Resources section at the end of this column for a link to this article and to several obfuscator products.)
JAVA BYTECODE DECOMPILERS
Decompilers that read Java bytecode programs usually decompile to Java, since that is the language that the majority of such programs are written in. However, the source language could have been any of a large number of languages; see [other languages for the Java VM.
Jdec is a Java decompiler. It can be used to decompile the bytecodes present in a .class file to produce a Java source file which can be nearly correct or equivalent (due To different interpretations) to the original Java source. It also has a good UI. It is hosted on SourceForge. Currently Jdec is licenced under GPL. Visit the home site for any updates and current status.
JODE is an open source Java decompiler and obfuscator. Hosted on SourceForge under the GPL license. The core decompiler is under the LGPL, meaning that you can use it in a commercial decompiler. Written in Java. For tests see DecompilationJodeTest.
Jad (Jad - the fast JAva Decompiler) is a decompiler that is free for non commercial use. Source code is not provided. Its decompilation engine is used in numerous graphical front ends, including FrontEnd Plus, Decafe Pro, DJ Java Decompiler, and Cavaj. For tests see DecompilationJadTest.
Dava is a research decompiler that recovers types well and has been tested against non-Java bytecode programs.
The Mocha decompiler for Java .class files. You can use crema to scramble symbolic information in the .class files.
SourceTec Java Decompiler (formerly the Jasmine Java Decompiler) is a patch to Mocha, a well known decompiler. It is now very old; it only works on Java 1.1 classfiles. For tests see DecompilationStTest.
JReversePro is an open source Java decompiler written in Java.
SourceAgain is one of the better known commercial Java decompilers.
ClassCracker 3 is another commercial Java decompiler.
Decaf was a decompiler for Java .class files written in Ada95. Decompilers to Ada95 and Smalltalked were planned. The page was at http://ourworld.compuserve.com/homepages/teleobjet/decaf.htm. You may be able to access an archived copy at archive.org.
DCompiler (also known as JADO) is yet another Sourceforge open source decompiler; this one is in very alpha status. It will not decompile even the simplest test programs, so no tests have been performed.
WingSoft have a decompiler called WingDis and an obfuscator called WingGuard (see their products page).
The JReveal decompiler (www.jreveal.org) seems to be the Jasmine decompiler (version 1.1 of Mocha), with a web based GUI front end. I could not get the decompiler to work for me (Jan 2003), but you may have better luck. There is a small online paper and some examples; it looks like a really handy tool.
Jdec is a Java decompiler. It can be used to decompile the bytecodes present in a .class file to produce a Java source file which can be nearly correct or equivalent (due To different interpretations) to the original Java source. It also has a good UI. It is hosted on SourceForge. Currently Jdec is licenced under GPL. Visit the home site for any updates and current status.
JODE is an open source Java decompiler and obfuscator. Hosted on SourceForge under the GPL license. The core decompiler is under the LGPL, meaning that you can use it in a commercial decompiler. Written in Java. For tests see DecompilationJodeTest.
Jad (Jad - the fast JAva Decompiler) is a decompiler that is free for non commercial use. Source code is not provided. Its decompilation engine is used in numerous graphical front ends, including FrontEnd Plus, Decafe Pro, DJ Java Decompiler, and Cavaj. For tests see DecompilationJadTest.
Dava is a research decompiler that recovers types well and has been tested against non-Java bytecode programs.
The Mocha decompiler for Java .class files. You can use crema to scramble symbolic information in the .class files.
SourceTec Java Decompiler (formerly the Jasmine Java Decompiler) is a patch to Mocha, a well known decompiler. It is now very old; it only works on Java 1.1 classfiles. For tests see DecompilationStTest.
JReversePro is an open source Java decompiler written in Java.
SourceAgain is one of the better known commercial Java decompilers.
ClassCracker 3 is another commercial Java decompiler.
Decaf was a decompiler for Java .class files written in Ada95. Decompilers to Ada95 and Smalltalked were planned. The page was at http://ourworld.compuserve.com/homepages/teleobjet/decaf.htm. You may be able to access an archived copy at archive.org.
DCompiler (also known as JADO) is yet another Sourceforge open source decompiler; this one is in very alpha status. It will not decompile even the simplest test programs, so no tests have been performed.
WingSoft have a decompiler called WingDis and an obfuscator called WingGuard (see their products page).
The JReveal decompiler (www.jreveal.org) seems to be the Jasmine decompiler (version 1.1 of Mocha), with a web based GUI front end. I could not get the decompiler to work for me (Jan 2003), but you may have better luck. There is a small online paper and some examples; it looks like a really handy tool.
Subscribe to:
Posts (Atom)