Skip to content
RyfteniusPublic

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Vesuki

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.

Capabilities

  • 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(), and vesuki_heavy().

Usage

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();
}

Implementation

Vesuki operates across three stages:

  1. Compile-time: The procedural macro transforms function bodies into dispatcher-driven control flow.
  2. Build-time: build.rs generates randomized seeds, block wrappers, execution orders, and thunk banks.
  3. Runtime: Entropy-driven state evolution selects and executes the generated noise primitives.

Build

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

Releases

Packages

Used by

Contributors

Languages