Skip to content

Commit e13f66f

Browse files
Merge branch 'skidfuscatordev:master' into master
2 parents 69471f8 + 542a855 commit e13f66f

57 files changed

Lines changed: 2782 additions & 1700 deletions

File tree

Some content is hidden

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

.github/workflows/release.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
name: Update Homebrew Formula
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: "Release tag to update the formula (e.g., 'v2.0.12')"
11+
required: false
12+
default: "2.0.11"
13+
14+
jobs:
15+
update-formula:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Extract version from input or release
19+
id: extract_version
20+
run: |
21+
# Use the provided tag if triggered manually, otherwise use the release tag
22+
if [ "${{ github.event.inputs.tag }}" != "" ]; then
23+
VERSION="${{ github.event.inputs.tag }}"
24+
else
25+
VERSION="${GITHUB_REF#refs/tags/}"
26+
fi
27+
28+
# Normalize by removing a leading 'v' if present
29+
VERSION="${VERSION#v}"
30+
echo "version=$VERSION" >> $GITHUB_OUTPUT
31+
32+
- name: Find jar asset download URL
33+
id: find_asset
34+
run: |
35+
# Get release data from GitHub API
36+
release_data=$(curl -sL -H "Accept: application/vnd.github+json" \
37+
"https://api.github.com/repos/skidfuscatordev/skidfuscator-java-obfuscator/releases/tags/${{ steps.extract_version.outputs.version }}")
38+
39+
# Find the asset named 'skidfuscator.jar' (adjust if needed)
40+
asset_url=$(echo "$release_data" | jq -r '.assets[] | select(.name == "skidfuscator.jar") | .browser_download_url')
41+
42+
if [ -z "$asset_url" ]; then
43+
echo "Could not find skidfuscator.jar in the release."
44+
exit 1
45+
fi
46+
47+
echo "asset_url=$asset_url" >> $GITHUB_OUTPUT
48+
49+
- name: Download jar
50+
run: |
51+
curl -L ${{ steps.find_asset.outputs.asset_url }} -o skidfuscator.jar
52+
53+
- name: Compute SHA256
54+
id: sha256
55+
run: |
56+
SHA256=$(shasum -a 256 skidfuscator.jar | awk '{print $1}')
57+
echo "sha256=$SHA256" >> $GITHUB_OUTPUT
58+
59+
- name: Checkout tap repository
60+
uses: actions/checkout@v3
61+
with:
62+
repository: skidfuscatordev/homebrew-skidfuscator
63+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
64+
ref: master
65+
- name: List Files
66+
run: ls -R
67+
- name: Cleanup and Prepare Formula
68+
run: |
69+
# Ensure Formula directory exists
70+
mkdir -p Formula
71+
72+
# Use absolute path and verify directory exists
73+
FORMULA_DIR="$(pwd)/Formula"
74+
FORMULA_PATH="${FORMULA_DIR}/skidfuscator.rb"
75+
76+
echo "Working directory: $(pwd)"
77+
echo "Formula directory: ${FORMULA_DIR}"
78+
echo "Formula path: ${FORMULA_PATH}"
79+
80+
# Remove any existing formula files
81+
rm -f ${FORMULA_DIR}/skidfuscator*.rb
82+
83+
# Create the new formula file
84+
cat > "${FORMULA_PATH}" << 'EOF'
85+
class Skidfuscator < Formula
86+
desc "A JVM-based obfuscation suite designed for Java and Android bytecode"
87+
homepage "https://github.com/skidfuscatordev/skidfuscator-java-obfuscator"
88+
url "https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases/download/2.0.11/skidfuscator.jar"
89+
sha256 "8d5bc1f6854995495a8451417cf5235a31a56d20fc4ce6079b19963ed84c49d9"
90+
version "2.0.11"
91+
license "MIT"
92+
93+
def install
94+
libexec.install Dir["*.jar"]
95+
jar_name = Dir["#{libexec}/*.jar"].first
96+
(bin/"skidfuscator").write <<~EOS
97+
#!/usr/bin/env bash
98+
exec java -jar "#{jar_name}" "$@"
99+
EOS
100+
(bin/"skidfuscator").chmod 0755
101+
end
102+
103+
test do
104+
output = shell_output("#{bin}/skidfuscator --help", 0)
105+
assert_match "Usage", output
106+
end
107+
end
108+
EOF
109+
110+
# Verify file was created
111+
ls -la ${FORMULA_DIR}
112+
113+
# Show file contents
114+
echo "Formula contents:"
115+
cat "${FORMULA_PATH}"
116+
117+
- name: Debug Formula Content
118+
run: |
119+
echo "Formula content:"
120+
cat Formula/skidfuscator.rb || echo "Failed to read formula file"
121+
echo "Git status:"
122+
git status
123+
echo "Directory contents:"
124+
ls -R
125+
126+
- name: Commit and push changes
127+
run: |
128+
git config user.name "github-actions"
129+
git config user.email "github-actions@github.com"
130+
git add Formula/skidfuscator.rb
131+
git commit -m "Update Skidfuscator formula to version 2.0.11"
132+
git push origin HEAD:master
133+
env:
134+
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
135+
136+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.idea/*
66
*.iml
77

8+
*.json
89

910
# Maven output
1011
*/target/*

README.md

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
Skidfuscator: Obfuscation like never seen before.
77
</p>
88
<p align="center">
9-
<a><img alt="Server Version" src="https://github.com/terminalsin/skidfuscator-java-obfuscator/actions/workflows/maven.yml/badge.svg?branch=master"></a>
109
<a><img alt="Api Type" src="https://img.shields.io/badge/API-MapleIR-blue"></a>
1110
<a><img alt="Authors" src="https://img.shields.io/badge/Authors-Ghast-blue"></a>
1211
<a><img alt="Issues" src="https://img.shields.io/github/issues/terminalsin/skidfuscator-java-obfuscator"></a>
@@ -21,8 +20,35 @@
2120
</p>
2221

2322
---
24-
25-
# 🕵️ What is Skidfuscator?
23+
## 🚀 Quickstart
24+
25+
> [!TIP]
26+
> You can download Skidfuscator [here](https://github.com/skidfuscatordev/skidfuscator-java-obfuscator/releases) and run it directly using:
27+
> ```
28+
> java -jar skidfuscator.jar obfuscate <path to your jar>
29+
> ```
30+
31+
Skidfuscator uses a config system, which allows you to customize your obfuscation. We try to automatically download all compatible libraries, but some may slip through the cracks. The Gradle plugin is a work in progress. For now, use:
32+
```
33+
java -jar skidfuscator.jar obfuscate <path to your jar> -li=<path to folder with all libs>
34+
```
35+
36+
### 🔥 Homebrew (macOS)
37+
```
38+
brew tap skidfuscatordev/skidfuscator
39+
brew install skidfuscator
40+
```
41+
42+
### 🔥 Bash (Linux/macOS)
43+
```
44+
curl -sL https://raw.githubusercontent.com/skidfuscatordev/skidfuscator-java-obfuscator/refs/heads/master/scripts/install.sh | bash
45+
```
46+
### 🔥 Powershell [Admin required] (Windows)
47+
```
48+
iex "& { $(iwr -useb https://raw.githubusercontent.com/skidfuscatordev/skidfuscator-java-obfuscator/refs/heads/master/scripts/install.ps1) }"
49+
```
50+
51+
## 🕵️ What is Skidfuscator?
2652
Skidfuscator is a proof of concept obfuscation tool designed to take advantage of SSA form to optimize and obfuscate Java bytecode
2753
code flow. This is done via intra-procedural passes each designed to mingle the code in a shape where neither the time complexity
2854
neither the space complexity suffers from a great loss. To achieve the such, we have modeled a couple of well known tricks to
@@ -36,6 +62,9 @@ Skidfuscator is now feature-complete and continues to be actively maintained wit
3662
3763
### 1. Automatic Dependency Downloading
3864
Skidfuscator intelligently identifies and downloads missing dependencies needed for your project, minimizing manual configuration. Known frameworks such as Bukkit are automatically handled, streamlining setup.
65+
66+
![autodepend](https://github.com/user-attachments/assets/958349aa-582b-4751-88e1-ed61408d24b8)
67+
3968
### 2. Smart Recovery
4069
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.
4170
### 3. Auto Configuration
@@ -54,6 +83,33 @@ not to be commercial but to inspire some more clever approaches to code flow obf
5483
5584
## Third Generation Flow
5685
86+
### Flow Obfuscation
87+
- [x] Bogus Exception Flow
88+
- [x] Bogus Condition Flow
89+
- [x] **NEW** ✨ Pure Function Hashing Flow
90+
- [x] Switch Flow
91+
- [x] Factory Initiation Flow (**Enterprise**)
92+
- [x] Integer Return Flow (**Enterprise**)
93+
- [x] Exception Return Flow (**Enterprise**)
94+
95+
### Encryption Obfuscation
96+
- [x] String Encryption
97+
- [x] Annotation Encryption (**Enterprise**)
98+
- [x] Reference Encryption (**Enterprise**)
99+
100+
### Structure Obfuscation
101+
- [x] Field Renamer (**Enterprise**)
102+
- [x] Method Renamer (**Enterprise**)
103+
- [x] Class Renamer (**Enterprise**)
104+
- [x] Mixin Support (**Enterprise**)
105+
- [x] Spigot Plugin Support (**Enterprise**)
106+
107+
### Miscelleanous
108+
- [x] Ahegao Trolling
109+
- [x] Driver Protection
110+
- [x] **Experimental** Outlining Obfuscation (**Enterprise**)
111+
- [x] Native Driver Protection (**Enterprise**)
112+
57113
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
58114
how it works:
59115
@@ -69,24 +125,7 @@ how it works:
69125
70126
We currently are working on a variety of ways to approach this system using various lightweight obfuscation methods. Here are the current ones
71127
to date:
72-
Here are the features:
73-
74-
| Feature | Type | Description | Status |
75-
| --- | --- | --- | --- |
76-
| `Flow GEN3` | Flow (Community) | Obfuscates methods using the GEN3 Obfuscation methodology ||
77-
| `Bogus Jump` | Flow (Community) | Invalid jump to some random generated code to prevent skidding ||
78-
| `Bogus Exception`| Flow (Community) | Invalid jump to some random generated exception ||
79-
| `Mangled Jump` | Flow (**Enterprise**) | Mutation to the jump condition to make it appear more complex than it actually is ||
80-
| `Exception Jump` | Flow (**Enterprise**) | Changes done to flow semantics by forcing an exception then handling all the code in the catch clause ||
81-
| `Exception Return`| Flow (**Enterprise**) | Throw an exception with the value and catch it as opposed to returning it (Very heavy) ||
82-
| `Strong Opaque Predicate` | Flow (Community) | Use heredity and method invocation to pass a predicate as opposed to declaring it at the beginning of the CFG ||
83-
| `Method Inlining` | Flow (**Enterprise**) | Inline uncommon methods which aren't too big ||
84-
| `Method Outlining` | Flow (**Enterprise**) | Outline some non-sensitive blocks ||
85-
| `Loop Unrolling` | Flow (**Enterprise**) | Rewrite some loops instructions into continuous segments if the loop limit can be pre-determined ||
86-
| `Flattening` | Flow (Community) | Use a dispatcher method to harden the semantics of some block ranges (do not use entire method) | ⚠️ |
87-
| `String Encryption` | String | Encrypt the strings using the opaque predicate ||
88-
| `Reference Encryption` | Reference | Encrypt the reference calls using InvokeDynamic using the opaque predicate ||
89-
| `Reference Proxying` | Reference | Proxy references using a builder pattern OR dispatcher classes (mostly for initialisation) ||
128+
90129
# Credits
91130
92131
## Libraries used

build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ allprojects {
88
jcenter()
99
mavenCentral()
1010
mavenLocal()
11+
maven {
12+
url 'https://repo.cleanroommc.com/releases/'
13+
}
1114
}
1215

1316
apply plugin: 'java'

0 commit comments

Comments
 (0)