Skip to content

Commit aecc7af

Browse files
committed
Updated Readme.md
1 parent 22d40f9 commit aecc7af

2 files changed

Lines changed: 39 additions & 32 deletions

File tree

Features.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
### Name Obfuscation
66
- **Class renaming** – Renames classes to short or random identifiers (e.g. `a`, `b`, `c` or `xk9m2p`)
7-
- **Configurable name length** – Minimum length 1–32 characters
7+
- **Method renaming** – Obfuscate method names; handles override chains; excludes main, constructors, native, enum methods; optional homoglyph/invisible chars
8+
- **Field renaming** – Obfuscate field names; excludes serialVersionUID and enum constants; optional homoglyph/invisible chars
9+
- **Configurable name length** – Minimum length 1–32 characters (class, method, field)
810
- **Random vs sequential** – Optional random names per build for stronger obfuscation
911
- **Exclude patterns** – Skip classes/packages from renaming. Use `*` to exclude all classes; prefix matches (e.g. `com.example` excludes `com.example.*`). Built-in: java.*, javax.*, Bukkit, Minecraft, etc.
1012
- **Package flattening** – Inner classes get short names; outer package hierarchy preserved
11-
- **Homoglyph obfuscation** – Use Unicode lookalikes (e.g. Cyrillic а instead of Latin a). Names appear familiar but copy-paste and search fail. Sequential: fixed mapping; random: varies per char.
13+
- **Homoglyph obfuscation** – Use Unicode lookalikes (e.g. Cyrillic а instead of Latin a) for class/method/field names. Sequential: fixed mapping; random: varies per char.
1214
- **Invisible character injection** – Zero-width chars (U+200B, etc.) in names. Safe for JVM; harder to detect and remove.
1315

1416
### Data Obfuscation
@@ -21,10 +23,11 @@
2123

2224
### Configuration
2325
- **YAML config**`config.yml` next to JAR
24-
- **Per-feature toggles** – Enable/disable class renaming, number, array, boolean, and string obfuscation
25-
- **Random options** – Toggle randomness for class names and obfuscation keys
26+
- **Per-feature toggles** – Enable/disable class, method, field renaming; number, array, boolean, and string obfuscation; debug stripping
27+
- **Random options** – Toggle randomness for class/method/field names and obfuscation keys
2628

2729
### Output & CLI
30+
- **GUI** – Graphical interface (`run-gui.bat`); input/output, config path, per-feature checkboxes
2831
- **CLI**`-i` input, `-o` output filename
2932
- **Obfuscate folder** – Output written to `Obfuscate/` in the obfuscator JAR directory
3033
- **Overwrite** – Replaces existing output file if present
@@ -40,8 +43,6 @@
4043
## Planned Features
4144

4245
### Name Obfuscation
43-
- **Method renaming** – Rename methods (except overrides, main, constructors)
44-
- **Field renaming** – Rename fields; respect reflection and serialization
4546
- **Overload induction** – Multiple methods with same name, different signatures
4647

4748
### Control Flow Obfuscation

README.md

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ java -jar build/dist/st3ix-obfuscator.jar -i myapp.jar -o myapp-obfuscated.jar
2424
java -jar build/dist/Obfuscate/myapp-obfuscated.jar
2525
```
2626

27-
**Windows:** Use `gradlew.bat` for building. For the GUI, run `run-gui.bat` from `build/dist/` or double-click the JAR.
27+
**Windows:** Use `gradlew.bat` for building. For the GUI, run `run.bat` from `build/dist/` or double-click the JAR.
2828

2929
Bei jedem Release gibt es ein ZIP-Archiv mit allem Nötigen: JAR, Batch-Datei zum Starten, Config-Beispiel, Images.
3030

@@ -37,11 +37,12 @@ Bei jedem Release gibt es ein ZIP-Archiv mit allem Nötigen: JAR, Batch-Datei zu
3737
- **Number obfuscation** – Hides `int` via math expressions (`123``(50*3)-27`); `long`/`float`/`double` via XOR
3838
- **Array obfuscation** – Hides array dimensions
3939
- **Boolean obfuscation** – Hides `true`/`false` literals
40-
- **String obfuscation** – Encrypts string literals (XOR); decryption inlined at each use (no central decoder)
40+
- **String obfuscation** – Encrypts string literals (XOR); inline decrypt at each use; key per class and per string (no central decoder, no dump point)
4141
- **Debug info stripping** – Removes source names, line numbers, local variable names
4242
- **Local variable renaming** *(planned)* – Obfuscate local variable names when debug kept
43-
- **Random options** – Optional random keys and class/method names per build
43+
- **Random options** – Optional random keys and class/method/field names per build
4444
- **Exclude patterns** – Skip JDK, Bukkit, Minecraft, and custom packages
45+
- **GUI** – Graphical interface for obfuscation (`run.bat`)
4546
- **YAML config**`config.yml` next to the JAR
4647

4748
See [Features.md](Features.md) for the full list of current and planned features.
@@ -65,6 +66,8 @@ Copy `config.yml.example` to `config.yml` and place it next to `st3ix-obfuscator
6566

