<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>AI Assisted Reverse Engineering on RockB</title><link>https://baeseokjae.github.io/tags/ai-assisted-reverse-engineering/</link><description>Recent content in AI Assisted Reverse Engineering on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 20 Sep 2026 07:01:07 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/ai-assisted-reverse-engineering/index.xml" rel="self" type="application/rss+xml"/><item><title>IDA Headless MCP 2026: Rust-Native Reverse Engineering with AI Agents</title><link>https://baeseokjae.github.io/posts/ida-headless-mcp-rust-2026/</link><pubDate>Sun, 20 Sep 2026 07:01:07 +0000</pubDate><guid>https://baeseokjae.github.io/posts/ida-headless-mcp-rust-2026/</guid><description>Build a headless IDA Pro MCP server in 2026: set up idalib Rust bindings or ida-mcp-rs, connect Claude/Cursor, and automate vibe reversing safely.</description><content:encoded><![CDATA[<p>Headless IDA Pro MCP lets AI agents analyze binaries directly through IDA&rsquo;s decompiler and disassembler without opening the GUI. You set up IDA Pro 9.4, expose idalib through a Rust-native MCP server such as <code>ida-mcp-rs</code>, connect it to Claude Code or Cursor, and then drive decompilation, xrefs, renames, comments, and scripting through natural language. In 2026 this workflow is faster to stand up, more memory-safe, and far more capable than the Python MCP servers of a year earlier.</p>
<h2 id="what-is-headless-ida-and-why-pair-it-with-mcp-in-2026">What is headless IDA and why pair it with MCP in 2026</h2>
<p>IDA Pro is the industry-standard disassembler and decompiler from Hex-Rays. &ldquo;Headless&rdquo; IDA runs the analysis engine without the graphical interface, using the <code>idalib</code> library that ships inside IDA Pro 9.x. Instead of a human clicking through disassembly windows, a script or an AI agent calls IDA functions programmatically.</p>
<p>The Model Context Protocol (MCP) is an open standard that connects AI models to tools. For reverse engineering, an MCP server wraps IDA&rsquo;s engine so that an assistant can ask for a function&rsquo;s decompilation, follow cross-references, rename variables, or read memory — then use the result to reason about the binary. The phrase &ldquo;vibe reversing,&rdquo; popularized by the <code>ida-pro-mcp</code> project, describes exactly this: describing what you want a binary to do in natural language and letting the agent drive IDA to find out.</p>
<p>Why is 2026 the inflection point? Three changes converged:</p>
<ul>
<li><strong>IDA open-sourced its SDK.</strong> With IDA 9.2, Hex-Rays open-sourced the IDA SDK (<a href="https://hex-rays.com/blog/streamlining-vulnerability-research-idalib-rust-bindings">github.com/HexRaysSA/ida-sdk</a>), making Rust bindings and headless tooling dramatically easier to build.</li>
<li><strong>Rust-native servers matured.</strong> Projects such as Binarly&rsquo;s <code>idalib</code> bindings and <code>blacktop/ida-mcp-rs</code> reached production quality across Windows, Linux, and macOS.</li>
<li><strong>Multi-database and background analysis became standard.</strong> You can now analyze dozens of firmware variants or kernel drivers in parallel, asynchronously, where a single GUI session would take hours.</li>
</ul>
<h2 id="why-rust-native-idalib-bindings-vs-traditional-idapython-approaches">Why Rust-native: idalib bindings vs traditional IDAPython approaches</h2>
<p>Most early IDA MCP servers were thin wrappers around IDAPython. They run Python inside IDA, which works but carries real costs: a Python runtime dependency, slower startup, and the performance penalty of calling into IDA through an interpreted layer on every decompile or xref lookup.</p>
<p>Rust-native approaches bind directly to the IDA SDK. Binarly&rsquo;s <a href="https://github.com/binarly-io/idalib">idalib</a> provides idiomatic Rust bindings tested against IDA Pro 9.4 on Windows 11, Ubuntu 24.04 LTS, and macOS Sequoia (Apple Silicon). Because Rust compiles to a single native binary with no runtime, startup is near-instant and memory management is explicit and safe. The bindings power production vulnerability-research tools such as <code>rhabdomancer</code> (finding insecure API calls) and <code>haruspex</code> (extracting Hex-Rays pseudocode).</p>
<p>The practical difference in a MCP session is throughput. A Rust-native server can decompile hundreds of functions and walk thousands of xrefs in the time a Python wrapper spends importing its dependencies. For large binary corpora — malware variant sets, entire firmware families, or a folder of kernel drivers — that difference is the difference between minutes and hours.</p>
<table>
  <thead>
      <tr>
          <th>Dimension</th>
          <th>Rust-native (idalib / ida-mcp-rs)</th>
          <th>IDAPython wrapper (classic)</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Startup cost</td>
          <td>Near-zero, native binary</td>
          <td>Python runtime + module imports</td>
      </tr>
      <tr>
          <td>Memory safety</td>
          <td>Compile-time guarantees</td>
          <td>Relies on CPython runtime</td>
      </tr>
      <tr>
          <td>Throughput on large corpora</td>
          <td>High</td>
          <td>Lower per-operation overhead</td>
      </tr>
      <tr>
          <td>Ease of extending the server</td>
          <td>Rust traits / CLI</td>
          <td>Direct Python</td>
      </tr>
      <tr>
          <td>Ecosystem</td>
          <td>Newer, smaller</td>
          <td>Huge existing IDAPython codebase</td>
      </tr>
  </tbody>
