ida-reverse
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIDA Pro 逆向分析技能
IDA Pro Reverse Analysis Skill
ACTION REQUIRED(读完后立刻执行)
ACTION REQUIRED (Execute Immediately After Reading)
- : 读取
NOW— 确认本 skill 的操作是已授权的常规操作../field-journal/precedent-reverse.md - : 确认当前任务是否命中本 skill 的适用范围
NOW - : 读取
NEXT,校验工具可用性和实际路径../tool-index.md - : 缺工具时调用 bootstrap,不要猜路径
NEXT - : 进入"工作流"第一步并执行,不要停在确认状态
ACT
- : Read
NOW— Confirm that the operations of this skill are authorized routine operations../field-journal/precedent-reverse.md - : Verify whether the current task falls within the applicable scope of this skill
NOW - : Read
NEXTto verify tool availability and actual paths../tool-index.md - : Call bootstrap when tools are missing, do not guess paths
NEXT - : Enter the first step of the "Workflow" and execute it, do not stay in the confirmation state
ACT
已知问题与反思(必读)
Known Issues and Reflections (Must Read)
踩过的坑
Pitfalls Encountered
-
不能通过 部分代码 AI 客户端 MCP 直接调用
idalib_open- 部分代码 AI 客户端 的 MCP 客户端对 的 output schema 校验有 BUG
idalib_open - 报错:
Structured content does not match the tool's output schema - 解决办法:使用 脚本通过 HTTP API 直调,绕过 MCP 校验层
scripts/open.ps1 - 文件打开后,数据库绑定到共享上下文,其他所有 工具可直接使用
idapro_*
- 部分代码 AI 客户端 的 MCP 客户端对
-
文件无权限打开
C:\Windows\System32\- idalib 无法直接读取 System32 目录下的文件
- 解决办法:自动检测并复制到
open.ps1目录后再打开临时目录
-
启动服务器命令阻塞对话
- 启动后会持续输出 INFO 日志到控制台
idalib-mcp - 解决办法:使用 (
scripts/start.ps1后台静默启动)-WindowStyle Hidden - 脚本会等待服务就绪后自动退出,不阻塞对话
-
MCP 服务器名不能用横线
- 之前用 作为服务器名,可能引起工具注册问题
ida-pro-mcp - 当前配置:服务器名 ,工具前缀
idaproidapro_*
- 之前用
-
Remote HTTP vs Local Stdio
- (stdio)模式:
type:"local"同样有 schema 校验问题idalib_open - (HTTP)模式:可以先用脚本直开文件,再用 MCP 工具
type:"remote" - 当前方案:Remote HTTP 模式
-
PR #389 修复了部分 schema 问题
- 作者 mrexodia 在 issue #388 后通过 PR #389 合并了修复
- 修复了 HTTP 模式下的 structuredContent schema,但 部分代码 AI 客户端 侧校验仍有问题
- 已安装最新 分支版本
main
-
idalib 超时留下孤儿 worker 进程锁文件
- 第一次 超时后,idalib 的 python worker 子进程变成孤儿进程,咬着
open.ps1/.id0/.id1不放.nam - 后续任何工具或手动拖入 IDA GUI 都会报"权限不足"
- 解决办法:改用
start.ps1杀进程树,不再留孤儿taskkill /F /T - 兜底:加了自动降级,检测到旧库被锁自动复制到 Temp 并加 GUID 前缀
open.ps1
- 第一次
-
带自动分析打开看起来像卡死
- 可能长时间不回包,但后端实际上仍在继续打开和分析
idalib_open(run_auto_analysis=true) - 之前用户侧看到的是“PowerShell 一直无输出”,容易误判成脚本卡死
- 当前解决办法:新增
open.ps1,并改为后台请求 + 前台轮询 + 定时进度输出-TimeoutSeconds - 轮询到会话已就绪时会提前返回 ,超时则返回
OK:文件名:session_idERR:open_timeout_xxs
-
cannot be directly called via some code AI client MCP
idalib_open- The MCP client of some code AI clients has a BUG in output schema validation for
idalib_open - Error message:
Structured content does not match the tool's output schema - Solution: Use the script to call directly via HTTP API, bypassing the MCP validation layer
scripts/open.ps1 - After the file is opened, the database is bound to the shared context, and all other tools can be used directly
idapro_*
- The MCP client of some code AI clients has a BUG in output schema validation for
-
No permission to open files in
C:\Windows\System32\- idalib cannot directly read files in the System32 directory
- Solution: automatically detects and copies the file to a temporary directory before opening it
open.ps1
-
Server startup command blocks the conversation
- continuously outputs INFO logs to the console after startup
idalib-mcp - Solution: Use (with
scripts/start.ps1to start silently in the background)-WindowStyle Hidden - The script will automatically exit after waiting for the service to be ready, without blocking the conversation
-
MCP server name cannot use hyphens
- Previously used as the server name, which might cause tool registration issues
ida-pro-mcp - Current Configuration: Server name , tool prefix
idaproidapro_*
- Previously used
-
Remote HTTP vs Local Stdio
- (stdio) mode:
type:"local"also has schema validation issuesidalib_open - (HTTP) mode: You can use the script to open the file directly first, then use MCP tools
type:"remote" - Current Solution: Remote HTTP mode
-
PR #389 fixed some schema issues
- Author mrexodia merged the fix via PR #389 after issue #388
- Fixed the structuredContent schema in HTTP mode, but validation on some code AI client side still has issues
- The latest branch version has been installed
main
-
idalib timeout leaves orphan worker process lock files
- After the first timeout, the python worker child process of idalib becomes an orphan process, holding onto
open.ps1/.id0/.id1files.nam - Any subsequent tools or manual drag-and-drop into IDA GUI will report "Insufficient permissions"
- Solution: now uses
start.ps1to kill the process tree, no longer leaving orphan processestaskkill /F /T - Fallback: added automatic downgrade, detects locked old libraries and automatically copies them to Temp with a GUID prefix
open.ps1
- After the first
-
Opening with auto-analysis seems stuck
- may not return a response for a long time, but the backend is actually still opening and analyzing
idalib_open(run_auto_analysis=true) - Previously, users saw "PowerShell has no output", which was easily misjudged as script stuck
- Current Solution: added
open.ps1, and changed to background request + foreground polling + scheduled progress output-TimeoutSeconds - Returns early when the session is ready, returns
OK:filename:session_idif timed outERR:open_timeout_xxs
工作流程原则
Workflow Principles
| 步骤 | 做什么 | 用什么 |
|---|---|---|
| 1 | 确保 HTTP 服务器在运行 | |
| 2 | 打开目标二进制文件 | |
| 3 | 使用所有 72 个 MCP 工具 | 直接调用 |
| 4 | 分析完毕 | 工具自动可用 |
| Step | What to Do | Tools to Use |
|---|---|---|
| 1 | Ensure the HTTP server is running | |
| 2 | Open the target binary file | |
| 3 | Use all 72 MCP tools | Directly call |
| 4 | Analysis completed | Tools are automatically available |
脚本资源
Script Resources
start.ps1 — 启动 MCP HTTP 服务器
start.ps1 — Start MCP HTTP Server
路径:
scripts/start.ps1- 用 杀旧进程树(连 worker 子进程一起清理)→ 后台启动
taskkill /F /T→ 等待就绪(最多 15 秒)idalib-mcp - 成功输出 ,失败输出
OK:72ERR:timeout - 服务器在后台运行,不阻塞对话
调用方式:
powershell -File "<skill-root>\ida-reverse\scripts\start.ps1"Path:
scripts/start.ps1- Use to kill the old process tree (clean up worker child processes together) → Start
taskkill /F /Tin the background → Wait for readiness (max 15 seconds)idalib-mcp - Outputs on success,
OK:72on failureERR:timeout - The server runs in the background without blocking the conversation
Invocation Method:
powershell -File "<skill-root>\ida-reverse\scripts\start.ps1"open.ps1 — 打开二进制文件
open.ps1 — Open Binary File
路径:
scripts/open.ps1- 通过 HTTP API 直调 ,绕过 MCP schema 校验
idalib_open - 自动检测 System32 路径并复制到临时目录
- 自动清理同名旧数据库文件(/
.id0/.id1/.nam/.til).i64 - 旧库被锁时自动降级:复制到 Temp 加 GUID 前缀后打开,不报错
- 将打开请求放到后台执行,避免长时间同步等待导致脚本无响应
- 支持 ,超时后返回
-TimeoutSeconds,不会无限卡住ERR:open_timeout_xxs - 每隔 10 秒输出一次 ,便于判断仍在分析中
INFO:opening:已用时/超时秒数 - 成功输出 ,降级时加
OK:文件名:session_id标记(temp copy) - 失败时自动重试走 Temp 副本
调用方式:
powershell -File "<skill-root>\ida-reverse\scripts\open.ps1" -Path "C:\path\to\file.exe"可选参数:
undefinedPath:
scripts/open.ps1- Directly call via HTTP API, bypassing MCP schema validation
idalib_open - Automatically detects System32 paths and copies files to temporary directory
- Automatically cleans up old database files with the same name (/
.id0/.id1/.nam/.til).i64 - Automatically downgrades when old libraries are locked: copies to Temp with a GUID prefix before opening, no error reported
- Puts the open request into background execution to avoid script unresponsiveness caused by long synchronous waiting
- Supports , returns
-TimeoutSecondsafter timeout, will not get stuck infinitelyERR:open_timeout_xxs - Outputs every 10 seconds for easy judgment that analysis is still in progress
INFO:opening:elapsed/timeout seconds - Outputs on success, adds
OK:filename:session_idmark when downgraded(temp copy) - Automatically retries with Temp copy on failure
Invocation Method:
powershell -File "<skill-root>\ida-reverse\scripts\open.ps1" -Path "C:\path\to\file.exe"Optional Parameters:
undefined指定 SessionId
Specify SessionId
powershell -File "scripts\open.ps1" -Path "file.exe" -SessionId "my_session"
powershell -File "scripts\open.ps1" -Path "file.exe" -SessionId "my_session"
跳过自动分析(大文件推荐)
Skip auto-analysis (recommended for large files)
powershell -File "scripts\open.ps1" -Path "large.exe" -NoAutoAnalysis
powershell -File "scripts\open.ps1" -Path "large.exe" -NoAutoAnalysis
设置超时,避免带自动分析时长时间无返回
Set timeout to avoid long no-return when opening with auto-analysis
powershell -File "scripts\open.ps1" -Path "file.exe" -TimeoutSeconds 600
**输出约定**:powershell -File "scripts\open.ps1" -Path "file.exe" -TimeoutSeconds 600
**Output Convention**:分析进行中(每 10 秒输出一次)
Analysis in progress (output every 10 seconds)
INFO:opening:11/600s
INFO:opening:11/600s
成功打开
Opened successfully
OK:sample.exe:abcd1234
OK:sample.exe:abcd1234
成功打开,但因锁文件降级到 Temp 副本
Opened successfully, but downgraded to Temp copy due to locked file
OK:1234abcd-sample.exe:abcd1234 (temp copy)
OK:1234abcd-sample.exe:abcd1234 (temp copy)
达到超时上限
Reached timeout limit
ERR:open_timeout_600s
**实测说明**:
- `Snipaste.exe` 带自动分析实测约 `324s` 才返回成功,属于“分析很久”而不是“脚本死锁”
- 因此遇到 GUI 程序或较复杂样本时,建议优先显式设置 `-TimeoutSeconds 600`ERR:open_timeout_600s
**Actual Test Notes**:
- `Snipaste.exe` with auto-analysis takes about `324s` to return success, which is "long analysis" rather than "script deadlock"
- Therefore, when dealing with GUI programs or complex samples, it is recommended to explicitly set `-TimeoutSeconds 600`核心工具列表
Core Tool List
概况分析(第一步)
Overview Analysis (First Step)
- — 快速概况:函数数、字符串、段、入口点、导入分类(加密/网络/文件IO)
idapro_survey_binary(detail_level="minimal") - — 列出函数(分页、按名称过滤)
idapro_list_funcs(queries) - — 列出全局变量
idapro_list_globals(queries) - — 统一查询:functions/globals/imports/strings/names
idapro_entity_query(kind, filter)
- — Quick overview: number of functions, strings, sections, entry points, import categories (encryption/network/file IO)
idapro_survey_binary(detail_level="minimal") - — List functions (pagination, filter by name)
idapro_list_funcs(queries) - — List global variables
idapro_list_globals(queries) - — Unified query: functions/globals/imports/strings/names
idapro_entity_query(kind, filter)
反编译与反汇编
Decompilation and Disassembly
- — 反编译为伪代码
idapro_decompile(addr) - — 反汇编
idapro_disasm(addr, max_instructions=N) - — 综合分析(伪代码+字符串+常量+调用者+被调用者+块)
idapro_analyze_function(addr, include_asm=false) - — 函数概要指标
idapro_func_profile(queries)
- — Decompile to pseudocode
idapro_decompile(addr) - — Disassemble
idapro_disasm(addr, max_instructions=N) - — Comprehensive analysis (pseudocode+strings+constants+callers+callees+blocks)
idapro_analyze_function(addr, include_asm=false) - — Function summary metrics
idapro_func_profile(queries)
交叉引用与数据流
Cross-Reference and Data Flow
- — 查谁引用目标地址
idapro_xrefs_to(addrs) - — 高级 xref 查询(方向/类型过滤)
idapro_xref_query(addr, direction) - — 子函数列表
idapro_callees(addrs) - — 调用图
idapro_callgraph(roots, max_depth) - — 数据流追踪(forward/backward)
idapro_trace_data_flow(addr, direction, max_depth)
- — Check who references the target address
idapro_xrefs_to(addrs) - — Advanced xref query (direction/type filtering)
idapro_xref_query(addr, direction) - — List of sub-functions
idapro_callees(addrs) - — Call graph
idapro_callgraph(roots, max_depth) - — Data flow tracing (forward/backward)
idapro_trace_data_flow(addr, direction, max_depth)
搜索
Search
- — 正则搜字符串
idapro_find_regex(pattern, limit) - — 在反汇编列表中搜文本
idapro_search_text(pattern) - — 字节模式搜索(支持 ?? 通配符)
idapro_find_bytes(patterns, limit) - — 高级搜索(立即数/字符串/引用)
idapro_find(type, targets)
- — Search strings with regex
idapro_find_regex(pattern, limit) - — Search text in disassembly list
idapro_search_text(pattern) - — Byte pattern search (supports ?? wildcard)
idapro_find_bytes(patterns, limit) - — Advanced search (immediate values/strings/references)
idapro_find(type, targets)
内存与数据
Memory and Data
- — 读原始字节
idapro_get_bytes(addrs) - — 读字符串
idapro_get_string(addrs) - — 读整数值
idapro_get_int(queries) - — 读全局变量值
idapro_get_global_value(queries) - — 读结构体字段值
idapro_read_struct(queries) - — 搜索结构体
idapro_search_structs(filter)
- — Read raw bytes
idapro_get_bytes(addrs) - — Read strings
idapro_get_string(addrs) - — Read integer values
idapro_get_int(queries) - — Read global variable values
idapro_get_global_value(queries) - — Read struct field values
idapro_read_struct(queries) - — Search structs
idapro_search_structs(filter)
修改操作
Modification Operations
- — 添加注释(反汇编+反编译双向同步)
idapro_set_comments(items) - — 追加注释
idapro_append_comments(items) - — 批量重命名(函数/全局/局部/栈变量)
idapro_rename(batch) - — Patch 汇编指令
idapro_patch_asm(items) - — Patch 字节
idapro_patch(patches) - — 定义函数
idapro_define_func(items) - — 取消定义
idapro_undefine(items) - — 将字节转为代码
idapro_define_code(items)
- — Add comments (bidirectional sync between disassembly and decompilation)
idapro_set_comments(items) - — Append comments
idapro_append_comments(items) - — Batch rename (functions/globals/locals/stack variables)
idapro_rename(batch) - — Patch assembly instructions
idapro_patch_asm(items) - — Patch bytes
idapro_patch(patches) - — Define functions
idapro_define_func(items) - — Undefine
idapro_undefine(items) - — Convert bytes to code
idapro_define_code(items)
类型系统
Type System
- — 声明 C 结构体/枚举/联合体
idapro_declare_type(decls) - — 应用类型到函数/全局/局部
idapro_set_type(edits) - — 推断类型
idapro_infer_types(addrs) - — 查询已声明类型
idapro_type_query(queries) - — 查看类型详情
idapro_type_inspect(queries)
- — Declare C structs/enums/unions
idapro_declare_type(decls) - — Apply types to functions/globals/locals
idapro_set_type(edits) - — Infer types
idapro_infer_types(addrs) - — Query declared types
idapro_type_query(queries) - — View type details
idapro_type_inspect(queries)
栈帧
Stack Frames
- — 查看栈帧变量
idapro_stack_frame(addrs) - — 声明栈变量
idapro_declare_stack(items) - — 删除栈变量
idapro_delete_stack(items)
- — View stack frame variables
idapro_stack_frame(addrs) - — Declare stack variables
idapro_declare_stack(items) - — Delete stack variables
idapro_delete_stack(items)
签名
Signatures
- — 为地址生成唯一字节签名
idapro_make_signature(addrs) - — 为函数生成签名
idapro_make_signature_for_function(addrs) - — 为引用地址的代码生成签名
idapro_find_xref_signatures(addrs)
- — Generate unique byte signature for address
idapro_make_signature(addrs) - — Generate signature for function
idapro_make_signature_for_function(addrs) - — Generate signature for code referencing the address
idapro_find_xref_signatures(addrs)
调试器(需要 ?ext=dbg)
Debugger (requires ?ext=dbg)
- — 在 GUI IDA 实例中打开文件
idapro_open_file(file_path) - 调试器工具默认隐藏,可通过 URL 参数 启用
?ext=dbg
- — Open file in GUI IDA instance
idapro_open_file(file_path) - Debugger tools are hidden by default, can be enabled via URL parameter
?ext=dbg
会话管理
Session Management
- — ⚠️ 有 schema 校验 BUG,改用
idapro_idalib_open(input_path)脚本open.ps1 - — 列出所有 session
idapro_idalib_list() - — 当前上下文绑定的 session
idapro_idalib_current() - — 切换到其他 session
idapro_idalib_switch(session_id) - — 关闭 session
idapro_idalib_close(session_id) - — 保存数据库
idapro_idalib_save(path) - — 检查 worker 健康状态
idapro_idalib_health(session_id)
- — ⚠️ Has schema validation BUG, use
idapro_idalib_open(input_path)script insteadopen.ps1 - — List all sessions
idapro_idalib_list() - — Session bound to current context
idapro_idalib_current() - — Switch to other session
idapro_idalib_switch(session_id) - — Close session
idapro_idalib_close(session_id) - — Save database
idapro_idalib_save(path) - — Check worker health status
idapro_idalib_health(session_id)
其他
Others
- — 进制转换(必须用这个,不要自己算进制!)
idapro_int_convert(inputs) - — 导出函数(json/c_header/prototypes)
idapro_export_funcs(addrs, format) - — 在 IDA 上下文执行 Python
idapro_py_eval(code) - — 服务器健康检查
idapro_server_health() - — 预热子系统(字符串缓存、Hex-Rays 等)
idapro_server_warmup()
- — Base conversion (Must use this, do not calculate bases manually!)
idapro_int_convert(inputs) - — Export functions (json/c_header/prototypes)
idapro_export_funcs(addrs, format) - — Execute Python in IDA context
idapro_py_eval(code) - — Server health check
idapro_server_health() - — Warm up subsystems (string cache, Hex-Rays, etc.)
idapro_server_warmup()
逆向分析完整工作流
Complete Reverse Analysis Workflow
Step 1: 启动服务器
Step 1: Start Server
确保 HTTP 服务在后台运行。
powershell -File "scripts/start.ps1"输出 表示就绪。
OK:72Ensure the HTTP service is running in the background.
powershell -File "scripts/start.ps1"Output indicates readiness.
OK:72Step 2: 打开文件
Step 2: Open File
powershell -File "scripts/open.ps1" -Path "C:\目标.exe" -TimeoutSeconds 600输出 表示成功(后带 表示自动降级到临时副本)。
若分析时间较长,会周期性输出 ;若达到超时则输出 。
OK:文件名:session_id(temp copy)INFO:opening:...ERR:open_timeout_xxspowershell -File "scripts/open.ps1" -Path "C:\target.exe" -TimeoutSeconds 600Output indicates success (with means automatically downgraded to temporary copy).
If analysis takes a long time, it will periodically output ; if timeout is reached, output .
OK:filename:session_id(temp copy)INFO:opening:...ERR:open_timeout_xxsStep 3: 全局概览(含导入表硬门)
Step 3: Global Overview (Including Import Table Hard Gate)
idapro_survey_binary(detail_level="minimal")关注:
- 架构(x86/x64/ARM)
- 入口点(main/WinMain/DllMain)
- 有趣的字符串(URL、路径、错误消息)
- 导入分类(MUST):加密函数 / 网络 API / 文件操作 / 进程注入 / 注册表 — 必须落成 Evidence(建议 id:),可用
E-imports或 survey 输出中的 imports 段idapro_entity_query(kind="imports") - DLL/SYS:导出表与导入表并列(Evidence )
E-exports - .NET:无传统 IAT 时用模块/元数据/托管引用摘要作为等价锚点写入 E-imports 语义槽
- 干净导入表:注明动态加载嫌疑,推动动态 API 断点验证
- 热门函数(高 xref 计数的函数通常是关键逻辑)
硬门禁:未将 imports 视图/分类摘要(或合法等价锚点)写入 Evidence 前,MUST NOT 进入 Step 4 深挖结论,MUST NOT 声称 survey 完成。导入表为空或查询失败时仍 MUST 记录失败现象。加壳 IAT 修复失败时 MUST 记 并转动态调试抓 API,禁止静态死磕。用户要求重做导入表/IAT 检查时 MUST 重做被点名步骤(阻塞时可行性门闩:说明+确认;强制则标 quality=unreadable),禁止改换无关步骤。
E-iat-repair-failidapro_survey_binary(detail_level="minimal")Focus on:
- Architecture (x86/x64/ARM)
- Entry points (main/WinMain/DllMain)
- Interesting strings (URLs, paths, error messages)
- Import Categories (MUST): Encryption functions / Network APIs / File operations / Process injection / Registry — Must be recorded as Evidence (recommended id: ), can use
E-importsor imports section in survey outputidapro_entity_query(kind="imports") - DLL/SYS: Export table and import table are listed together (Evidence )
E-exports - .NET: When there is no traditional IAT, use module/metadata/managed reference summary as equivalent anchor to write into E-imports semantic slot
- Clean Import Table: Note the suspicion of dynamic loading, promote dynamic API breakpoint verification
- Popular functions (functions with high xref count are usually key logic)
Hard Gate: Before writing imports view/category summary (or legal equivalent anchor) into Evidence, MUST NOT proceed to Step 4 for in-depth conclusions, MUST NOT claim survey is completed. Even if import table is empty or query fails, MUST record the failure phenomenon. When shellcode IAT repair fails, MUST record and switch to dynamic debugging to capture APIs, prohibit statically struggling. When user requests to redo import table/IAT check, MUST redo the specified step (feasibility latch when blocked: explain + confirm; if forced, mark quality=unreadable), prohibit changing to irrelevant steps.
E-iat-repair-failStep 4: 深入关键函数
Step 4: Deep Dive into Key Functions
idapro_analyze_function(addr="关键函数名")或:
idapro_decompile(addr="函数名")
idapro_disasm(addr="函数名", max_instructions=50)idapro_analyze_function(addr="key_function_name")Or:
idapro_decompile(addr="function_name")
idapro_disasm(addr="function_name", max_instructions=50)Step 5: 数据流和交叉引用
Step 5: Data Flow and Cross-Reference
idapro_xrefs_to(addrs="关键地址/字符串")
idapro_callgraph(roots=["关键函数"], max_depth=3)
idapro_trace_data_flow(addr="关键地址", direction="backward", max_depth=5)idapro_xrefs_to(addrs="key_address/string")
idapro_callgraph(roots=["key_function"], max_depth=3)
idapro_trace_data_flow(addr="key_address", direction="backward", max_depth=5)Step 6: 记录和优化
Step 6: Record and Optimize
idapro_set_comments(items=[{"addr": "0x140001000", "comment": "你的理解"}])
idapro_rename(batch={"func": [{"addr": "函数地址", "name": "有意义的名字"}]})idapro_set_comments(items=[{"addr": "0x140001000", "comment": "Your understanding"}])
idapro_rename(batch={"func": [{"addr": "function_address", "name": "meaningful_name"}]})Step 7: 输出报告
Step 7: Output Report
分析完成后,生成 记录发现和步骤。
report.mdAfter analysis is completed, generate to record findings and steps.
report.mdPrompt 工程准则
Prompt Engineering Guidelines
- 不要手动算进制 — 任何时候需要转换数字,用
idapro_int_convert - 先 survey 后深入 — 先看概况再针对性分析
- 持续加注释和重命名 — 分析过程中不断更新函数名和变量名,提升后续分析的准确性
- 跟踪交叉引用 — 发现有趣的数据/字符串,用 看谁引用了它
xrefs_to - 遇到混淆代码 — 先做字符串解密、导入哈希去除、控制流平坦化去除等预处理
- C++ STL 代码 — 用 FLIRT/Lumina 识别库函数后,再分析业务逻辑
- 不要暴力破解 — 分析应从反汇编中推导解决方案,用简单 Python 辅助计算
- 遇到 "No database bound" — 还没有打开任何二进制文件,先执行
open.ps1 - 遇到 "Failed to open database" — 可能是旧数据库文件被锁,会自动降级到 Temp 副本(输出含
open.ps1标记)(temp copy) - 带自动分析打开 GUI/复杂样本时 — 默认加 ,不要把长时间
-TimeoutSeconds 600误判成脚本卡死INFO:opening:...
- Do not calculate bases manually — Use whenever number conversion is needed
idapro_int_convert - Survey first, then deep dive — Look at the overview first, then conduct targeted analysis
- Continuously add comments and rename — Update function names and variable names during analysis to improve the accuracy of subsequent analysis
- Track cross-references — When interesting data/strings are found, use to see who references them
xrefs_to - When encountering obfuscated code — First perform preprocessing such as string decryption, import hash removal, control flow flattening removal
- C++ STL code — Use FLIRT/Lumina to identify library functions before analyzing business logic
- Do not brute force crack — Derive solutions from disassembly, use simple Python for auxiliary calculation
- When encountering "No database bound" — No binary file has been opened yet, execute first
open.ps1 - When encountering "Failed to open database" — Old database files may be locked, will automatically downgrade to Temp copy (output contains
open.ps1mark)(temp copy) - When opening GUI/complex samples with auto-analysis — Add by default, do not misjudge long
-TimeoutSeconds 600as script stuckINFO:opening:...
路由上下文
Routing Context
上游入口: (总控)、
上游备选: (如果不想开 IDA,可以先 r2 快速侦察)
下游出口:
skills/SKILL.mdrouting.mdradare2/- 需 Frida 动态验证 →
reverse-engineering/tools-dynamic.md - 需符号执行/angr →
reverse-engineering/tools-dynamic.md - 需通用逆向方法论 →
reverse-engineering/SKILL.md
同级关联模块: (IDA 不可用时替代方案)
radare2/Upstream Entries: (master control),
Upstream Alternatives: (if you don't want to open IDA, you can use r2 for quick reconnaissance first)
Downstream Exports:
skills/SKILL.mdrouting.mdradare2/- Need Frida dynamic verification →
reverse-engineering/tools-dynamic.md - Need symbolic execution/angr →
reverse-engineering/tools-dynamic.md - Need general reverse engineering methodology →
reverse-engineering/SKILL.md
Peer Associated Modules: (alternative when IDA is unavailable)
radare2/按需自举(On-Demand Bootstrap)
On-Demand Bootstrap
本 skill 的入口脚本已接入统一自举系统。
The entry script of this skill has been integrated into the unified bootstrap system.
自动化能力边界
Automation Capability Boundaries
| 工具 | 可自动安装 | 安装方式 | 说明 |
|---|---|---|---|
| idalib-mcp | ✓ | pip install (from GitHub) | |
| IDA Pro 本体 | ✗ | 商业软件,需手动安装 | 设置 |
| Tool | Auto-installable | Installation Method | Notes |
|---|---|---|---|
| idalib-mcp | ✓ | pip install (from GitHub) | Automatically installed when |
| IDA Pro本体 | ✗ | Commercial software, manual installation required | Set |
安装步骤(已验证)
Installation Steps (Verified)
cmd
undefinedcmd
undefined1. 设置 IDA 路径(替换为你的实际 IDA 安装目录)
1. Set IDA path (replace with your actual IDA installation directory)
setx IDADIR "<你的IDA安装目录>"
setx IDADIR "<your-ida-installation-directory>"
2. 从 GitHub 安装 ida-pro-mcp(PyPI 上的 ida-mcp 是另一个项目,不要装错!)
2. Install ida-pro-mcp from GitHub (ida-mcp on PyPI is another project, do not install it by mistake!)
pip install git+https://github.com/mrexodia/ida-pro-mcp.git
pip install git+https://github.com/mrexodia/ida-pro-mcp.git
3. 安装 IDA 插件(选择 Streamable HTTP + Global + 全选客户端)
3. Install IDA plugin (select Streamable HTTP + Global + all clients)
ida-pro-mcp --install
ida-pro-mcp --install
4. 重启 IDA Pro,打开目标文件
4. Restart IDA Pro and open the target file
插件自动监听 127.0.0.1:13337
The plugin automatically listens on 127.0.0.1:13337
5. 验证
5. Verify
ida-pro-mcp --config
> ⚠️ **注意**:PyPI 上的 `ida-mcp` 包(作者 jtsylve)是另一个项目,不是我们需要的。
> 必须从 GitHub 安装 `mrexodia/ida-pro-mcp`。ida-pro-mcp --config
> ⚠️ **Note**: The `ida-mcp` package on PyPI (author jtsylve) is another project, not what we need.
> Must install `mrexodia/ida-pro-mcp` from GitHub.自举触发点
Bootstrap Trigger Points
- :缺
scripts/start.ps1时自动调用idalib-mcpbootstrap-reverse.ps1 - MCP 注册:bootstrap 会自动把 写入 Claude MCP 配置
idapro
- : Automatically calls
scripts/start.ps1whenbootstrap-reverse.ps1is missingidalib-mcp - MCP Registration: Bootstrap will automatically write into Claude MCP configuration
idapro
前置条件
Preconditions
- IDA Pro 已安装且 环境变量已设置(或脚本内默认路径正确)
IDADIR - Python 已安装(idalib-mcp 依赖 Python)
- IDA Pro is installed and environment variable is set (or default path in script is correct)
IDADIR - Python is installed (idalib-mcp depends on Python)
任务完成自检(声称完成前 MUST 通过)
Task Completion Self-Check (MUST Pass Before Claiming Completion)
- 我是否执行了工作流中的每一步(而不是只阅读)?
- survey/imports 是否已写入 Evidence(E-imports 或等价)?DLL/SYS 是否含 E-exports?IAT 失败是否记 E-iat-repair-fail?
- 用户若要求重做导入表/IAT,是否重做了同一步?
- 我是否基于 使用了真实工具路径?
tool-index - 我是否产出了可复现证据(命令/脚本/截图/报告)?
- 我是否完成并回写了 RULES 要求的 Checklist 项?
- Have I executed every step in the workflow (instead of just reading)?
- Have survey/imports been written into Evidence (E-imports or equivalent)? Does DLL/SYS include E-exports? Is E-iat-repair-fail recorded when IAT fails?
- If the user requested to redo import table/IAT check, did I redo the same step?
- Did I use real tool paths based on ?
tool-index - Did I produce reproducible evidence (commands/scripts/screenshots/reports)?
- Did I complete and write back the Checklist items required by RULES?