Future Work and Available Projects


Sable Home

JBCO: the Java ByteCode Obfuscator

Overview top

JBCO is a Java bytecode obfuscator. Obfuscators transform code to be more complex, esoteric, or otherwise obscure in order to hinder reverse-engineering nad decompilation attacks. JBCO is able to operate on Java class files or source and produces obfuscated Baf, Jasmin, or class files. It uses Soot's advanced typing and flow analysis framework to perform powerful new obfuscations. JBCO has been shown to cause failure or crashes in two of the more modern decompilers Dava and SourceAgain.

Examples of the various obfuscations and how well modern decompilers are able to handle them can be seen at the examples page. Also included are "challenge" classes which have been heavily obfuscated for those trying to build better decompilers.

Detailed information regarding the implementation of JBCO and its various obfuscations can eventually be found in Michael Batchelder's Msc thesis, which has not yet been completed. For now, you can peruse the tech report Obfuscating Java: The most pain for the least gain.

Documentation top

JBCO is built on top of the Soot framework. It is therefore useful to become familiar with Soot and its options. JBCO is run through its own main method and has its own options. Each individual obfuscation can be enabled or disabled - as a whole or by method. To see a list of all available transformations (and their command-line flags) run JBCO with the -help flag. All transformations are enabled by adding the following command-line option:


Where W is a weight, name is the transformation name, and exp is an optional regular expression. Weight specifies how often to apply the transformation. Legal weights are between 0 (no effect) and 9 (full effect). If no weight is specified, a weight of 9 will be used by default. The optional regular expression limits the transformations to those methods which match the regular expression. The regular expression should match the fully qualified name, including class and parameters (e.g. Java.lang.String.toString(int) ). To match all "toString" methods, simply use the expression ".*\.toString\(.*". An example command-line for obfuscating all class, method, and field names of the program "Example" (where Example is the class with the entry point "main" method) is as follows:

java soot.jbco.Main -w -t:wjtp.jbco_cr -t:wjtp.jbco_mr -t:wjtp.jbco_fr -app Example

In addition to the command-line, JBCO also has a GUI frontend. This can be started by running soot.jbco.gui.JBCOViewer. No options are necessary.

Publications top

Download top

To obtain JBCO you need to download Soot. Install the latest Soot release or checkout the latest copy from the Subversion repository. Use java soot.jbco.Main -help for JBCO help and java soot.jbco.Main --help for Soot help.

For instructions on how to install soot in eclipse see Soot-in-Eclipse.

Alternately if you are a developer for Soot or JBCO you might want to use Eclipse along with SVN. Soot-in-Eclipse-with-SVN

Future Work and Available Projects top

This section serves as a wishlist for features add/or improvements to JBCO. Students interested in joining Professor Hendren's group should review potential research areas listed below and contact her at hendren AT cs DOT mcgill DOT ca. To contribute to JBCO or to suggest features to be added please contact Professor Hendren or Michael at mbatch AT cs DOT mcgill DOT ca. Please note that JBCO bugs should be reported at Soot Bugzilla