pgarba/kraftwerk
Security & PrivacyReverse engineeringLift obfuscated x86, ARM, Android DEX and JavaScript into MLIR, simplify it, and recover readable C, Java or JavaScript.
What it does
Kraftwerk is a reverse-engineering tool for code that resists reading. It decodes native binaries (x86-64, i386, AArch64, ARMv7; ELF, PE, Mach-O), Android DEX/APK files and JavaScript, converts them into MLIR, simplifies the IR, then emits LLVM IR, pseudo C, Java, deobfuscated JavaScript or recompiled assembly. Target obfuscation includes computed jumps, opaque predicates, mixed boolean-arithmetic (MBA), encrypted strings, control-flow flattening and VM protection.
The lifting claim is exactness: registers become SSA values from the first instruction, flags are lazy and memory is an explicit token chain, with semantics differentially tested against Unicorn and real hardware. Simplification avoids guessing: unresolved jump targets stay visible, and MBA rewrites are proven equivalent before use. VM devirtualization evaluates a function through its bytecode interpreter and records the recovered program in a vm dialect. A separate cve_match tool fetches a CVE advisory and fix commit, locates the changed functions in a binary and checks the lifted control flow with Z3 to decide whether guards from the fix are present.
Quick start
Prebuilt releases are available for Linux x64, Windows x64 and macOS arm64. Download and unpack one, then start the local Studio UI on port 8765:
kraftwerk-server path/to/binary
# open http://127.0.0.1:8765
The same server can run a single lift from the command line:
kraftwerk-server path/to/binary --tool=lift \
--tool-args='{"addr":"main","view":"c","abi":"sysv"}'
For other inputs, use kraftwerk-dex --emit=java --deobfuscate app.apk for Android and kraftwerk-js --deobfuscate obfuscated.js for JavaScript. Add --help to any tool to list its options. Building from source uses scripts/build.sh on Linux/macOS or scripts/build.ps1 on Windows with Visual Studio 2022 and vcpkg; the scripts pull LLVM/MLIR 23.1.6 into deps/ on first build. Full build prerequisites and package targets are in the build documentation.
Usage constraints
kraftwerk-server binds to 127.0.0.1:8765 and, per the project, does not send data off the machine. The built-in agent pane connects to a local OpenAI-compatible endpoint such as llama-server, so no cloud service is required. The Studio stores names, comments and stored lifts in a BINARY.kraftwerk.db file next to the analyzed binary, so the directory must be writable.
Emulation features depend on Unicorn (GPL-2.0), which is excluded from release builds; enabling Studio's emulate tool, PE loader emulation or --emulate-loader requires a source build with --unicorn. The project warns that the Studio and agent handle hostile binaries and documents its security model in docs/security.md. No license is declared in the repository metadata; the README states the project is © 2026 Peter Garba and that MBA simplification uses SiMBA++.
Documentation
The README links design notes for the lifting design, VM devirtualization, the DEX front end, the JavaScript front end and the Studio. A blog series on reversing.software explains how the tool is built and why it uses MLIR.
HotRepo's take
The repository only appears in HotRepo's new-project list on 2026-12-05, where it recorded 109 stars and 9 new stars in the roughly one-hour growth window from 21:45 to 22:45 UTC. The hourly star samples rise from 100 to 109 within that window, and no all-language daily rank has been recorded. With such a short observation period, the data supports only that the project gained early attention on that day, not a sustained trend.
The technical scope is unusually specific: differential testing against Unicorn and hardware, proven-equivalent MBA rewrites, preserved unresolved edges, and Z3-checked CVE guard matching. Those claims are testable through the project's test inputs and kraftwerk-difftest, which is the right place to assess whether the lifters meet their stated exactness.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- skylot/jadxTurns Android APKs and Dalvik bytecode back into readable Java for reverse engineers and security analysts.
- DimitriFourny/fast-decompA fast static decompiler that converts x86-64 PE and ELF functions into C-like pseudocode for analysis and AI agents.
- MG1937/ASCOn-demand Android APK decompiler for mobile reverse engineers and AI agents, with millisecond class extraction and cross-DEX reference search.
- DrWhax/unfairplayRecover the FairPlay decryption model from an enrolled Mac to decrypt iOS IPAs you already downloaded.
- SimoneAvogadro/android-reverse-engineering-skillClaude Code skill that decompiles Android APK/XAPK/JAR/AAR files and extracts the HTTP APIs they call.