6667
```yaml
6768
classRenamingEnabled: true
69+
methodRenamingEnabled: true
70+
fieldRenamingEnabled: true
6871
numberObfuscationEnabled: true
6972
arrayObfuscationEnabled: true
7073
booleanObfuscationEnabled: true
@@ -119,23 +122,23 @@ package example;
119122

120123
public final class Main {
121124
public static void main(String[] args) {
122-
System.out.println("Example project running.");
123-
DemoService service = new DemoService();
124-
service.run();
125+
System.out.println("License validation active.");
126+
LicenseValidator validator = new LicenseValidator();
127+
validator.validate();
125128
}
126129
}
127130

128-
// example/DemoService.java
129-
public final class DemoService {
130-
private static final String SECRET_KEY = "my-secret-key-12345";
131-
private int counter;
131+
// example/LicenseValidator.java
132+
public final class LicenseValidator {
133+
private static final String API_KEY = "sk-live-a7f3b9c2e1d4";
134+
private int validationCount;
132135

133-
public void run() {
134-
counter++;
135-
int port = 25565;
136-
int seed = 12345;
137-
boolean flag = true;
138-
System.out.println("port=" + port + ", seed=" + seed);
136+
public void validate() {
137+
validationCount++;
138+
int port = 443; // HTTPS
139+
int maxRetries = 3;
140+
boolean strictMode = true;
141+
System.out.println("port=" + port + ", retries=" + maxRetries);
139142
}
140143
}
141144
```
@@ -148,7 +151,6 @@ public final class DemoService {
148151

149152
public final class b {
150153
public static void main(String[] args) {
151-
// Inline: byte[] + XOR loop + new String(...) – no o.a.d()
152154
byte[] enc = new byte[]{...};
153155
byte[] out = new byte[enc.length];
154156
for (int i = 0; i < enc.length; i++)
@@ -165,29 +167,33 @@ public final class ь {
165167

166168
public void a() {
167169
this.b++;
168-
int var0 = 25621 - 56; // 25565 via expression
169-
int var1 = 37 * 333 + 24; // 12345 via expression
170+
int var0 = 431 + 12; // 443 via expression
171+
int var1 = 2 * 2 - 1; // 3 via expression
170172
boolean var2 = 0x... ^ 0x...; // boolean XOR
171-
System.out.println("port=" + var0 + ", seed=" + var1);
173+
System.out.println("port=" + var0 + ", retries=" + var1);
172174
}
173175
}
174176
```
175177

176178
| Transform | Effect |
177179
|-------------------|-----------------------------------------------------------------------|
178-
| Class renaming | `Main``b`, `DemoService``ь` (short names; homoglyph: `а`, `ь`) |
179-
| Method renaming | `run()``a()` (excludes main, constructors, native) |
180-
| Field renaming | `SECRET_KEY``f`, `counter``g` |
180+
| Class renaming | `Main``b`, `LicenseValidator``ь` (short names; homoglyph: `а`, `ь`) |
181+
| Method renaming | `validate()``a()` (excludes main, constructors, native) |
182+
| Field renaming | `API_KEY``a`, `validationCount``b` |
181183
| Homoglyph | Latin `a` becomes Cyrillic `а` (U+0430) – copy-paste fails |
182184
| Invisible chars | Zero-width chars in names – appear normal but differ |
183-
| Number obfuscation | `25565``25621-56`, `12345``37*333+24` (math expressions) |
185+
| Number obfuscation | `443``431+12`, `3``2*2-1` (math expressions) |
184186
| Boolean obfuscation | `true``(value ^ key) ^ key` |
185-
| String obfuscation | Inline XOR decrypt at each use; no central decoder → no dump point |
187+
| String obfuscation | Inline XOR decrypt at each use; key per class and per string; no central decoder → no dump point |
186188
| Debug stripping | Local vars become `var0`, `var1`; line numbers removed |
187189

188190
### Strength
189191

190-
Obfuscation raises the bar for casual and automated reverse engineering. Numbers are hidden as expressions instead of trivial XOR; strings are decrypted inline with no single hook point. Realistic caveats: determined reversers can still analyze the code; obfuscation is a deterrent, not unbreakable protection.
192+
Obfuscation raises the bar for casual and automated reverse engineering. Numbers are hidden as math expressions at compile time; decompilers show the expression, not the literal. Strings use **runtime-computed keys** (`key ^ class.hashCode() ^ index` per string), decrypted inline at each use site—no central decoder, no single breakpoint to dump all strings.
193+
194+
We chose XOR over AES for string encryption: AES would be overkill for typical JAR obfuscation and adds complexity (IV handling, block size). XOR with per-class/per-string keys is lightweight and effective against `strings`-tools and casual inspection. **Issues and PRs are open**—if you want AES or stronger encryption, contributions are welcome.
195+
196+
Realistic caveats: determined reversers can still trace decryption logic; obfuscation is a deterrent, not unbreakable protection.
191197

192198
## Documentation
193199

0 commit comments

Comments
 (0)