Some-Java-Obfuscator
Some-Java-Obfuscator copied to clipboard
Some java obfuscator I made to test out transformer ideas
trafficstars
Some Java Obfuscator
A modified version of cheatbreaker-obf to test out some ideas I had
Features
Native obfuscators shouldn't be used for production
- StripTransformer
Strips debug information from classes, methods and fields
- ChecksumTransformer
Inserts block of code inside configurable class which will check if the target method is modified, uses modified asm to check constant pool and method bytecode
- InlinerTransformer (Disabled)
Tries to inline methods, does need massive improvements
- VariableTransformer
Just converted local variables to java.lang.Object[]
- ConstantPoolTransformer (Unstable)
Uses native method to modify constant pool and applies some simple number obfuscationUses basic xor encryption which shows the key it would be best to change it
- CodeHiderTransformer (Unstable)
Uses natives to hide method bytecode from the code attribute
- PackerTransformer
Packs classes into a single file which are loaded afterwards
- ToStringTransformer
Saw something cool in a source obfuscator and decided to implement it, converts strins to new Object() { toString... return "String" }.toString()
- ExceptionTransformer
Turns local storing to storing of exception objects
Disclaimers
- CodeHider
- won't go over exceptions
- skips methodhandle and class ldc
- skips synthetic methods
- breaks on classes with generated methods
- can break randomly due to constant pool not being updated when generating bytes
Usage
You use the obfuscator by creating a config file much like the one provided and parsing it through command line
java -jar obfuscator.jar --config config.yml
Screenshots
String Obfuscation

Variable Obfuscation

Inliner Obfuscation

Checksum Obfuscation

ConstantPool Obfuscation (Unstable)

Packer Obfuscation

Code Hider Obfuscation (Unstable)

Exception Obfuscation

Credits
- cheatbreaker-obf for base
- most of utils methods aren't mine
- yaml classes for config stolen from bukkit