Polymorphic Control-Flow Obfuscation for Rust | x86_64
Vesuki is a Rust control-flow obfuscation toolkit that transforms annotated functions into dispatcher-driven execution paths, introducing randomized control-flow structures and runtime noise into compiled binaries.
It combines compile-time function rewriting with per-build code generation, producing variations in execution paths, block ordering, and binary layout.
- Control-Flow Transformation:
#[VESUKI]rewrites annotated functions into dispatcher-based execution structures. - Per-Build Polymorphism: Randomized seeds, block ordering, generated wrappers, and indirect thunk banks.
- Opaque Control Flow: Opaque predicates, state-driven branching, entropy mixing, and disassembly decoys.
- Noise Injection:
vesuki_call!()introduces callsite-specific execution noise. - Configurable Intensity:
vesuki_light(),vesuki_medium(), andvesuki_heavy().
Apply the attribute macro to a function:
use vesuki_macros::VESUKI;
#[VESUKI]
fn fib(mut n: u64) -> u64 {
let (mut a, mut b) = (0_u64, 1_u64);
while n > 0 {
let t = a.wrapping_add(b);
a = b;
b = t;
n -= 1;
}
a
}Alternatively, inject noise at a specific callsite:
use vesuki::vesuki_call;
fn example() {
vesuki_call!();
vesuki::vesuki_heavy();
}Vesuki operates across three stages:
- Compile-time: The procedural macro transforms function bodies into dispatcher-driven control flow.
- Build-time:
build.rsgenerates randomized seeds, block wrappers, execution orders, and thunk banks. - Runtime: Entropy-driven state evolution selects and executes the generated noise primitives.
Requires Rust 1.85+ and an x86_64 target.
git clone https://github.com/Ryftenius/Vesuki.git
cd Vesuki
cargo build --workspace
cargo run -p vesuki-tests --release