</table>
<p>Hex-Rays itself contributed to the effort through its contributor program, and Binarly&rsquo;s <code>idalib</code> has roughly 268 stars with 71 commits since September 2024 — a young but active and well-supported codebase.</p>
<h2 id="setup-install-ida-pro-94-idalibidapro-package-and-an-mcp-server">Setup: install IDA Pro 9.4, idalib/idapro package, and an MCP server</h2>
<p>You need a licensed copy of IDA Pro 9.4 or newer — this is a hard requirement for every headless approach, because <code>idalib</code> ships inside IDA. There is no free headless mode.</p>
<p><strong>Step 1 — Install IDA Pro 9.4.</strong> Install the standard IDA distribution for your OS. Both <code>ida-mcp-rs</code> and <code>idalib</code> are tested on Linux (Ubuntu 24.04+), macOS (including Apple Silicon), and Windows 11.</p>
<p><strong>Step 2 — Get the Rust bindings.</strong> Add Binarly&rsquo;s <code>idalib</code> crate to your project, or use it indirectly through an MCP server. If you build your own tooling:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cargo add idalib
</span></span><span style="display:flex;"><span>cargo build --release
</span></span></code></pre></div><p>The bindings point at your local IDA installation. You usually configure the IDA root path in an environment variable or configuration file.</p>
<p><strong>Step 3 — Install a Rust-native MCP server.</strong> <code>ida-mcp-rs</code> (<a href="https://github.com/blacktop/ida-mcp-rs">blacktop/ida-mcp-rs</a>, about 809 stars) is the leading option. On macOS and Linux use Homebrew; on Windows use Scoop:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># macOS / Linux</span>
</span></span><span style="display:flex;"><span>brew install blacktop/tap/ida-mcp-rs
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Windows</span>
</span></span><span style="display:flex;"><span>scoop install ida-mcp-rs
</span></span></code></pre></div><p>The server creates an isolated IDA profile, and by default disables Lumina auto-lookup so your analysis does not leak function names to the Lumina server.</p>
<p><strong>Step 4 — Verify it runs.</strong> Start the server against a sample binary:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ida-mcp-rs --db sample.exe
</span></span></code></pre></div><p>If the server starts and lists its tools over stdio, your headless IDA path is ready.</p>
<h2 id="configuring-your-mcp-client-claude-code--cursor-to-talk-to-the-headless-server">Configuring your MCP client (Claude Code / Cursor) to talk to the headless server</h2>
<p>MCP servers expose two transports: stdio (spawning the server as a child process) and streamable HTTP (connecting to a running server over the network). Both are supported by <code>ida-mcp-rs</code>.</p>
<p>For Claude Code, add an entry to your MCP configuration:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-json" data-lang="json"><span style="display:flex;"><span>{
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">&#34;mcpServers&#34;</span>: {
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">&#34;ida&#34;</span>: {
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;command&#34;</span>: <span style="color:#e6db74">&#34;ida-mcp-rs&#34;</span>,
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">&#34;args&#34;</span>: [<span style="color:#e6db74">&#34;--db&#34;</span>, <span style="color:#e6db74">&#34;target.bin&#34;</span>]
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>  }
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p>For Cursor, use the MCP settings panel and point it at the same server. If you run many analyses concurrently, start the HTTP server and connect all clients to it:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ida-mcp-rs serve-http --max-workers <span style="color:#ae81ff">4</span>
</span></span></code></pre></div><p>Then every connected client shares the same stateful analysis pool, with each agent working on its own database context to avoid cross-contamination between concurrent sessions.</p>
<h2 id="core-tools-for-a-vibe-reversing-session-decompile-xrefs-rename-comments">Core tools for a vibe-reversing session: decompile, xrefs, rename, comments</h2>
<p>An effective agent session leans on a small set of high-value tools. Across the Rust-native servers and <code>ida-pro-mcp</code>-style wrappers, these are the same fundamentals:</p>
<ul>
<li><strong>Decompile a function</strong> (<code>decompile</code> / <code>analyse_hexrays</code>) — get Hex-Rays pseudocode for a given address or function name.</li>
<li><strong>Cross-references</strong> (<code>xrefs_to</code>, <code>xrefs_from</code>) — find who calls a function or writes to a global.</li>
<li><strong>Rename</strong> (<code>set_name</code>) — give functions and variables meaningful names that persist in the IDB.</li>
<li><strong>Comments</strong> (<code>set_comment</code>) — annotate addresses; mutation tools in <code>ida-mcp 2.0</code> return the old comment so the agent sees the diff without a read-back round trip.</li>
<li><strong>Read memory</strong> (<code>read_memory</code>) — inspect raw bytes at an address or in a structure.</li>
<li><strong>Strings</strong> — enumerate strings to map functionality in unknown binaries.</li>
</ul>
<p>A typical &ldquo;vibe&rdquo; session looks like this. You ask: &ldquo;Find the function that handles the network packet, annotate its structure fields, and tell me if there is an overflow before the bounds check.&rdquo; The agent decompiles the entry point, follows xrefs to the handler, reads the buffer allocation, and reports the vulnerability — all while adding names and comments to the IDB that a human reviewer can inspect afterward.</p>
<p>Mutation tools matter for workflow. In <code>ida-mcp 2.0</code>, every write tool returns <code>old_*</code> fields (<code>old_comment</code>, <code>old_name</code>, <code>old_color</code>, <code>old_bytes</code>), so the AI sees exactly what changed without re-reading the database. <code>Ramune-ida</code> goes further: write tools automatically create undo points, and crash recovery reopens the IDB transparently, so a failed analysis does not lose your annotations.</p>
<h2 id="background-analysis-and-async-task-handling-for-large-binaries">Background analysis and async task handling for large binaries</h2>
<p>Decompiling a 50 MB firmware image synchronously would freeze your agent&rsquo;s turn. Rust-native servers handle this with background analysis.</p>
<p>In <code>ida-mcp-rs</code>, call <code>analyze_funcs</code> with <code>background: true</code>. The server returns a <code>task_id</code> immediately, and you poll <code>task_status</code> until completion:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-text" data-lang="text"><span style="display:flex;"><span>analyze_funcs(background=true) -&gt; task_id
</span></span><span style="display:flex;"><span>task_status(task_id) -&gt; progress + results
</span></span></code></pre></div><p>The agent can issue the background analysis, then work on other parts of the binary, and return to collect results when the task finishes. This keeps the LLM responsive while the engine grinds through thousands of functions.</p>
<p>Multi-worker HTTP mode generalizes this: a pool of workers analyzes several databases concurrently, so one agent can diff one firmware variant while another maps a second. This is the pattern used for malware variant analysis and firmware diffing across an entire family.</p>
<h2 id="advanced-run_script-multi-database-analysis-malware-variant-diffing">Advanced: run_script, multi-database analysis, malware variant diffing</h2>
<p>When the built-in tool set is not enough, arbitrary IDAPython unlocks the full engine. In <code>ida-mcp-rs</code>, <code>run_script</code> executes embedded IDAPython with a configurable timeout (default 120 seconds, maximum 600), and returns the printed output or errors. In <code>ida-mcp 2.0</code>, <code>run_script</code> is gated by the <code>IDA_MCP_ALLOW_SCRIPTS</code> environment variable — deliberate, because arbitrary script execution is a powerful and dangerous capability.</p>
<p>Multi-database analysis is the standout advanced feature. <code>ida-mcp 2.0</code> supports multiple IDBs at once, with a supervisor that proxies resource reads across worker databases. Practical uses:</p>
<ul>
<li><strong>Malware variant analysis</strong> — load five samples of a family, find common and divergent functions, and map the polymorphic parts.</li>
<li><strong>Firmware diffing</strong> — compare two versions of a bootloader to isolate exactly which functions changed between releases, then decompile only those.</li>
<li><strong>Patch analysis</strong> — analyze the original and patched binaries side by side so the agent highlights the vulnerability fix.</li>
</ul>
<p>At RECON 2026, Elias Bachaalany demonstrated an agent analyzing a folder of about 80 Windows kernel drivers with a single prompt in roughly four hours, recovering IOCTL interfaces and emitting a compilable CMake client. That is the practical ceiling of today&rsquo;s multi-database headless workflows.</p>
<h2 id="comparison-rust-native-ida-mcp-rs-vs-python-ida-pro-mcp-vs-sql-surface-tools">Comparison: Rust-native ida-mcp-rs vs Python ida-pro-mcp vs SQL-surface tools</h2>
<p>The 2026 IDA MCP landscape splits into three approaches, each with a different philosophy.</p>
<table>
  <thead>
      <tr>
          <th>Approach</th>
          <th>Exemplar</th>
          <th>Stars (approx)</th>
          <th>Strength</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Rust-native headless</td>
          <td><code>blacktop/ida-mcp-rs</code></td>
          <td>~809</td>
          <td>Performance, memory safety, background analysis</td>
      </tr>
      <tr>
          <td>Python wrapper + plugin</td>
          <td><code>mrexodia/ida-pro-mcp</code></td>
          <td>~7,898</td>
          <td>Most mature, richest tool surface, huge community</td>
      </tr>
      <tr>
          <td>SQL-as-interface</td>
          <td>RECON 2026 &ldquo;SELECT * FROM binary&rdquo;</td>
          <td>new</td>
          <td>One schema replaces ~20 MCP tools</td>
      </tr>
  </tbody>
