Skip to content
Back to search

kuna

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Noelo-Lab/kuna with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Noelo-Lab/kuna'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/noelo-lab--kuna/badge.svg)](/listings/noelo-lab--kuna)

HTML

<a href="/listings/noelo-lab--kuna"><img src="/api/listings/noelo-lab--kuna/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Kuna is distributed as a single Rust binary and can be run on most systems. It can be used either on the [CLI](#cli-usage), the [web browser](#web-browser-usage), or in the [Ghidra GUI](#ghidra-gui-usage) (as the decompiler backend), most found in [releases](https://github.com/Noelo-Lab/kuna/releases).

CLI Usage

If building from source, you can find the `kuna` binary in `decompiler/target/release/kuna`. Otherwise, you can find it in the latest [release](https://github.com/Noelo-Lab/kuna/releases) for your OS (Linux, Windows, MacOS supported).

kuna decompile ./a.out main
kuna decompile ./stripped.bin 0x401040 --addr
# decompiles a full binary, returning a .c, .h, and .asm file
kuna decompile-project ./a.out
# flip a feature internal to the decompiler (useful for LLMs)
kuna decompile ./a.out main --option compareform canonical

When using it with an agent, install the built-in [skill](skills/kuna/SKILL.md) to inform your agent on its efficient usage. It ships inside the binary, so `kuna install-skill` sets it up for Claude Code, Codex and OpenCode offline (`--dir DIR` for other agents, `--print` to just read it).

Web Browser Usage

Since Kuna is written in Rust, you can also use it in the web browser through WebAssembly. This will do all of the work on your machine, which means the binary remains private.

Visit [kuna.noelo.org/decompile](https://kuna.noelo.org/decompile) to use it.

The code for deploying your own site can be found in `./integrations/web`

Ghidra GUI Usage

Since Kuna is originally a Ghidra port, the output format has remained largely compatible with Ghidra proper. You can use the Kuna core as the Ghidra decompiler inside of the traditional Ghidra GUI. You can either build the extension (`./integrations/ghidra`), or download the extension for the latest release.

The extension will work on all platforms Kuna is supported on. To install and activate Kuna in Ghidra, do the following: 1. Download it from the [releases](https://github.com/Noelo-Lab/kuna/releases/download/v1.157/kuna-v1.157-KunaDecompiler-ghidra_12.1.2.zip) , named `kuna-version-KunaDecompiler-ghidra....zip`. 2. In Ghidra: File → Install Extensions… → + → select the zip → restart. 3. In Ghidra: File → Configure → Miscellaneous → check KunaDecompilerPlugin.

Now, when you decompile, you should see `/* Kuna v{version} */` in the decompilation.

All native Ghidra features are not yet supported, so please report them when you find issues. To disable the Kuna backend, simply disable the plugin in `File -> Configure`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 172 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Kuna
  2. <p align="center">
  3. <img src="./assets/kuna_transparent.png" style="width: 30%;" alt="Kuna Logo"/>
  4. </p>
  5. An agent-first decompiler designed to be refined by other agents.
  6. Kuna is written in Rust and was originally ported from [Ghidra](https://github.com/nationalsecurityagency/ghidra), but has since diverged on multiple features and pipeline designs.
  7. This project is an _experiment_ to establish how far the autonomous refinement of decompilers can push research in the field.
  8. Learn more about this approach in this [post](https://noelo.org/blog/kuna-release/).
  9. 🏆 Kuna has held the top position on [DecBench](https://decbench.com) against most modern decompilers for optimized C. Kuna is also one of the _fastest_ decompilers on the planet, decompiling a 19MB binary in under [3 minutes](https://github.com/Noelo-Lab/kuna/issues/510#issuecomment-5645307854). These wins are only possible thanks to our growing contributors and [sponsors](#acknowledgement) who keep Kuna improving.
  10. **Questions? Join our Discord**:
  11. [![Discord](https://img.shields.io/discord/1542982153912975470?label=Discord&logo=discord&logoColor=white&color=5865F2&style=flat)](https://discord.gg/vAQ8BKUPXv)
  12. [![Featured on Made with REA](https://madewithrea.com/badges/featured.svg)](https://madewithrea.com/builds/kuna-agent-first-rust-decompiler-ported-from-ghidra)
  13. ## Install & Usage
  14. Kuna is distributed as a single Rust binary and can be run on most systems.
  15. It can be used either on the [CLI](#cli-usage), the [web browser](#web-browser-usage), or in the [Ghidra GUI](#ghidra-gui-usage) (as the decompiler backend), most found in [releases](https://github.com/Noelo-Lab/kuna/releases).
  16. ### CLI Usage
  17. If building from source, you can find the `kuna` binary in `decompiler/target/release/kuna`.
  18. Otherwise, you can find it in the latest [release](https://github.com/Noelo-Lab/kuna/releases) for your OS (Linux, Windows, MacOS supported). The release `kuna` is a single self-contained binary: the compiled SLEIGH specs are built in.
  19. ```bash
  20. kuna decompile ./a.out main
  21. kuna decompile ./stripped.bin 0x401040 --addr
  22. # decompiles a full binary, returning a .c, .h, and .asm file
  23. kuna decompile-project ./a.out
  24. # flip a feature internal to the decompiler (useful for LLMs)
  25. kuna decompile ./a.out main --option compareform canonical
  26. ```
  27. When using it with an agent, install the built-in [skill](skills/kuna/SKILL.md) to inform your agent on its efficient usage.
  28. It ships inside the binary, so `kuna install-skill` sets it up for Claude Code, Codex and OpenCode offline (`--dir DIR` for other agents, `--print` to just read it).
  29. ### Web Browser Usage
  30. Since Kuna is written in Rust, you can also use it in the web browser through WebAssembly.
  31. This will do all of the work on your machine, which means the binary remains private.
  32. Visit [decompile.run](https://decompile.run) to use it.
  33. The code for deploying your own site can be found in `./integrations/web`
  34. ### Ghidra GUI Usage
  35. Since Kuna is originally a Ghidra port, the output format has remained largely compatible with Ghidra proper.
  36. You can use the Kuna core as the Ghidra decompiler inside of the traditional Ghidra GUI.
  37. You can either build the extension (`./integrations/ghidra`), or download the extension for the latest release.
  38. The extension will work on all platforms Kuna is supported on.
  39. To install and activate Kuna in Ghidra, do the following:
  40. 1. Download it from the [releases](https://github.com/Noelo-Lab/kuna/releases/download/v1.157/kuna-v1.157-KunaDecompiler-ghidra_12.1.2.zip) , named `kuna-version-KunaDecompiler-ghidra....zip`.
  41. 2. In Ghidra: File → Install Extensions… → + → select the zip → restart.
  42. 3. In Ghidra: File → Configure → Miscellaneous → check KunaDecompilerPlugin.
  43. Now, when you decompile, you should see `/* Kuna v{version} */` in the decompilation.
  44. ![](./assets/kuna_ghidra.png)
  45. All native Ghidra features are not yet supported, so please report them when you find issues.
  46. To disable the Kuna backend, simply disable the plugin in `File -> Configure`.
  47. ### Ghidra Headless Usage
  48. The Kuna extension swaps the decompiler from a CodeBrowser plugin, and headless Ghidra (`analyzeHeadless`, PyGhidra, or tools built on them like [REA](https://github.com/morluto/rea)) never loads GUI plugins.
  49. To use Kuna as the decompiler backend there, swap the native decompiler binary directly.
  50. 1. Locate the stock Ghidra decompiler binary and back it up:
  51. ```bash
  52. cd "$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/os/linux_x86_64"
  53. cp decompile decompile.ghidra.orig
  54. ```
  55. 2. Replace it with the Kuna backend from the extension zip's `KunaDecompiler/os/linux_x86_64/` directory:
  56. ```bash
  57. cp /path/to/KunaDecompiler/os/linux_x86_64/kuna_ghidra decompile
  58. chmod +x decompile
  59. ```
  60. 3. Verify the swap: decompile a function and check for the `/* Kuna v<version> */` marker in the output.
  61. No specs download is needed: `kuna_ghidra` gets the processor specs and p-code from Ghidra itself.
  62. On other platforms, use the matching `os/<platform>/` directory (`linux_arm_64`, `mac_x86_64`, `mac_arm_64`, or `win_x86_64`, where both files end in `.exe`).
  63. To revert to the stock Ghidra decompiler, restore the backup with `cp decompile.ghidra.orig decompile`.
  64. The [extension README](integrations/ghidra/KunaDecompiler/README.md#use-with-pyghidra-headless--scripting) also covers an in-script PyGhidra toggle and a drop-in that leaves the stock binary untouched.
  65. This method was tested with Ghidra 12.1.2 and REA 3.1.0.
  66. ## Project Goals
  67. LLM agents, like [Codex](https://chatgpt.com/codex/), have fundamentally changed how we reverse engineer and ultimately secure binaries.
  68. Instead of humans looking directly at decompilers, LLMs are increasingly the ones using them, and humans instead read the agents' logs.
  69. As such, it feels natural that decompilers should become oriented and optimized around agents.
  70. Additionally, we can use those agents to automatically refine the tool they depend on.
  71. Although agents should write most of the code in this project, insight into what should be written an how it should be designed is still needed at times.
  72. This project takes two main stances on pipeline design and feature design based on other decompilers that have shown success.
  73. In total, this projects aims for the following goals:
  74. 1. **Autonomous refinement**: we must design datasets, prompts, and tools for LLMs to continue to improve the decompiler while we are sleeping. This improvement should be based on science, and, ideally, solid metrics. Currently, [DecBench](https://decbench.com/) serves to facilitate the data and metrics needed for refinement.
  75. 2. **Agent-first**: we muse prioritize the quality of the decompilation text over other (normally important) aspects of decompilers, like GUIs or visualization tools. This also means we should strike a balance between features and speed, since the bottleneck on big binaries will be the decompiler. Additionally, we will explore optimal ways to give LLMs access to the decompiler.
  76. 3. **Tunable**: when we instruct our LLMs to develop new features, either through human involvement or automation, we should make these features toggalable and configurable for different context. As an example, reversers may want high-level code, while pwners want low-level code. This discrepancy means uses have different goals of decompilation, and our feature implementation style should match that.
  77. ## Design
  78. On the engineering side, the decompiler design aims to align with two other aspects:
  79. 1. **Phase based**: each phase of the decompiler should be well defined to give LLMs a better chance at finding features and code when they need to make changes. This also makes it easier to debug and improve.
  80. 2. **Natural language spec**: every impactful feature and algorithm should be described, at least in part, in the natural language specification of the decompiler (`./docs/spec`). This is closely aligned with the stage-based model, and should provide a way for humans to audit high-level ideas in the decompiler.
  81. The phases are described in the following files:
  82. - `docs/phases.md` — the stage model at a glance (the runtime registry is queryable via the `stage list/map/catalog` console commands).
  83. - `docs/options.md` — the tiered option catalog (transforms = the LLM control surface,
  84. with a generated symptom index)
  85. ## Development
  86. The majority of code analysis and creation is expected to be done with frontier LLMs in an agentic framework like Codex or Claude Code.
  87. The agent-facing guidance lives in [`AGENTS.md`](AGENTS.md) (a symlink to `docs/agents.md`), which holds the enforced rules for contributing features and a doc map to everything else.
  88. ### Building from Source
  89. You only need a **Rust toolchain** (`cargo`).
  90. ```bash
  91. make binaries # cargo-build the decompiler (decomp_dbg, decomp_test_dbg),
  92. # the SLEIGH compiler (slacomp), and the `kuna` CLI
  93. make specs # compile every SLEIGH .slaspec -> .sla with slacomp (the decoder needs these)
  94. make # = binaries + specs
  95. cd decompiler && cargo build --release -p kuna-cli --features embed-specs
  96. # after `make specs`: a `kuna` that carries the specs, as releases do
  97. ```
  98. Everything lands in `decompiler/target/release/`. For development, work in the cargo workspace
  99. directly: `cd decompiler && cargo build` / `cargo test --workspace`.
  100. ### Test
  101. Four gates, all expected green before every commit:
  102. ```bash
  103. make test # the 675/675 decompiler regression parity (tests/datatests/ vs docs/baseline.json)
  104. make test-stages # the kuna-owned issue testcases (tests/stages/ vs docs/baseline-stages.json)
  105. make rust-test # the full cargo workspace suite (ported unit tests, golden differential
  106. # vectors, SLEIGH-compiler .sla content-parity, docs/options.md freshness, ...)
  107. make check-spec # docs/spec/ honesty: anchors and inline code paths resolve, and each
  108. # phase folder is owned by exactly one spec chapter
  109. ```
  110. `make test` compiles the specs with the Rust SLEIGH compiler and decodes the XML regression
  111. corpus (`tests/datatests/`, 83 files / 675 assertions) with the Rust decompiler.
  112. ### Layout
  113. | Path | What it is |
  114. |---|---|
  115. | `decompiler/` | The engine — a cargo workspace. `kuna-decomp` (the decompiler, phase-foldered `p0_knowledge/`…`p9_emit/`), `kuna-analysis` (the loader/analyzer tier), `kuna-sleigh`/`kuna-slacomp` (SLEIGH runtime + compiler, binary `slacomp`), `kuna-console` (the `decomp_dbg`/`decomp_test_dbg` binaries), `kuna-cli` (the `kuna` binary), `kuna-ghidra`/`kuna-wasm` (the Ghidra and browser front-ends), plus support crates |
  116. | `tests/datatests/` | Upstream XML decompilation regression tests (83 files → 675 assertions); the corpus `make test` runs |
  117. | `tests/stages/` | kuna-owned issue testcases; the corpus `make test-stages` runs |
  118. | `tests/golden/` | Differential golden vectors for the workspace suite (`make rust-test`) |
  119. | `specs/Ghidra/Processors/` | Vendored SLEIGH processor specs; `.sla` are build artifacts produced by `slacomp` |
  120. | `integrations/` | Front-ends embedding the engine: `ghidra/` (kuna as stock Ghidra's decompiler core) and `web/` (the project site + in-browser decompiler) |
  121. | `scripts/` + `tools/` | Python helpers and drivers for the improvement pipeline (`docs/improvement-pipeline.md`) and the decbench campaign (`docs/decbench-loop.md`) |
  122. | `Makefile` | Top-level build/test driver (Rust-only) |
  123. | `docs/history.md` | The project history, incl. the C++→Rust port and its validation |
  124. ## Acknowledgement
  125. Kuna is only possible through the support it receives from the community and sponsors.
  126. We are especially grateful to the generous sponsorship from the [Air Force Research Lab](https://www.afrl.af.mil/) (VRFP, SA10032026051342),
  127. [Metalware](https://www.metalware.com/) (VRFP), and the Department of Defense.
  128. ---
  129. Need to get in touch? Contact the lead maintainer [Zion Basque](https://zionbasque) through email: zionbasque@uga.edu.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.