Overview of JCloaktm
What is
JCloak?
JCloak post-processes Javatm bytecode, encrypting
the symbol information to reduce the likelihood of reverse
engineering.
Java program symbol references are resolved by name, and
every method, field, and class in your Java program has a fully qualified name
stored in your Java class files. When your Java class references a method, the
Java Virtual Machine uses the fully qualified name of the method to locate the
class containing the method and the method itself.
JCloak encrypts these names without preventing the VM from running
your program.
Features
- New Project Wizard - Using JCloak's new project wizard you can quickly configure your
initial project. The wizard performs up-front analysis of the classes determining many of the correct obfuscation
settings for you. There is no need to work with complicated rules.
- Dead-code removal
- Java class files are often overweight: they can contain unnecessary symbolic names for constants, unused class names, etc. JCloak trims the fat, cleaning up the class files. JCloak can also scan your Applet's
references including only those classes required by the Applet, and
even remove unused methods from third-party libraries your Applet may
use.
- Support for Executeable JAR Files - The Java 2 runtime installation (JRE) enables Windows and Solaristm
users to execute a Java program by double clicking the Jar file. JCloak provides full support for this feature, generating
executeable Jar files from your program and packaging all the class even from third-party libraries together
as one executeable Jar.
- Obfuscates Applets,
Applications, Class libraries, Servlets, Beans - JCloak
automatically recognizes the type of program you
are obfuscating and determines the proper settings for Applets, Applications
and Servlets. Using powerful pattern matching directives you
can specify exclusion patterns to control the obfuscation of any
Java code.
- Support for Java 2 - JCloak runs under Java 2 and supports obfuscation of classes for
the Java 2 VM. This includes support for inner-classes and classes
compiled for Java 2 only (using 'javac -target 1.2').
- Automatic support for new JDKtm
1.1
".class primitive" - This primitive is described in the Java Language Specification Appendix D. JCloak detects use of this primitive and
automatically adjusts the results to match the class renaming.
- Support for automatically renaming
ResourceBundles - JCloak detects properties files and ResourceBundle
derived classes and renames them to match the obfuscated class
name. To take advantage of this feature you must reference your
ResourceBundle using the .class primitive to form the class name. For
example:
ResourceBundle myResources = getBundle(MyClass.class.getName());
- Automatic inclusion of resources -
JCloak can be instructed to search for resources (non-class files with
matching extensions) in a specified set of sub-directories from each
package's base path. For example if you include a .gif file resource
using the class loader as follows
Class cl = MyPanel.class;
ImageIcon anIcon = new
ImageIcon(cl.getResource("images/myicon.gif"));
JCloak will automatically include the myicon.gif in the
correct place in the output classes to allow the class loader to find and load
the resource.
The Obfuscation Process
Obfuscation, simply put, is the process by which JCloak encrypts the symbol information for all
internal references while leaving external
references
unchanged, whereas
- 1)Internal references
- include inter-class or intra-class references to
methods, fields or classes that are wholly contained within your application
- 2)External references
- references
to methods, fields or classes defined by classes outside of
your application (third party package libraries or the Java virtual machine
classes). Also included are methods, fields or classes defined by your
application that may themselves be referenced by classes outside of your
application (either directly or via overriding a method of a class defined
outside of your application)