</table>
<p><code>ida-pro-mcp</code> is the most popular project on GitHub for IDA MCP, with roughly 7,898 stars and 959 forks. It exposes disassembly, type inference, debugger control, pattern matching, call-graph analysis, and batch rename/patch, and it supports headless idalib mode. Its breadth makes it the best first stop if you want the largest tool set.</p>
<p><code>ida-mcp-rs</code> is narrower but faster and memory-safe, and its background-analysis and HTTP multi-worker modes are genuinely better for large corpora.</p>
<p>The SQL-surface idea from RECON 2026 challenges the entire tool-list paradigm: instead of ~20 MCP tools, one schema where you <code>SELECT</code> and <code>UPDATE</code> functions, xrefs, strings, and imports tables. It is not yet a shipped tool, but it signals where the ecosystem is heading. For practical 2026 work, choose <code>ida-pro-mcp</code> for breadth or <code>ida-mcp-rs</code> for performance.</p>
<h2 id="security-and-licensing-sandboxing-idapython-worker-isolation-ida-license-requirements">Security and licensing: sandboxing IDAPython, worker isolation, IDA license requirements</h2>
<p>Headless IDA MCP is a real attack surface, and the riskiest capability is arbitrary script execution. <code>run_script</code> / <code>execute_python</code> give the AI agent full IDAPython power — and by extension full access to the filesystem and network of the host running IDA.</p>
<p>Practical hardening:</p>
<ul>
<li><strong>Never run it against untrusted prompts on a shared host.</strong> Assume a malicious prompt could run arbitrary code.</li>
<li><strong>Gate scripts.</strong> Keep <code>IDA_MCP_ALLOW_SCRIPTS</code> unset unless you explicitly need scripting.</li>
<li><strong>Use worker isolation.</strong> <code>--max-workers</code> and per-agent context isolation (as in <code>ida-pro-mcp</code>) keep concurrent analyses from contaminating each other. <code>Ramune-ida</code> uses stateless disposable workers, so a crash cannot corrupt your primary IDB.</li>
<li><strong>Disable Lumina auto-lookup.</strong> Do this by default to avoid leaking function-name queries to Hex-Rays&rsquo;s Lumina service.</li>
<li><strong>Set timeouts.</strong> A 120-to-600-second cap on <code>run_script</code> prevents a runaway analysis loop from consuming the host.</li>
</ul>
<p>Licensing is non-negotiable. Every headless path requires IDA Pro 9.4 (or newer) with a valid license, because <code>idalib</code> is part of IDA itself. There is no headless free tier. Ensure your license accounts for each worker or database you run concurrently on your team&rsquo;s infrastructure.</p>
<h2 id="conclusion-when-headless-ida-mcp-should-and-shouldnt-replace-the-gui">Conclusion: when headless IDA MCP should (and shouldn&rsquo;t) replace the GUI</h2>
<p>Use headless IDA MCP when the work is repetitive, bulk, or parallel — scanning a malware family, diffing firmware versions, auditing a folder of kernel drivers, or extracting Hex-Rays pseudocode at scale. The AI agent turns decompilation, xref-walking, renaming, and annotation into a conversation, and the throughput of a Rust-native server is far beyond what a human clicking through the GUI can match.</p>
<p>Keep the GUI when the work is exploratory, creative, or deeply interactive: designing a custom analysis algorithm, reverse engineering a novel obfuscation scheme, or when you need the full visual graph view to form a hypothesis. Headless MCP is a complement, not a replacement, for the analyst&rsquo;s own judgment.</p>
<p>Start small: install IDA Pro 9.4, run <code>idalib</code> or <code>ida-mcp-rs</code> headlessly against one sample, and let an agent rename and annotate a single function. Once you see the IDB fill with quality names and comments, scale to as many workers as your hardware and license allow — and join the 2026 shift where reverse engineering is increasingly a conversation with your decompiler.</p>
<h2 id="faq">FAQ</h2>
<p><strong>Do I need IDA Pro to use headless MCP?</strong>
Yes. Every headless approach, whether <code>idalib</code>, <code>ida-mcp-rs</code>, or <code>ida-pro-mcp</code>, requires a licensed copy of IDA Pro 9.4 or newer because <code>idalib</code> ships inside IDA itself. There is no free headless mode.</p>
<p><strong>What is the difference between idalib and ida-mcp-rs?</strong>
<code>idalib</code> is Binarly&rsquo;s idiomatic Rust binding for the IDA SDK — a library you build tools with. <code>ida-mcp-rs</code> is a ready-made Rust-native MCP server (built on the same kind of stack) that exposes IDA to AI agents over stdio or HTTP. Use the bindings to build custom tooling; use the MCP server to get agent integration quickly.</p>
<p><strong>Which IDA MCP server is most popular in 2026?</strong>
<code>mrexodia/ida-pro-mcp</code> is the largest, with roughly 7,898 stars and 959 forks. It offers the broadest tool surface and supports headless idalib mode. <code>blacktop/ida-mcp-rs</code> (~809 stars) is the leading Rust-native option with faster performance and background analysis.</p>
<p><strong>Is running IDAPython scripts through the MCP server safe?</strong>
Only with controls. Arbitrary script execution gives the agent full host access, so keep <code>run_script</code> gated (for example via <code>IDA_MCP_ALLOW_SCRIPTS</code>), set timeouts, use worker isolation, run on dedicated hosts, and never point it at untrusted prompts on a shared system.</p>
<p><strong>Can the agent do background analysis on very large binaries?</strong>
Yes. Servers such as <code>ida-mcp-rs</code> support asynchronous analysis where <code>analyze_funcs(background: true)</code> returns a <code>task_id</code> you poll with <code>task_status</code>, letting the agent keep working while the engine processes thousands of functions. Multi-worker HTTP mode extends this across several databases concurrently.</p>
]]></content:encoded></item></channel></rss>