Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Analyze Binaries With Claude Code Running Ghidra Scripts

Overview

Have Claude Code write and run Ghidra scripts in automated mode to list functions, decompile the interesting ones and draft notes on what a binary you are allowed to analyse does.

Problem or Objective

More in Security Research

AI Agents and Models

Tools and Integrations

Tools
Claude Code · Ghidra · Python
Prerequisites
Ghidra with its prerequisites, Claude Code (most surfaces require a Claude subscription or Anthropic Console account), and an isolated virtual machine for unknown binaries.

How It Works

Work on a binary you own or are authorised to analyse, inside an isolated virtual machine with Ghidra and Claude Code installed. Create a working folder with the binary and an empty notes file, and start Claude Code there. Ask it to write a small Ghidra Python script that imports the binary into a new project in Ghidra's automated mode and exports the list of functions, imports, strings and entry points to text files, then run it with your permission. Read the lists together, pick the functions worth a closer look, and ask for a second script that decompiles only those and saves the output. Ask Claude Code to draft notes on what each function seems to do, quoting the addresses it relied on, and to mark guesses clearly. Open the same functions in Ghidra's interface yourself to confirm the notes before relying on them.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Claude Code, Ghidra.
  2. Connect the toolsConnect the tools this workflow relies on: Claude Code, Ghidra, Python.
  3. Check the prerequisitesGhidra with its prerequisites, Claude Code (most surfaces require a Claude subscription or Anthropic Console account), and an isolated virtual machine for unknown binaries.
  4. Gather your detailsCollect what the prompt asks for: Binary you are allowed to analyse, Ghidra install folder, What you want to understand.
  5. Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at github.com before you rely on it.

Practical Starter Prompt: Script a first pass over a binary in Ghidra

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
In this folder is [Binary you are allowed to analyse], which I am authorised to analyse. Ghidra is installed at [Ghidra install folder]. Write a Ghidra Python script that imports the binary into a new project in automated mode and exports the functions, imports, strings and entry points to text files in ./out. Show me the command before running it and wait for my approval; I will review each command. Then help me choose functions related to [What you want to understand], write a second script that decompiles only those, and draft notes in notes.md with the address behind every claim and guesses marked as guesses. Do not modify the binary.

Run this in an isolated virtual machine, approve each command after reading it, and confirm the notes in Ghidra's interface before relying on them.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. The Ghidra README supports disassembly, decompilation and scripting in Java or Python, in both interactive and automated modes, and the Claude Code pages support running shell commands with permission. No cited page documents a ready-made bridge between the two, and nothing here measures speed or cost against manual analysis.

Limitations and Considerations

Analyse only software you are allowed to, and do not use this to defeat licence checks or copy protection. Keep unknown or suspicious binaries in an isolated virtual machine with no access to your own files or accounts. In Manual mode the Bash tool asks for permission, except for a built-in set of read-only commands; read each Ghidra command before allowing it. Decompiled code and the model's notes can be wrong, so confirm important findings in Ghidra yourself. If you prefer a community bridge that exposes Ghidra to the agent as tools, check its source and permissions first; none was verified here. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

Related Videos

About NationalSecurityAgency/ghidra

About anthropics/claude-code

About anthropics/claude-code

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. NationalSecurityAgency/ghidra README (opens in a new tab)

    Project documentation · github.com · Undated · Source checked 25 Nov 2026, 12:00 UTC

    What this source supports
    • Ghidra supports a wide variety of processor instruction sets and executable formats and can be run in both user-interactive and automated modes.
    • Users may also develop their own Ghidra extension components and/or scripts using Java or Python.
  2. Overview - Claude Code Docs (opens in a new tab)

    Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC

    What this source supports
    • Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.
    • Most surfaces require a Claude subscription or Anthropic Console account.
  3. Tools reference - Claude Code Docs (opens in a new tab)

    Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 12:10 UTC

    What this source supports
    • To control which tools Claude can use and when it asks first, configure permission rules in your settings, hooks , or a subagent’s tool list .
Report a problem

More with Claude Code

Planned, not done

Create Custom Store Tools Instead of Paying for Subscriptions

Use Claude Code to write small in-house tools for an online shop, such as a reply helper for support mail or a margin report, as an alternative to paying for separate apps, with testing before you rely on them.

code.claude.comanthropics/claude-code
Reported by source

Answer technical questions by letting async agents run experiments

Simon Willison sends research questions to cloud coding agents such as Claude Code for web and Codex Cloud, which write and run experiments in a dedicated repo and open a PR.

simonwillison.net · 6 Nov 2025anthropics/claude-code, openai/codex
Planned, not done

Structure Repeated Browser Research Into Evidence Tables

Give Claude Code the open-source Browser Use CLI with a local browser, ask the same research questions across a short list of pages, and keep every answer as a sourced table row.

github.comanthropics/claude-code, browser-use/browser-use

View all: Claude Code