Skip to content

Commit c4169ab

Browse files
Merge branch 'skidfuscatordev:master' into master
2 parents d3eba2a + f518afe commit c4169ab

File tree

112 files changed

+6383
-956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+6383
-956
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[submodule "dev.xdark.ssvm"]
2-
url = git@github.com:terminalsin/SSVM.git
2+
url = https://github.com/terminalsin/SSVM.git

README.md

Lines changed: 89 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,64 @@
1+
![header](https://github.com/user-attachments/assets/65046709-27c3-417f-8053-3a6f8d5ea29d)
2+
3+
---
14
<p align="center">
2-
<img width="15%" height="15%" src="https://i.imgur.com/RgDz1Qn.png" href="https://github.com/terminalsin/skidfuscator-java-obfuscator/releases">
3-
<br>
4-
</p>
5-
<p align="center">
6-
Skidfuscator: Obfuscation like never seen before.
7-
</p>
8-
<p align="center">
9-
<a><img alt="Api Type" src="https://img.shields.io/badge/API-MapleIR-blue"></a>
10-
<a><img alt="Authors" src="https://img.shields.io/badge/Authors-Ghast-blue"></a>
11-
<a><img alt="Issues" src="https://img.shields.io/github/issues/terminalsin/skidfuscator-java-obfuscator"></a>
12-
<a><img alt="Forks" src="https://img.shields.io/github/forks/terminalsin/skidfuscator-java-obfuscator"></a>
13-
<a><img alt="Stars" src="https://img.shields.io/github/stars/terminalsin/skidfuscator-java-obfuscator"></a>
145
<h3 align="center">
15-
Join the discord: https://discord.gg/QJC9g8fBU9
6+
🗣️ Discord: https://discord.gg/QJC9g8fBU9 📚 Wiki: https://skidfuscator.dev/docs/
167
</h3>
178
<h3 align="center">
18-
Wiki: https://skidfuscator.dev/docs/
9+
🏢 Enterprise/Custom Version: https://skidfuscator.dev/pricing
1910
</h3>
2011
</p>
2112

2213
---
14+
15+
> [!WARNING]
16+
> This product is provided as-is, licensed under [MIT](/LICENSE). We will not provide any support, nor take liability for
17+
> any reversal, deobfuscation, or impact this tool may have on your software. If you seek to protect sensitive applications
18+
> for commercial use, we recommend you contact us at mastermind [at] zenrho.net or visit https://zenrho.com
19+
20+
21+
* [🚀 Quickstart](#-quickstart)
22+
+ [🔥 Homebrew (macOS)](#-homebrew-macos)
23+
+ [🔥 Bash (Linux/macOS)](#-bash-linuxmacos)
24+
+ [🔥 Powershell [Admin required] (Windows)](#-powershell-admin-required-windows)
25+
- [🕵️ What is Skidfuscator?](#-what-is-skidfuscator)
26+
- [✨ Features](#-features)
27+
+ [1. Automatic Dependency Downloading](#1-automatic-dependency-downloading)
28+
+ [2. Smart Recovery](#2-smart-recovery)
29+
+ [3. Auto Configuration](#3-auto-configuration)
30+
+ [4. Flow Obfuscation (GEN3)](#4-flow-obfuscation--gen3-)
31+
+ [5. Advanced Obfuscation Methods](#5-advanced-obfuscation-methods)
32+
+ [6. Optimization Out-of-the-Box](#6-optimization-out-of-the-box)
33+
- [🔥 Third Generation Flow](#-third-generation-flow)
34+
+ [Flow Obfuscation](#flow-obfuscation)
35+
+ [Encryption Obfuscation](#encryption-obfuscation)
36+
+ [Structure Obfuscation](#structure-obfuscation)
37+
+ [Miscelleanous](#miscelleanous)
38+
- [Credits](#credits)
39+
* [Libraries used](#libraries-used)
40+
* [Inspired from](#inspired-from)
41+
2342
## 🚀 Quickstart
2443

2544
> [!TIP]
2645
> If you are using Gradle, consider using our [Gradle plugin](https://github.com/skidfuscatordev/skidfuscator-gradle-plugin) for easy integration.
2746
> ```java
2847
> plugins {
29-
> id("io.github.skidfuscatordev.skidfuscator") version "0.1.3"
48+
> id("dev.skidfuscator") version "0.1.4"
3049
> }
3150
>
3251
> skidfuscator {
3352
> // Configure the plugin here
3453
> skidfuscatorVersion = "latest"
35-
> exempt = ["com/example/SomeClass"]
36-
>
37-
> transformers {
38-
> interprocedural {
39-
> enabled = true
40-
> exempt = ["com/example/IgnoredClass"]
41-
> }
42-
> stringEncryption {
43-
> type = "STANDARD"
44-
> enabled = true
45-
> }
46-
> }
4754
>}
4855
> ```
4956
50-
You can download Skidfuscator [here](https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases) and run it directly using:
57+
You can download Skidfuscator [here](https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases) and run it directly.
58+
59+
<details>
60+
<summary><h3>👉 CLI Usage/Install</h3></summary>
61+
5162
```
5263
java -jar skidfuscator.jar obfuscate <path to your jar>
5364
```
@@ -71,33 +82,41 @@ curl -sL https://raw.githubusercontent.com/skidfuscatordev/skidfuscator-java-obf
7182
```
7283
iex "& { $(iwr -useb https://raw.githubusercontent.com/skidfuscatordev/skidfuscator-java-obfuscator/refs/heads/master/scripts/install.ps1) }"
7384
```
85+
</details>
7486
7587
## 🕵️ What is Skidfuscator?
76-
Skidfuscator is a proof of concept obfuscation tool designed to take advantage of SSA form to optimize and obfuscate Java bytecode
88+
Skidfuscator is a ~~proof of concept~~**production** ✨ grade obfuscation tool designed to take advantage of SSA form to optimize and obfuscate Java bytecode
7789
code flow. This is done via intra-procedural passes each designed to mingle the code in a shape where neither the time complexity
7890
neither the space complexity suffers from a great loss. To achieve the such, we have modeled a couple of well known tricks to
7991
add a significant strength to the obfuscation whilst at the same time retaining a stable enough execution time.
8092
8193
Skidfuscator is now feature-complete and continues to be actively maintained with several new obfuscation techniques aimed at hardening your code against reverse engineering.
8294
95+
<details>
96+
<summary><h3>👉 Research Poster (Finalist CCSCNE 2024)</h3></summary>
97+
8398
![Classic Landscape 1 (3) (1)](https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/assets/30368557/9ab9a2ab-8df7-4e62-a711-4df5f3042947)
99+
</details>
84100
85-
# ✨ Features
101+
##Features
86102
103+
Skidfuscator is rich in over 10+ features. Our objective: **be one click, you're protected.** We provide a **GUI**, over **+10** configurable transfomers, we have failsafes and automatic tools to tailor your configuration to you with ease.
104+
<details><summary><h3>👉 Expand features</h3></summary>
105+
87106
### 1. Automatic Dependency Downloading
88107
Skidfuscator intelligently identifies and downloads missing dependencies needed for your project, minimizing manual configuration. Known frameworks such as Bukkit are automatically handled, streamlining setup.
89108
90-
![autodepend](https://github.com/user-attachments/assets/958349aa-582b-4751-88e1-ed61408d24b8)
109+
https://github.com/user-attachments/assets/9c349e09-01da-4073-be69-f00211add72a
91110
92111
### 2. Smart Recovery
93112
In the event of errors or failed obfuscation, Skidfuscator implements a recovery system that intelligently resolves conflicts and provides suggestions to fix issues. This ensures minimal disruption in your development workflow.
94113
95-
![FocuSee_Project_2024-12-18_03-32-25-ezgif com-optimize (1)](https://github.com/user-attachments/assets/af709b36-1031-4519-8e21-2ec63a245ffb)
114+
https://github.com/user-attachments/assets/d71f3a10-ebac-466c-9e8e-3bfcaf5177d5
96115
97116
### 3. Auto Configuration
98117
Skidfuscator comes with built-in presets for common configurations, allowing quick setup without needing to manually tweak every aspect of the obfuscation process. For advanced users, all settings remain fully customizable.
99118
100-
![FocuSeeProject2024-12-1802-56-07-ezgif com-optimize](https://github.com/user-attachments/assets/591415a0-b8fe-46d6-a530-d7914c58f613)
119+
https://github.com/user-attachments/assets/fb6a5ac1-a739-4c83-a340-40e312016947
101120
102121
### 4. Flow Obfuscation (GEN3)
103122
Skidfuscator introduces third-generation control flow obfuscation (Flow GEN3), which scrambles method logic and makes the control flow harder to understand. This method introduces opaque predicates and complex flow redirections, hindering static and dynamic analysis.
@@ -110,53 +129,54 @@ Here are all the cool features I've been adding to Skidfuscator. It's a fun proj
110129
not to be commercial but to inspire some more clever approaches to code flow obfuscation, especially ones which make use of SSA and CFGs
111130
112131
![Cool gif](https://i.ibb.co/4MQnj4V/FE185-E3-B-0-D0-D-4-ACC-81-AA-A4862-DF01-FA3.gif)
132+
</details>
133+
134+
## 🔥 Third Generation Flow
113135
114-
## Third Generation Flow
136+
Skidfuscator boasts the **most complex**, research-backed flow obfuscation in the JVM community. Our flow obfuscation outperforms competitors such as [Zelix Klassmaster](https://zelix.com), [DexGuard](), and various others. And yes, we're open-source!
137+
138+
<details><summary><h3>👉 Expand transformers</h3></summary>
115139
116140
### Flow Obfuscation
117-
- [x] Bogus Exception Flow
118-
- [x] Bogus Condition Flow
119-
- [x] **NEW**Pure Function Hashing Flow
120-
- [x] Switch Flow
121-
- [x] Factory Initiation Flow (**Enterprise**)
122-
- [x] Integer Return Flow (**Enterprise**)
123-
- [x] Exception Return Flow (**Enterprise**)
141+
| **Feature** | **Edition** | **Description** |
142+
|--------------------------------------|------------------------|---------------------------------------------------|
143+
| Bogus Exception Flow | Community | Adds fake exception handling to confuse reverse engineers. |
144+
| Bogus Condition Flow | Community | Introduces fake conditions to disrupt program analysis. |
145+
| **NEW**Pure Function Hashing Flow | Community | Hashes pure functions to obfuscate their flow and outputs. |
146+
| Switch Flow | Community | Uses switch statements to obscure logic paths. |
147+
| Factory Initiation Flow | Community | Obfuscates factory patterns, adding complexity to instance creation. |
148+
| Integer Return Flow | [**Enterprise**](https://skidfuscator.dev/pricing) | Obfuscates integer return values to mislead reverse engineering. |
149+
| Exception Return Flow | [**Enterprise**](https://skidfuscator.dev/pricing) | Utilizes exceptions as a return flow to confuse the control path. |
124150
125151
### Encryption Obfuscation
126-
- [x] String Encryption
127-
- [x] Annotation Encryption (**Enterprise**)
128-
- [x] Reference Encryption (**Enterprise**)
152+
153+
| **Feature** | **Edition** | **Description** |
154+
|--------------------------------------|------------------------|---------------------------------------------------|
155+
| String Encryption | Community | Encrypts strings to prevent static analysis. |
156+
| Annotation Encryption | [**Enterprise**](https://skidfuscator.dev/pricing) | Encrypts annotations to protect metadata from tampering. |
157+
| Reference Encryption | [**Enterprise**](https://skidfuscator.dev/pricing) | Encrypts object references to add another layer of security. |
129158
130159
### Structure Obfuscation
131-
- [x] Field Renamer (**Enterprise**)
132-
- [x] Method Renamer (**Enterprise**)
133-
- [x] Class Renamer (**Enterprise**)
134-
- [x] Mixin Support (**Enterprise**)
135-
- [x] Spigot Plugin Support (**Enterprise**)
160+
| **Feature** | **Edition** | **Description** |
161+
|--------------------------------------|------------------------|---------------------------------------------------|
162+
| Field Renamer | [**Enterprise**](https://skidfuscator.dev/pricing) | Renames fields to meaningless names to obscure their purpose. |
163+
| Method Renamer | [**Enterprise**](https://skidfuscator.dev/pricing) | Renames methods to make reverse engineering more challenging. |
164+
| Class Renamer | [**Enterprise**](https://skidfuscator.dev/pricing) | Renames classes to break readability and tooling compatibility. |
165+
| Mixin Support | [**Enterprise**](https://skidfuscator.dev/pricing) | Adds support for obfuscating mixin-based systems. |
166+
| Spigot Plugin Support | [**Enterprise**](https://skidfuscator.dev/pricing) | Obfuscates Spigot plugins for enhanced security. |
136167
137168
### Miscelleanous
138-
- [x] Ahegao Trolling
139-
- [x] Driver Protection
140-
- [x] **Experimental** Outlining Obfuscation (**Enterprise**)
141-
- [x] Native Driver Protection (**Enterprise**)
142-
143-
What is third generation flow obfuscation? Well, contrary to Zelix's [second generation flow obfuscation](https://www.zelix.com/klassmaster/featuresFlowObfuscation.html), we use an even more complex system with private and public seeds. Here's
144-
how it works:
145-
146-
<br>
147-
<br>
148-
149-
![Exampel](https://i.imgur.com/j2tZavr.png)
150-
151-
<sub>_Graph representing the two different approaches towards flow obfuscation between Zelix (17.0) and Skidfuscator (0.0.1)_</sub>
152-
<br>
153-
<br>
154-
<br>
169+
| **Feature** | **Edition** | **Description** |
170+
|--------------------------------------|------------------------|---------------------------------------------------|
171+
| Ahegao Trolling | Community | Adds humorous or trolling elements to deter casual inspection. |
172+
| Driver Protection | Community | Protects drivers from tampering or reverse engineering. |
173+
| **New** Outlining Obfuscation | [**Enterprise**](https://skidfuscator.dev/pricing) | Segments code into separate outlined functions for obfuscation. |
174+
| Native Driver Protection | [**Enterprise**](https://skidfuscator.dev/pricing) | Protects native drivers at the OS level for added security. |
175+
</details>
155176
156-
We currently are working on a variety of ways to approach this system using various lightweight obfuscation methods. Here are the current ones
157-
to date:
177+
## Credits
158178
159-
# Credits
179+
We'd like to extend our many thanks to the many individuals who have financially supported this project, supervised its research, or reported bugs. All contributions have curated this tool to achieve a production grade, and I could not be more thankful.
160180
161181
## Libraries used
162182
- [Maple IR and the Team](https://github.com/LLVM-but-worse/maple-ir)

SSVM

Lines changed: 0 additions & 1 deletion
This file was deleted.

build.gradle

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import org.gradle.api.JavaVersion
2+
import org.gradle.api.tasks.compile.JavaCompile
3+
14
plugins {
25
id 'java'
36
id 'java-library'
@@ -16,11 +19,10 @@ allprojects {
1619
}
1720
}
1821

19-
apply plugin: 'java'
2022
apply plugin: 'java-library'
2123

22-
sourceCompatibility = 1.8
23-
targetCompatibility = 1.8
24+
sourceCompatibility = JavaVersion.VERSION_17
25+
targetCompatibility = JavaVersion.VERSION_17
2426

2527
dependencies {
2628
compileOnly 'org.projectlombok:lombok:1.18.36'
@@ -34,6 +36,26 @@ allprojects {
3436
options.encoding = "UTF-8" // Will fail on the non-ascii comments if not set
3537
}
3638

39+
tasks.withType(JavaCompile).configureEach {
40+
if (sourceCompatibility == JavaVersion.VERSION_17) {
41+
options.compilerArgs += [
42+
'--add-exports', 'java.base/jdk.internal.reflect=ALL-UNNAMED',
43+
'--add-exports', 'java.base/jdk.internal.util=ALL-UNNAMED',
44+
'--add-exports', 'java.base/sun.io.ch=ALL-UNNAMED'
45+
]
46+
}
47+
}
48+
tasks.withType(Test).configureEach {
49+
if (sourceCompatibility == JavaVersion.VERSION_17) {
50+
jvmArgs += [
51+
'--add-exports', 'java.base/jdk.internal.reflect=ALL-UNNAMED',
52+
'--add-exports', 'java.base/jdk.internal.util=ALL-UNNAMED',
53+
'--add-exports', 'java.base/sun.io.ch=ALL-UNNAMED'
54+
]
55+
}
56+
}
57+
58+
3759
ext {
3860
asm = 'org.ow2.asm:asm:9.7.1'
3961
asm_commons = 'org.ow2.asm:asm-commons:9.7.1'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<dependencies>
2+
<dependency>
3+
<groupId>com.google.code.gson</groupId>
4+
<artifactId>gson</artifactId>
5+
<version>2.10.1</version>
6+
</dependency>
7+
</dependencies>

dev.skidfuscator.client.standalone/src/main/java/dev/skidfuscator/obfuscator/SkidfuscatorMain.java

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dev.skidfuscator.obfuscator;
22

33
import com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme;
4+
import com.formdev.flatlaf.intellijthemes.FlatGradiantoMidnightBlueIJTheme;
45
import dev.skidfuscator.obfuscator.command.HelpCommand;
56
import dev.skidfuscator.obfuscator.command.MappingsCommand;
67
import dev.skidfuscator.obfuscator.command.ObfuscateCommand;
@@ -16,7 +17,13 @@
1617
import picocli.CommandLine;
1718

1819
import javax.swing.*;
20+
import java.awt.*;
1921
import java.io.File;
22+
import java.io.IOException;
23+
import java.net.URI;
24+
import java.net.URISyntaxException;
25+
import java.util.concurrent.CompletableFuture;
26+
import java.util.concurrent.TimeUnit;
2027

2128
public class SkidfuscatorMain {
2229

@@ -33,7 +40,41 @@ public static void main(String[] args) {
3340
} catch (Exception e) {
3441
e.printStackTrace();
3542
}
36-
new MainFrame().setVisible(true);
43+
44+
final int option = JOptionPane.showOptionDialog(
45+
null,
46+
"You are running Skidfuscator Community! Whilst this project is free and open-source, " +
47+
"we heavily encourage commercial users to support the project by purchasing enterprise" +
48+
" edition available on our website",
49+
"Notice!",
50+
JOptionPane.DEFAULT_OPTION,
51+
JOptionPane.INFORMATION_MESSAGE,
52+
UIManager.getIcon("OptionPane.informationIcon"),
53+
new Object[]{"OK", "Buy Enterprise", "Join the Discord"},
54+
"OK"
55+
);
56+
57+
if (option == 0) {
58+
new MainFrame().setVisible(true);
59+
return;
60+
}
61+
62+
final String url = switch (option) {
63+
case 1 -> "https://skidfuscator.dev/pricing";
64+
case 2 -> "https://discord.gg/QJC9g8fBU9";
65+
default -> throw new IllegalStateException("Impossible");
66+
};
67+
68+
CompletableFuture.delayedExecutor(1, TimeUnit.SECONDS).execute(() -> {
69+
try {
70+
Desktop.getDesktop().browse(new URI(url));
71+
} catch (IOException | URISyntaxException e) {
72+
throw new RuntimeException(e);
73+
}
74+
});
75+
main(args);
76+
return;
77+
3778
});
3879
return;
3980
}

dev.skidfuscator.client.standalone/src/main/java/dev/skidfuscator/obfuscator/gui/ActionPanel.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.awt.*;
77
import java.io.File;
88

9-
public class ActionPanel extends JPanel {
9+
public class ActionPanel extends JPanel implements SkidPanel{
1010
private final MainFrame mainFrame;
1111
private final JTextArea logArea;
1212
private final JButton startButton;
@@ -40,6 +40,8 @@ public void startObfuscation() {
4040
return;
4141
}
4242

43+
44+
4345
// Create session
4446
SkidfuscatorSession session = SkidfuscatorSession.builder()
4547
.input(new File(config.getInputPath()))
@@ -48,10 +50,7 @@ public void startObfuscation() {
4850
? new File[0]
4951
: new File(config.getLibsPath()).listFiles()
5052
)
51-
.runtime(config.getRuntimePath().isEmpty()
52-
? null
53-
: new File(config.getRuntimePath())
54-
)
53+
.runtime(null)
5554
.phantom(false)
5655
.debug(config.isDebugEnabled())
5756
.build();

0 commit comments

Comments
 (0)