-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64759e2
commit 6bc14a2
Showing
1 changed file
with
46 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,61 @@ | ||
# Obfuscator-LLVM-16.0 | ||
|
||
|
||
NOTE: You are going to need at least **30GB** of disk space and patience to compile LLVM 16. | ||
## Quick Usage | ||
|
||
Get the Docker image and run: | ||
|
||
1. `git clone https://github.com/joaovarelas/Obfuscator-LLVM-16.0 && cd Obfuscator-LLVM-16.0` | ||
2. `docker build -t rustc-ollvm .` | ||
3. `docker run -v /path/to/my/cargo/projects:/projects/ -it rustc-ollvm:latest /bin/bash` | ||
|
||
Then inside the container: | ||
```bash | ||
docker pull ghcr.io/joaovarelas/obfuscator-llvm-16.0:latest | ||
docker run -v /path/to/cargo/proj:/projects/ -it <image-id> /bin/bash | ||
|
||
4. `cd /projects/myproject/` | ||
5. `cargo rustc --release -- -Cllvm-args=-enable-allobf -Cdebuginfo=0 -Cstrip=symbols -Cpanic=abort -Copt-level=3` | ||
# target windows | ||
cargo rustc --target x86_64-pc-windows-gnu --release -- -Cdebuginfo=0 -Cstrip=symbols -Cpanic=abort -Copt-level=3 -Cllvm-args=-enable-allobf | ||
|
||
The executables will be placed at `target/`. | ||
# target linux | ||
cargo rustc --target x86_64-unknown-linux-gnu --release -- -Cdebuginfo=0 -Cstrip=symbols -Cpanic=abort -Copt-level=3 -Cllvm-args=-enable-allobf | ||
``` | ||
|
||
Compiled binaries will be placed at `./target` directory. | ||
|
||
|
||
## Available OLLVM Features | ||
|
||
Current Rust OLLVM is based on [Hikari](https://github.com/61bcdefg/Hikari-LLVM15-Core/blob/main/Obfuscation.cpp) which has the following features: | ||
|
||
- Anti Class Dump: `-enable-acdobf` | ||
- Anti Hooking: `-enable-antihook` | ||
- Anti Debug: `-enable-adb` | ||
- Bogus Control Flow: `-enable-bcfobf` | ||
- (*) Control Flow Flattening: `-enable-cffobf` | ||
- Basic Block Splitting: `-enable-splitobf` | ||
- Instruction Substitution: `-enable-subobf` | ||
- Function CallSite Obf: `-enable-fco` | ||
- (*) String Encryption: `-enable-strcry` | ||
- Constant Encryption: `-enable-constenc` | ||
- (*) Indirect Branching: `-enable-indibran` | ||
- (*) Function Wrapper: `-enable-funcwra` | ||
|
||
- Enable ALL of the above: `-enable-allobf` (not going to work and you'll probably run out of memory) | ||
|
||
|
||
_* not working_ | ||
|
||
|
||
|
||
## Development | ||
|
||
_TO-DO_ | ||
|
||
|
||
## Contributors | ||
|
||
- [@eduardo010174](https://github.com/eduardo010174) | ||
- [@joaovarelas](https://github.com/joaovarelas) | ||
|
||
|
||
OLLVM 16.0 patch for Rust LLVM based on Hikari | ||
|
||
- https://github.com/rust-lang/llvm-project/tree/rustc/16.0-2023-03-06 | ||
- Commit: 2b9c52f66815bb8d6ea74a4b26df3410602be9b0 | ||
|
||
|
||
|