IDA Pro MCP
mrexodia/ida-pro-mcpMCP-сервер, связывающий IDA Pro с языковыми моделями для автоматизированного реверс-инжиниринга. Позволяет декомпилировать функции, переименовывать переменные, добавлять комментарии и анализировать бинарные файлы через любой совместимый MCP-клиент.
Подключение
npx -y @modelcontextprotocol/inspectorREADME
IDA Pro MCP
Простой MCP-сервер для реверс-инжиниринга в IDA Pro с помощью AI.
https://github.com/user-attachments/assets/6ebeaa92-a9db-43fa-b756-eececce2aca0
Бинарные файлы и промпт из видео доступны в репозитории mcp-reversing-dataset.
Требования
- Python (3.11 или выше)
- Используйте
idapyswitchдля переключения на актуальную версию Python
- Используйте
- IDA Pro (8.3 или выше, рекомендуется версия 9), IDA Free не поддерживается
- Поддерживаемый MCP-клиент (выберите любой)
- Amazon Q Developer CLI
- Augment Code
- Claude
- Claude Code
- Cline
- Codex
- Copilot CLI
- Crush
- Cursor
- Gemini CLI
- Kilo Code
- Kiro
- LM Studio
- Opencode
- Qodo Gen
- Qwen Coder
- Roo Code
- Trae
- VS Code
- VS Code Insiders
- Warp
- Windsurf
- Zed
- Другие MCP-клиенты: выполните
ida-pro-mcp --config, чтобы получить JSON-конфигурацию для вашего клиента.
Установка
Установите последнюю версию пакета IDA Pro MCP:
pip uninstall ida-pro-mcp
pip install https://github.com/mrexodia/ida-pro-mcp/archive/refs/heads/main.zipНастройте MCP-серверы и установите плагин для IDA:
ida-pro-mcp --install
Важно: После установки полностью перезапустите IDA и ваш MCP-клиент. Некоторые клиенты (например, Claude) работают в фоне и требуют завершения через иконку в трее.
https://github.com/user-attachments/assets/65ed3373-a187-4dd5-a807-425dca1d8ee9
Примечание: Меню плагина появится только после загрузки бинарного файла в IDA.
Составление промптов
LLM склонны к галлюцинациям, поэтому формулируйте запросы максимально конкретно. При реверс-инжиниринге особенно проблематично преобразование между целыми числами и байтами. Ниже приведён минимальный пример промпта — делитесь своими результатами в обсуждениях или issues:
Your task is to analyze a crackme in IDA Pro. You can use the MCP tools to retrieve information. In general use the following strategy:
- Inspect the decompilation and add comments with your findings
- Rename variables to more sensible names
- Change the variable and argument types if necessary (especially pointer and array types)
- Change function names to be more descriptive
- If more details are necessary, disassemble the function and add comments with your findings
- NEVER convert number bases yourself. Use the `int_convert` MCP tool if needed!
- Do not attempt brute forcing, derive any solutions purely from the disassembly and simple python scripts
- Create a report.md with your findings and steps taken at the end
- When you find a solution, prompt to user for feedback with the password you foundЭтот промпт — лишь первый эксперимент, делитесь, если нашли способы улучшить результат!
Ещё один промпт от @can1357:
Your task is to create a complete and comprehensive reverse engineering analysis. Reference AGENTS.md to understand the project goals and ensure the analysis serves our purposes.
Use the following systematic methodology:
1. **Decompilation Analysis**
- Thoroughly inspect the decompiler output
- Add detailed comments documenting your findings
- Focus on understanding the actual functionality and purpose of each component (do not rely on old, incorrect comments)
2. **Improve Readability in the Database**
- Rename variables to sensible, descriptive names
- Correct variable and argument types where necessary (especially pointers and array types)
- Update function names to be descriptive of their actual purpose
3. **Deep Dive When Needed**
- If more details are necessary, examine the disassembly and add comments with findings
- Document any low-level behaviors that aren't clear from the decompilation alone
- Use sub-agents to perform detailed analysis
4. **Important Constraints**
- NEVER convert number bases yourself - use the int_convert MCP tool if needed
- Use MCP tools to retrieve information as necessary
- Derive all conclusions from actual analysis, not assumptions
5. **Documentation**
- Produce comprehensive RE/*.md files with your findings
- Document the steps taken and methodology used
- When asked by the user, ensure accuracy over previous analysis file
- Organize findings in a way that serves the project goals outlined in AGENTS.md or CLAUDE.mdПрямой эфир с обсуждением промптинга и анализом реального вредоносного ПО:
Советы по повышению точности LLM
LLM — мощные инструменты, но они могут испытывать трудности со сложными математическими вычислениями или «галлюцинировать». Обязательно указывайте LLM использовать MCP-инструмент int_convert, а для некоторых операций может потребоваться math-mcp.
Также имейте в виду, что LLM плохо справляются с обфусцированным кодом. Перед тем как привлекать LLM к решению задачи, самостоятельно изучите бинарный файл и попробуйте деобфусцировать код вручную или с помощью специализированных инструментов.
