Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HimitsuShell Logo

Latest Release MIT License

HimitsuObfuscator

a lightweight, stable, gpl-free llvm-17 obfuscator for linux.


Block Flow Graph (Ghidra)

Usage

# download obfuscator
curl -LO https://github.com/HimitsuShell/HimitsuObfuscator/releases/download/v2.1.0/himitsu_obfuscator.tar
tar -xvf himitsu_obfuscator.tar

# create sample source
vim main.c
-----------------------------
#include <stdio.h>
int main() {
  printf("Hello World!\n");
  return 0;
}
-----------------------------

# build and run (x86_64-linux-gnu)
apt install -y build-essential
./bin/clang --target=x86_64-linux-gnu -mllvm -sobf main.c -o main 
./main

# supported targets: x86_64-linux-musl, aarch64-linux-gnu, aarch64-linux-musl, etc.

Obfuscation Options

- fla         # control flow flattening
- bcf         # bogus control flow (slow build, larger binary)
  - bcf_prob  # probability (1–100, default: 30)
  - bcf_loop  # number of iterations (default: 1)
- sub         # instruction substitution (add/and/sub/or/xor)
  - sub_loop  # number of iterations (default: 1)
- sobf        # string encryption
- split       # basic block splitting
  - split_num # number of splits (default: 2)

# selective obfuscation ('no' prefix disables)
void test1() __attribute__((annotate("sobf"), annotate("nobcf")));
void test1() { printf("Hello World!"); }

# planned options: indirect branches, indirect calls, indirect global variable

Specifications

  • llvm: 17.0.6
  • languages: c, c++ (or llvm ir)
  • platforms: linux (x86_64, aarch64) | planned: armv7, riscv64, win11
  • requirements: ubuntu 24.04, x86_64 cpu (6c/12t rec.), 16gb ram, 10gb ssd
  • bcf option: do not compile with -g when using -bcf (debug info skips obfuscation).

Info

  • discussions: open a github issue/discussion or email hjyun@mushsw.com
  • sponsors: Supported by the Pyeongtaek Industrial Promotion Agency (South Korea), a government-affiliated public institution.
  • license:
    • MIT License
    • all copyleft (gpl/agpl) removed. fully commercial-safe.
    • [HimitsuShell CE] notice applies to HimitsuShell only, not HimitsuObfuscator.

About

a lightweight, stable, gpl-free llvm-17 obfuscator for linux.

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages