
R0ida
HTTP-SSEAI-driven IDA Pro reverse engineering server with MCP compatibility for automated analysis
AI-driven IDA Pro reverse engineering server with MCP compatibility for automated analysis
大模型驱动IDAPro智能自动化逆向体验单文件MCP服务器
交流学习:加vx:r0ysue(备注:进MCP学习群)
本项目的优点是:
IDA pro 正常安装使用,运行idapyswitch指定python路径。
使用同路径的python安装好pip,使用pip安装fastmcp。
pip install fastmcp
Windows | %appdata%\Hex-Rays\IDA Pro\plugins |
---|---|
Linux | ~/.idapro/plugins/ |
macOS | ~/Library/Application Support/IDA Pro/plugins/ |
安装完毕!
>>>r0mcp plugin loaded, use Edit->Plugins->r0mcp to start SSE server
>>> r0mcp.run() is invoked ,Server start
INFO: Started server process [6804]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:26868 (Press CTRL+C to quit)
如有提示访问局域网设备、请求局域网连接等等,一并允许;防火墙允许26868通过或关闭。如果IDA与大模型助手运行在同一台电脑,也可以将源码中的0.0.0.0改成127.0.0.1纯本地连接。
{ "mcpServers": { "r0idamcp": { "url": "http://192.168.1.2:26868/sse", "type": "sse" } } }
192.168.1.2为IDA pro所在的电脑IP
假如使用的GUI界面配置,应选择添加SSE服务器,URL同上。配置成功检查连接状态时,IDA下方python窗口出现如下日志则为连接成功:
INFO: 192.168.1.3:62966 - "GET /sse HTTP/1.1" 200 OK
可以开始大模型驱动自动化逆向啦!
check_connection
: 确认正在运行get_metadata()
: 获取IDB的元数据get_function_by_name(name)
: 根据函数名获取函数get_function_by_address(address)
: 根据函数地址获取函数get_current_address()
: 获取当前选中的地址get_current_function()
: 获取当前选中地址函数convert_number(text, size)
: 十进制、十六进制互转list_functions(offset, count)
: 分页列出IDB中的所有函数list_strings(offset, count)
: 分页列出IDB中的所有字符串search_strings(pattern, offset, count)
: 搜索字符串decompile_function(address)
: 反编译指定地址函数至伪代码disassemble_function(start_address)
: 反编译指定地址函数至机器码get_xrefs_to(address)
: 列出指定地址的引用位置get_entry_points()
: 列出数据库中所有的入口点set_comment(address, comment)
: 指定地址添加注释rename_local_variable(function_address, old_name, new_name)
: 函数内局部变量重命名set_local_variable_type(function_address, variable_name, new_type)
: 指定局部变量类型rename_global_variable(old_name, new_name)
: 全局变量重命名set_global_variable_type(variable_name, new_type)
: 指定全局变量类型rename_function(function_address, new_name)
: 函数重命名set_function_prototype(function_address, prototype)
: 指定函数原型declare_c_type(c_declaration)
: 根据C的声明创建或更新局部变量类型为了达到最为准确的执行效果,提示词尽可能采用我的中文翻译(或函数名),提高命中率。
抓紧玩起来吧宝子们!有问题欢迎群里反馈!根据反馈修复或更新功能~