Reverse engineering binaries with binary ninja
Skill meltedinhex/analyst-ai-pack/skills/reverse-engineering-binaries-with-binary-ninja
Reverse engineers binaries with Binary Ninja using its analysis stack and Python API to enumerate functions, navigate IL levels (LLIL/MLIL/HLIL), and automate annotation and extraction. Activates for requests to reverse a binary with Binary Ninja, script the Binary Ninja API, or work with its intermediate languages.From its SKILL.md
npx -y skills add meltedinhex/analyst-ai-pack --skill reverse-engineering-binaries-with-binary-ninjaAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 21 stars21 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.9 KB, 459 tokens by cl100k_base, as published. Nobody here has run it
Reverse Engineering Binaries With Binary Ninja
When to Use
- You want to reverse a binary with Binary Ninja and automate analysis via its Python API (function enumeration, IL traversal, annotation, extraction).
- You need to leverage MLIL/HLIL for cleaner analysis of obfuscated code.
Do not use the headless API to execute the sample — Binary Ninja performs static analysis. Run in an isolated environment and treat inputs as malicious.
Prerequisites
- Binary Ninja with the
binaryninjaPython API available (the script degrades gracefully and generates a script skeleton if the API is not importable).
Safety & Handling
- Static analysis does not execute the sample; keep inputs isolated.
Workflow
Step 1: Generate an analysis script skeleton
python scripts/analyst.py skeleton --emit functions,strings --out bn_extract.py
Emits a Binary Ninja Python script that opens a view, iterates functions, and exports
functions/strings to JSON using the real API (open_view, bv.functions, bv.get_strings).
Step 2: Choose the IL level
Use LLIL for close-to-assembly, MLIL for variable/SSA reasoning, and HLIL for readable pseudo-code; traverse instructions and operands programmatically.
Step 3: Automate annotation
Rename symbols (func.name), add comments (bv.set_comment_at), and create tags for findings.
Step 4: Run and aggregate
Execute the script (headless or in the UI console) and aggregate the JSON output.
Validation
- The skeleton uses real API calls (
binaryninja.open_view,bv.functions). - The chosen IL level matches the analysis goal.
- Exported JSON contains plausible functions/strings.
Pitfalls
- Headless licensing differences (Commercial vs Personal) affecting
open_viewavailability. - Confusing IL levels and operand structures across LLIL/MLIL/HLIL.
- Long analysis times on large binaries — scope function ranges.
References
- See
references/api-reference.mdfor the skeleton generator. - Binary Ninja API and IL docs (linked in frontmatter).
What ships with it: 3 files
4.1 KB alongside SKILL.md, 1 of them executable
references/
- api-reference.md1.2 KB
scripts/
- analyst.pyruns2.6 KB
- LICENSE340 B