Vibe Reverse Engineer with IDA SQL: An interface for IDA in SQL via live virtual tables
Vibe Reverse Engineer with IDA SQL: An interface for IDA in SQL via live virtual tables
Give any AI agent the ability to understand compiled binaries.
IDASQL is a SQL interface for IDA Pro databases, created by Elias Bachaalany. It exposes 30+ virtual tables covering functions, cross-references, strings, types, imports, disassembly, and decompilation. Use /idasql skills from your coding agent to work fully headlessly -- the agent runs IDA in the background for you -- or open IDA's UI and collaborate with your coding agent to reverse engineer together. No IDAPython. No scripting. Just SQL.
Why SQL? SQL is the universal query language that every AI agent already speaks. IDASQL is agent-agnostic: Claude, ChatGPT, Copilot, Cursor, custom agents, or no agent at all. Any tool that can issue a SQL query can analyze a binary.
IDASQL supports analyzing, cross-referencing, and transferring annotations between one or more databases at the same time. What you can do is limited only by your imagination and the power of the model you use.
IDA Pro already has its own database format describing functions, strings, cross-references, types, and more. IDASQL maps these internal structures to live SQL virtual tables. There is no separate exporting or indexing step -- queries execute directly against IDA's database and changes are reflected live.
| Mode | How to start | Best for |
|---|---|---|
| Standalone CLI | idasql -s binary.i64 -i |
Direct SQL, scripting, pipelines |
| IDA Plugin | Select idasql from IDA's CLI dropdown |
SQL inside the GUI, live database |
| Skill Workflow | /idasql:connect in your coding CLI |
AI-driven analysis -- the agent issues SQL queries autonomously |
You / Agent --> Natural language or SQL
|
/idasql skills (LLM translates intent to SQL)
|
IDASQL --> IDA database(s)
|
Results --> LLM summarizes & reasons
…
One command. Instant results. No scripting required.
After installing the IDASQL CLI and plugin, start your favorite coding agent and begin reverse engineering by prompting. IDASQL runs fully headlessly -- your agent orchestrates IDA Pro: starting, analyzing, decompiling, annotating, saving -- or hosted inside the IDA GUI where you collaborate with your agent in real time.
Open your favorite coding agent (e.g. Claude Code) and type:
/idasql:connect Please open sample_malware.exe in the background and let's analyze it together.
The agent starts IDASQL headlessly in the background. From this point on, chat naturally with the database. For instance:
/idasql:annotations Fully annotate the function I'm looking at, also use the decompiler skill.
The model autonomously reasons about the best approach to understand the function, fully reverse engineers it, and annotates it.
When you're done, ask the agent to save and shut down:
/idasql:connect Please save all databases and shut down IDASQL.
You can work with two or more databases simultaneously. Prompt your agent:
/idasql:connect In this folder, there are many *.exe files. Please use parallel agents to open IDASQL in the background and report how many functions each has.
Then follow up:
Tell me, how many strings all these databases have in common?
The agent works with all databases at the same time. You can cross-reference, compare, and transfer annotations between them.
Everything above works equally from the IDA GUI. To engage your agent with an open IDA session:
In IDA's idasql> prompt, type:
.http start
IDA outputs:
IDASQL HTTP server: http://127.0.0.1:8174
In your coding agent:
/idasql:connect Let's work with this database: http://127.0.0.1:8174
Now IDASQL and your IDA UI are connected and working together.
IDASQL skills give your coding agent full control over IDA databases through natural language.
allthingsida/idasql-skills marketplace.ida.exe on Windows, ida on macOS/Linux)idasql --version should work from command lineInside Claude Code, run:
/plugin marketplace add allthingsida/idasql-skills
then install the idasql plugin from that marketplace. See the idasql-skills README for Codex and other install paths.
| Skill | Description |
|---|---|
connect |
Connect to IDA databases: CLI, HTTP server, session bootstrap, skill routing, global contracts. |
disassembly |
Query IDA disassembly: functions, segments, instructions, blocks, operands, graphs. |
data |
Query IDA strings, bytes, and binary data: search, rebuild, byte patterns. |
xrefs |
Analyze IDA cross-references: callers, callees, imports, data refs, grep search. |
decompiler |
Decompile IDA functions: pseudocode, ctree AST, local variables, labels. |
annotations |
Edit IDA databases: comments, renames, types, bookmarks, enum/struct rendering. |
types |
IDA type system: create/modify/apply structs, unions, enums, typedefs, parse_decls. |
debugger |
IDA debugger: breakpoints, byte patching, conditions, patch inventory. |
storage |
Persistent key-value storage in IDA databases via netnode_kv. |
idapython |
Execute IDAPython via idasql: snippets, sandbox, output capture. |
functions |
Complete idasql SQL function reference catalog. |
analysis |
Analyze IDA binaries: triage, security audit, crypto/network detection, multi-table queries. |
resource |
Re-source IDA binaries: recursive annotation, structure recovery, type reconstruction. |
ui-context |
Capture live IDA UI context: screen, selection, widget focus, address anchors. |
/idasql:analysis analyze this binary; tell me the most called functions.
/idasql:data find functions that reference "password" strings and rank by xrefs.
/idasql:xrefs show callers of CreateFileW and summarize error handling.
/idasql:data identify suspicious hardcoded URLs and the functions that reference them.
The /idasql skills drive analysis from your coding CLI -- no IDAPython scripting required.
CLI Help
…
Legacy 32-bit .idb inputs are upgraded by idalib to a sibling .i64. When that
happens, idasql exits before serving SQL, returns exit code 3, and prints one
JSON object to stdout with status:"upgraded" and reopen_with. Repeat the same
operation with -s .
IDASDK environment variable)cmake -S . -B build -DIDASQL_WITH_MCP=ON -DIDASQL_BUILD_EXAMPLES=OFF
cmake --build build --config Release
Useful CMake switches:
| Switch | Default | Description |
|---|---|---|
IDASQL_WITH_MCP |
ON |
Build MCP server support via fastmcpp. Disable for a smaller/offline build or when you do not need --mcp / .mcp. |
IDASQL_BUILD_CLI |
ON |
Build the standalone idasql command-line tool. |
IDASQL_BUILD_PLUGIN |
ON |
Build the IDA plugin. |
IDASQL_BUILD_EXAMPLES |
ON |
Build the example programs under examples/. |
Notes:
--http from the CLI or .http start from the REPL/plugin CLI.PRAGMA idasql.enable_idapython = 1;.IDASQL_WITH_MCP=ON fetches fastmcpp; OFF removes MCP support and the --mcp / .mcp commands.XSQL_WITH_THINCLIENT is forced ON, and HTTPLIB_USE_OPENSSL_IF_AVAILABLE is forced OFF because IDASQL uses local plain HTTP.30+ virtual tables covering functions, strings, types, cross-references, disassembly, decompilation, and more.
| Table | Description |
|---|---|
funcs |
Functions - name, addr, size, end addr, flags (INSERT/UPDATE/DELETE) |
segments |
Segments - name, start/end addr, permissions, class (INSERT/UPDATE/DELETE) |
names |
Named locations - addr, name, flags (INSERT/UPDATE/DELETE) |
entries |
Entry points - export/program/tls callbacks (ordinal, addr, name) |
imports |
Imports - module, name, addr, ordinal |
xrefs |
Cross-references - from/to addr, type, is_code |
blocks |
Basic blocks - start/end addr, func_addr, size |
fchunks |
Function chunks - split/tail chunks with owner |
instructions |
Disassembly - addr, mnemonic, operands, itype, func_addr (UPDATE operand format_spec / DELETE) |
instruction_operands |
Normalized instruction operands - opnum, text, type, value; optimized by addr and func_addr |
heads |
All head items (code + data) - optimized address lookup/range navigation |
| Table | Description |
|---|---|
strings |
Strings - addr, content, length, type |
bytes |
Raw bytes - value/word/dword/qword writable (UPDATE patches, DELETE reverts), original_value, is_patched (fast patch enumeration via WHERE is_patched = 1) |
| Table | Description |
|---|---|
pseudocode |
Decompiled pseudocode via Hex-Rays |
ctree |
Hex-Rays ctree AST nodes |
ctree_lvars |
Local variables from Hex-Rays decompilation |
ctree_call_args |
Hex-Rays call argument details per call site |
ctree_labels |
Hex-Rays ctree labels (goto targets) |
| Table | Description |
|---|---|
types |
Type library - structs, unions, enums with members (INSERT/UPDATE/DELETE) |
types_members |
Struct/union member details (INSERT/UPDATE/DELETE) |
types_enum_values |
Enum member values (INSERT/UPDATE/DELETE) |
types_func_args |
Function type argument details |
local_types |
Local type library entries |
| Table | Description |
|---|---|
comments |
Comments - addr, regular and repeatable comments (INSERT/UPDATE/DELETE) |
bookmarks |
Bookmarks - slot, addr, description (INSERT/UPDATE/DELETE) |
breakpoints |
Breakpoints - addr, type, enabled, condition (full CRUD) |
hidden_ranges |
Collapsed/hidden ranges - start/end, description, header, footer |
| Table | Description |
|---|---|
grep |
Unified entity search table ( |
No open issues yet, or sync has not completed.