Skill Store 33

Reverse Engineering with a Local LLM: Ollama + Ghidra, Fully Offline

Use when someone needs to reverse engineer a binary privately or offline, with an open-source model on their own hardware (air-gapped malware labs, confidential client binaries, firms that forbid cloud AI). Gives the hardware sizing, Ollama setup, Ghidra and radare2 integrations that work with local models, how to chunk large binaries, and what to expect versus cloud models.

by skillstore33 · MIT

The skill

Use when someone needs to reverse engineer a binary privately or offline, with an open-source model on their own hardware (air-gapped malware labs, confidential client binaries, firms that forbid cloud AI). Gives the hardware sizing, Ollama setup, Ghidra and radare2 integrations that work with local models, how to chunk large binaries, and what to expect versus cloud models.

Reverse Engineering with a Local LLM: Ollama + Ghidra, Fully Offline

Rule for using this skill: Ask why it must be local (air gap, client confidentiality, policy), the machine's RAM and GPU, and the binary size. Size the model from the table, set up Ollama, pick one integration, and set expectations: local runs are slower and weaker than frontier cloud models, so the verification steps matter more. Authorized targets only.

Why local

  • The binary is confidential (client code, unreleased product) or dangerous (live malware in an isolated lab).
  • Your organization forbids sending code to cloud AI.
  • You need to work offline, or keep costs fixed for batch jobs.

Size the hardware

Model size Example Memory needed (approx.) Use for
7-9B small instruct or code models 8-12 GB Summaries of single functions, quick triage
24-32B gemma3:27b (OGhidra's suggested default) about 20 GB Function naming, explanations, the practical sweet spot
70B+ large open models 48 GB+ (multi-GPU or a big Mac) Harder reasoning; slow

Memory figures are rough for 4-bit quantized models; check the model card.

Set up Ollama

  1. Install Ollama from ollama.com and start it.
  2. Pull a model: ollama pull gemma3:27b (or the model you chose).
  3. Test it: ollama run gemma3:27b "Explain what this x86 does: xor eax, eax; ret".
  4. For an air-gapped machine, pull models on a connected machine and copy Ollama's model folder across.

Pick an integration

Tool What it does
OGhidra (LLNL) Drives Ghidra through a local Ollama model; suggests gemma3:27b at about 20 GB RAM
GhidrAssist Ghidra plugin for LLM-assisted renaming and explanations; works with local endpoints
ReverserAI Offline function-naming plugin for local models
r2ai (radare2) radare2's AI assistant; defaults to a local Ollama model
An MCP client + Ghidra MCP + local model An agent client that supports Ollama (for example OpenCode) driving a Ghidra MCP server

Work in chunks

Local models have smaller context windows and get confused by whole programs. So:

  1. Triage outside the model: let Ghidra list functions, strings, imports and the call graph.
  2. Send one function at a time, with its callers' names and the strings it uses.
  3. Batch the renames: loop over functions overnight, writing each suggested name and one-line summary to a file, and review in the morning before applying.
  4. Keep prompts and outputs short and structured (JSON with name, summary, confidence, evidence).

What to expect

  • Slower: Cisco Talos found local runs took hours where cloud models took minutes.
  • Weaker on hard reasoning: fine for naming and summarizing, less reliable at tracing complex logic or spotting subtle bugs.
  • Tool-calling slips: local models sometimes invent tool names or arguments in agent loops; constrain the tools and validate calls.
  • Verify everything: check names against cross-references and strings, and recompile anything you'll reuse (see the verification skill).

Sources

  • OGhidra (LLNL): https://github.com/llnl/OGhidra ; https://pypi.org/project/oghidra/
  • TrustedSec, large workflows with local LLMs: https://trustedsec.com/blog/large-workflows-with-local-llms
  • Supercharging Ghidra using local LLMs: https://clearbluejar.github.io/posts/supercharging-ghidra-using-local-llms
  • 8kSec, running open-source LLMs locally for security: https://8ksec.io/running-open-source-llms-locally-security/
  • ReverserAI: https://github.com/mrphrazer/reverser_ai ; GhidrAssist: https://github.com/symgraph/GhidrAssist
  • Cisco Talos, using an LLM as a reverse engineering sidekick: https://blog.talosintelligence.com/using-llm-as-a-reverse-engineering-sidekick/
  • r2ai (NowSecure): https://www.nowsecure.com/?p=23180

Use this skill

Connect your agent to the Skill Store MCP server and ask for it by ref: skillstore33/reverse-engineering-with-a-local-llm-ollama-ghidra-21074748371.

Download SKILL.md · Markdown version

Details

Publisher
skillstore33
Category
Security › Application security
License
MIT
Updated
2026-11-30

References

More from skillstore33