Noelo-Lab/kuna

An agent-first decompiler designed to be refined by other agents. Kuna is written in Rust and was originally ported from Ghidra.

Kuna – An Agent‑First Decompiler (Rust)

What it is

  • Kuna is a binary decompiler written in Rust. It takes compiled executables (e.g., ELF, PE) and produces C source, header, and assembly files.
  • The project is built around the idea that large‑language‑model (LLM) agents will be the primary users of decompilers, so the tool is designed to be agent‑first: fast, text‑oriented, and easily scriptable.

Key features (as described in the README)

  • Speed & accuracy – Holds the top spot on the DecBench benchmark for optimized C and can decompile a 19 MB binary in under three minutes.
  • Multiple front‑ends – Distributed as a single self‑contained Rust binary that can be run:
    1. CLI – kuna decompile <binary> <function> with optional flags (--addr, --option).
    2. Web (WASM) – A browser‑based UI at kuna.noelo.org/decompile that runs entirely client‑side, keeping binaries private.
    3. Ghidra plugin – Can replace Ghidra’s built‑in decompiler via the KunaDecompiler extension.
  • Agent integration – Ships a “skill” file (skills/kuna/SKILL.md) that LLM agents like Claude Code, Codex, or OpenCode can install to learn the optimal command usage.
  • Extensible pipeline – The decompiler is split into clearly defined phases (p0_knowledge … p9_emit). Each phase is documented in natural‑language specs, making it easier for LLMs to propose and test changes.
  • Tunable options – Feature toggles are exposed through a hierarchical option catalog (docs/options.md). This lets different users (e.g., reverse‑engineers vs. exploit developers) request high‑level or low‑level output.

How to get it

  • Pre‑built binaries for Linux, Windows, and macOS are available on the GitHub Releases page.
  • Building from source requires only a Rust toolchain (cargo). The repository provides a Makefile with shortcuts:
    • make binaries – builds the decompiler, SLEIGH compiler, and CLI.
    • make specs – compiles the SLEIGH processor specifications.
    • make test – runs the full regression suite (675 assertions across 83 test files).

Project goals

  1. Autonomous refinement – Use LLM‑driven pipelines and DecBench metrics to continuously improve the decompiler without human intervention.
  2. Agent‑first design – Prioritize decompilation text quality and speed, providing a clean interface for LLM agents.
  3. Tunable pipelines – Allow agents (or humans) to enable/disable features on the fly to suit different reverse‑engineering tasks.

Community & support

  • Active Discord channel for questions and development discussion.
  • Sponsored by the Air Force Research Lab, Metalware, and the U.S. Department of Defense.
  • Contribution guidelines and agent‑facing documentation are in AGENTS.md and docs/.

Bottom line Kuna is a modern, Rust‑based decompiler that positions itself as a backend for AI agents doing reverse engineering. It offers fast, high‑quality C output, multiple deployment options, and an architecture built for automated, LLM‑driven improvement.

Related

  • Project
  • Project
  • Project
  • Project
  • Project