Kagura

June 30, 2026 · View on GitHub

Kagura

CI Release LLVM 17-22 C++17 Platforms MIT License Discussions DOI

Kagura

LLVM-based code obfuscation and anti-tamper toolkit for mobile, desktop, and WebAssembly targets.

Built on the New Pass Manager (LLVM 17+). Loaded as a pass plugin via -fpass-plugin — no LLVM source tree modification required.

Supported platforms: iOS · Android · macOS · Windows (MSVC/Clang-CL) · Linux · WebAssembly

What it protects against

ThreatCountermeasure
Static string extraction (strings, IDA imports)XOR / AES string encryption (kagura-str, kagura-str-aes)
Decompiler-readable control flowCFG flattening + bogus control flow (kagura-fla, kagura-bcf)
Memory editor / GameGuardian value freezePer-store/load XOR (kagura-mvo, kagura-pe) + Protected<T> runtime
Frida / Substrate dynamic instrumentationRuntime hook & breakpoint detection (kagura-anti-debug)
Binary patching (NOP-ing checks)Per-BB opcode checksums (kagura-bbcheck)
Import table analysisExternal calls via runtime-resolved thunks (kagura-ci)
Jailbreak / root detection bypassMach-O / ELF integrity, Magisk / Zygisk / LSPosed detection

Documentation

📚 Full documentation: ykus4.github.io/kagura

TopicLink
Install & first buildQuick Start
Every pass (flags, effects, overhead)Passes
JSON policy DSL & strength profilesConfiguration
Xcode / Gradle / Unity / Unreal / Bazel / CMake / CocoaPods / SPMIntegration
Protected<T> for HP / currency / etc.Game Protection
Differential, reproducible, angr / Ghidra / FridaTesting & Evaluation

Quick taste

clang -fpass-plugin=KaguraObfuscator.dylib \
      -mllvm -kagura-config=kagura.json \
      -O1 your_file.c -o your_file
{ "profile": "BALANCED",
  "passes": { "str": true, "fla": true, "bcf": true, "mvo": true },
  "tuning": { "bcf_prob": 40, "seed": 12345 } }

Citation

If you use Kagura in your research or build on it, please cite the paper:

@software{kagura,
  author    = {yotti},
  title     = {Kagura: LLVM-based Code Obfuscation and Anti-Tamper Toolkit},
  year      = {2025},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.20361447},
  url       = {https://doi.org/10.5281/zenodo.20361447}
}

Community

  • 💬 Discussions — questions, ideas, share your use case
  • 🐞 Issues — bugs and feature requests (templates provided)
  • 📚 Documentation — passes, configuration, integration, testing

License

MIT — see LICENSE.