BReversed
A java bytecode deobfuscator
Install / Use
/learn @Exeos/BReversedREADME
BReversed
A java bytecode deobfuscator
Project Setup
Prerequisites
- java 21+
- git
Cloning Project & Dependencies
Clone BReversed and the required dependencies:
git clone https://github.com/Exeos/BReversed.git
git clone https://github.com/Exeos/ASMPlus.git
⚠️ Before you continue: Setup ASMPlus as described in its README
Resulting layout:
/
├── BReversed/
└── ASMPlus/
Make a local gradle properties file from the example and update the dependency paths. From the BReversed directory run:
cp gradle.properties.example gradle.properties
Open gradle.properties and set the dependency paths (these are the defaults you can use if the repos are siblings as shown above):
dependencies.asmplus.path=../ASMPlus
Building the Project
BReversed uses Gradle Composite Builds to include ASMPlus and jlib. After cloning and configuring gradle.properties, build from the BReversed directory:
Unix / macOS:
./gradlew build
Windows:
gradlew.bat build
Config
BReversed is driven by a JSON configuration file. Create a config.json in the working directory you run BReversed from.
Example template
{
"task": "DETECT",
"path": "jars",
"input": "in.jar",
"output": "out.jar",
"renamerString": "BReversed",
"transformers": [
"crasher/IMGCrasherRemover",
"bozar/",
"!BozarLightFlow"
]
}
Fields explained
-
task"DETECT"— analyze the input and print detected obfuscators."TRANSFORM"— run configured transformers and write the transformed jar tooutput.
-
path- Optional. Directory where jars live (relative to working directory).
-
input- The input jar file name (the
.jarextension is optional). Example:"in.jar"or"in".
- The input jar file name (the
-
output- The output jar file name (the
.jarextension is optional). Whentaskis"TRANSFORM", the processed jar will be written here.
- The output jar file name (the
-
renamerString- Base string used when renaming members (classes, fields, methods). Indices may be appended.
-
transformers- Array of transformers to apply when
taskis"TRANSFORM". - Format notes:
"packagename/TransformerSimpleName"— enable a single transformer."packagename/"— enable all transformers in that package."!TransformerSimpleName"— exclude a transformer (negation).
- Order matters: transformers are applied in the listed order unless there is a Comparator for the transformer(s) parent package.
- Array of transformers to apply when
Tips & Best Practices
- Start with
"DETECT"to understand what protections are present before running transforms. - Use
!Transformerentries to exclude known-bad or unstable transformers.
https://user-images.githubusercontent.com/59488004/197333146-89ba82b3-da07-47c8-8b26-fd73a2094044.mp4
