Repository navigation
Releases
Kagura v0.4.0
Kagura v0.4.0 adds a source compiler driver, scoped string buffers, Windows runtime support, local MCP tools, and a rewritten paper with reproducible measurements.
Highlights
- Compiler driver:
kaguracoordinates version-matched LLVM 17–22 tools, separate compilation, runtime discovery and strict policy preflight. Binary bundles include bothkaguraandkagura-opt. - Scoped strings: opt-in XOR/AES plaintext buffers are wiped after eligible nonthrowing, readonly, noncapturing calls. Unsupported uses retain persistent storage; consumer copies and registers are outside the wipe guarantee.
- Windows: AntiDebug entry points and loaded-module symbol resolution, MSVC PEB/CRT fixes, hardware-breakpoint tests, and scoped COMDAT handling.
- MCP and policy tooling: workspace-scoped diagnosis, policy generation/validation, audit inspection and binary comparison. Shared registry/profile validation also works through the LLVM-independent CLI.
- Paper: a full rewrite separates selected-pass measurements from shipped-profile observations, removes unsupported analyst-hour/security claims, and includes raw data, provenance and reproduction instructions. Evaluation reports invalidate stale results, track running/failed/complete states, and generate captions from the actual seeds.
Validation
Local arm64 macOS / LLVM 21.1.8 validation passed 85 CTest entries, eight differential subjects, fixed-seed IR reproducibility, 25 MCP tests and eight paper-tool regression tests. The strict documentation build and seven-page LaTeX build passed. Cross-platform CI passed before merge.
Known limitation
Shipped anti-debug profiles abort during startup on the paper's arm64 macOS evaluation host. A v0.4.0 pre-release check with two additional seeds reproduced those aborts. Explicit anti-debug ablations passed seven self-tests and 4,096 bounded differential comparisons per executable. The detector is unchanged in this release; validate startup on each deployment target. The paper's checked-in measurements remain tied to their historical source revision and are not presented as v0.4.0 measurements. No attack-resistance or runtime-performance result is established by these experiments.
Downloads
Choose a binary archive matching your platform and LLVM major: macOS arm64 (LLVM 21 or 22), or Linux x86_64 (LLVM 19, 21 or 22). LLVM plugins require a matching host toolchain. Source and the revised paper PDF are also attached.
Kagura v0.3.0
Kagura v0.3.0 improves string protection and IR transformation correctness, and includes the configuration, VM, build and test repairs accumulated since v0.2.0.
Highlights
- Fix the string-split PHI verifier failure reported in #57 (#60).
- Add opt-in
-kagura-string-aggressive/"string": {"aggressive": true}for short strings, format strings and static aggregate references (#58, #59). The default collection policy remains conservative; English and Japanese documentation covers exclusions and XOR-before-AES ordering. - Preserve string offsets, pointer identity and escaped-pointer lifetime, and synchronize concurrent first use. AES uses permanent per-literal backing instead of per-use stack buffers.
- Repair dominance, EH, typed memory accesses, integer widths, musttail/frame constraints, VM eligibility, MSVC descriptors, debug scopes, indirect-call initialization and pointer authentication (#61–#72).
- Review all 36 registered passes and add a reusable verifier/serialization runner and per-pass audit report (#73).
- Include earlier configuration/profile precedence, constant obfuscation, VM lowering, build/packaging and regression-suite repairs. See the full changelog for details and migration guidance.
Upgrade notes
Previously inactive flags and profiles now apply their documented transformations. Profiles require linking kagura_runtime. Recheck binary size and performance when upgrading. Lazy AES plaintext now lasts for the literal lifetime; aggressive mode adds startup work and cannot guarantee ordering against preinit hooks or other priority-0 constructors.
On LLVM below 22, use opt --load-pass-plugin=... (or build kagura-opt) for Kagura options; clang may parse -mllvm options before loading the pass plugin. Dynamic JNI registration remains incomplete; the JNI changes repair IR/hook mutation only. Platform loader behavior and real arm64e hardware execution need device testing.
Validation and downloads
The combined local LLVM 21.1.8/macOS arm64 run passed all 84 CTest tests, eight differential execution subjects and 3,456 cross-pass verifier/serialization checks. The fix PRs and final main build are checked by CI across supported LLVM versions and platforms before publication.
Prebuilt plugins and runtime libraries are provided for macOS arm64 (LLVM 21/22) and Linux x86_64 (LLVM 19/21/22), together with a source archive. Use the asset matching your LLVM major version.
Full comparison: v0.2.0...v0.3.0
v0.2.0
What's New in v0.2.0
A wide-coverage release. Two new IR passes, three platform attestation runtime stubs, a full documentation site with Japanese translations, a CI fix for Windows / MSVC compatibility, two post-build CLI utilities, and a single-source-of-truth refactor for the pass registry.
📖 Full documentation: https://ykus4.github.io/kagura
📜 Full changelog: CHANGELOG.md
New passes
-kagura-cse-break— Defeats decompiler CSE-recovery (Ghidra, IDA hex-rays, Binary Ninja MLIL) by duplicating shared SSA expressions so every user sees a fresh definition.-kagura-string-split— Fragments long string literals (≥16 bytes) across multiple smaller globals; recombines at runtime. Composes withkagura-strto ensure neither plaintext nor ciphertext lives contiguously.
Platform attestation
runtime/ios/device_attest.c— Apple DeviceCheck (iOS 11+) and App Attest (iOS 14+) C bindingsruntime/windows/etw_detection.c— Windows ETW-based analysis tool detection- (Android Play Integrity already shipped in 0.1.x)
Documentation site
- Full MkDocs site at https://ykus4.github.io/kagura — auto-deployed from
main - Cookbook: Banking / FinTech · Mobile game / anti-cheat · SDK vendor · DRM — recipe-style pages with threat models, policies, build commands, and verification steps
- Security Model — STRIDE coverage matrix, hard non-goals, load-bearing assumptions
- Japanese localization at
/ja/— 30 translated pages
Tooling
scripts/kagura-strip.py— ScrubsLC_UUID(Mach-O) /.note.gnu.build-id(ELF) post-buildscripts/kagura-diff.py— Section / symbol / string diff between baseline and obfuscated binaries (text / HTML / JSON)
Developer experience
- Pass registry refactor:
lib/Transforms/PassRegistry.defis now the single source of truth. Plugin.cpp: 378 → 197 lines (−181). Options.cpp: 205 → 116 lines (−89). Adding a new pass = 1 line. - Issue & PR templates with structured YAML forms
- Windows CI: bumped LLVM 19 → 21 for new MSVC STL Clang ≥20 requirement
Prebuilt assets
Binaries for macOS arm64 / Linux x86_64 across LLVM 19 / 21 / 22 are attached below — published automatically by the release workflow.
v0.1.2
What's Changed
- feat(bcf): diversify opaque predicates with 7 MBA variants by @ykus4 in #26
- feat(wstr,vtp): Swift/Kotlin string encryption and MSVC VTP lit test (A.1, A.2) by @ykus4 in #27
- feat(wasm): implement C.1 WebAssembly backend pass filtering by @ykus4 in #28
- feat(a1-a2): Windows/MSVC support, Swift/Kotlin string encryption by @ykus4 in #29
- refactor: remove implementation phase numbers from comments by @ykus4 in #30
- refactor: remove phase numbers from tests README headings by @ykus4 in #31
- docs(readme): add motivation, use cases, before/after examples, and performance section by @ykus4 in #32
Full Changelog: v0.1.1...v0.1.2
v0.1.1
What's Changed
- docs: add CI and Release workflow status badges to README by @ykus4 in #20
- fix: correct FLA/MVO/Substitution pass interactions and improve eval robustness by @ykus4 in #21
- chore: move paper/benchmarks to scripts/benchmarks and ignore paper/ by @ykus4 in #22
- fix/refactor/test: lift pass limitations, add Apple GOT hook detection, expand fuzz coverage by @ykus4 in #23
- docs(todo): add newly identified implementation gaps by @ykus4 in #24
- fix/refactor/test: lift pass limitations, expand fuzz coverage, and add Apple GOT hook detection by @ykus4 in #25
Full Changelog: v0.1.0...v0.1.1