Skip to main content
Glama

IDA Pro MCP Server

by fdrechsler

IDA Pro MCP サーバー

AI アシスタントが IDA Pro と対話してリバース エンジニアリングやバイナリ分析のタスクを実行できるようにするモデル コンテキスト プロトコル (MCP) サーバー。

概要

このプロジェクトは、AIアシスタントと、ソフトウェアのリバースエンジニアリングに使用される人気の逆アセンブラおよびデバッガであるIDA Proとの橋渡しとなるものです。3つの主要コンポーネントで構成されています。

  1. IDA Pro リモート コントロール プラグイン( ida_remote_server.py ): IDA Pro 機能をリモートで制御するための HTTP サーバーを作成する IDA Pro プラグイン。
  2. IDA リモート クライアント( idaremoteclient.ts ): IDA Pro リモート コントロール サーバーと対話するための TypeScript クライアント。
  3. MCP サーバー( index.ts ): IDA Pro 機能を AI アシスタントに公開するモデル コンテキスト プロトコル サーバー。

特徴

  • IDA ProでAIアシスタントからPythonスクリプトを実行する
  • バイナリに関する情報を取得します。
    • 文字列
    • 輸入品
    • 輸出
    • 機能
  • 高度なバイナリ分析機能:
    • 命令内の即値を検索する
    • バイナリ内のテキスト文字列を検索する
    • 特定のバイトシーケンスを検索する
    • アドレス範囲の逆アセンブリを取得する
  • 標準化されたインターフェースを通じてIDA Proの操作を自動化
  • コンポーネント間の安全な通信

前提条件

  • IDA Pro 8.3以降
  • Node.js 18以降
  • タイプスクリプト

使用例 ida_remote_server.py

curl -X POST -H "Content-Type: application/json" -d '{"script":"print(\"Script initialization...\")"}' http://127.0.0.1:9045/api/execute {"success": true, "output": "Script initialization...\n"}

MCPサーバーの使用例

Roo出力

インストール

1. IDA Proリモートコントロールプラグインをインストールする

  1. ida_remote_server.pyを IDA Pro プラグイン ディレクトリにコピーします。
    • Windows: %PROGRAMFILES%\IDA Pro\plugins
    • macOS: /Applications/IDA Pro.app/Contents/MacOS/plugins
    • Linux: /opt/idapro/plugins
  2. IDA Pro を起動し、バイナリ ファイルを開きます。
  3. プラグインは127.0.0.1:9045で HTTP サーバーを自動的に起動します。

2. MCPサーバーをインストールする

  1. このリポジトリをクローンします:
    git clone <repository-url> cd ida-server
  2. 依存関係をインストールします:
    npm install
  3. プロジェクトをビルドします。
    npm run build
  4. AI アシスタントの MCP 設定ファイルで MCP サーバーを構成します。
    { "mcpServers": { "ida-pro": { "command": "node", "args": ["path/to/ida-server/dist/index.js"], "env": {} } } }

使用法

MCP サーバーをインストールして構成すると、AI アシスタントに次のツールが提供されます。

実行IDAコマンド

IDA Pro Python スクリプトを実行します。

パラメータ:

  • scriptPath (必須): 実行するスクリプトファイルへの絶対パス
  • outputPath (オプション): スクリプトの出力を保存する絶対パス

例:

# Example IDA Pro script (save as /path/to/script.py) import idautils # Count functions function_count = len(list(idautils.Functions())) print(f"Binary has {function_count} functions") # Get the first 5 function names functions = list(idautils.Functions())[:5] for func_ea in functions: print(f"Function: {ida_name.get_ea_name(func_ea)} at {hex(func_ea)}") # Return data return_value = function_count

AI アシスタントは、このスクリプトを次のように使用できます。

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>run_ida_command</tool_name> <arguments> { "scriptPath": "/path/to/script.py" } </arguments> </use_mcp_tool>

検索即時値

バイナリの命令内の即値を検索します。

パラメータ:

  • value (必須): 検索する値 (数値または文字列)
  • radix (オプション):数値変換の基数(デフォルト:16)
  • startAddress (オプション): 検索の開始アドレス
  • endAddress (オプション): 検索の終了アドレス

例:

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>search_immediate_value</tool_name> <arguments> { "value": "42", "radix": 10 } </arguments> </use_mcp_tool>

検索テキスト

バイナリ内のテキスト文字列を検索します。

パラメータ:

  • text (必須): 検索するテキスト
  • caseSensitive (オプション): 検索で大文字と小文字を区別するかどうか (デフォルト: false)
  • startAddress (オプション): 検索の開始アドレス
  • endAddress (オプション): 検索の終了アドレス

例:

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>search_text</tool_name> <arguments> { "text": "password", "caseSensitive": false } </arguments> </use_mcp_tool>

検索バイトシーケンス

バイナリ内の特定のバイトシーケンスを検索します。

パラメータ:

  • bytes (必須): 検索するバイトシーケンス(例:3つのNOPの場合は「90 90 90」)
  • startAddress (オプション): 検索の開始アドレス
  • endAddress (オプション): 検索の終了アドレス

例:

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>search_byte_sequence</tool_name> <arguments> { "bytes": "90 90 90" } </arguments> </use_mcp_tool>

get_disassembly

アドレス範囲の逆アセンブリを取得します。

パラメータ:

  • startAddress (必須): 逆アセンブリの開始アドレス
  • endAddress (オプション): 逆アセンブリの終了アドレス
  • count (オプション): 逆アセンブルする命令の数

例:

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>get_disassembly</tool_name> <arguments> { "startAddress": "0x401000", "count": 10 } </arguments> </use_mcp_tool>

get_functions

バイナリから関数のリストを取得します。

パラメータ:

  • 不要

例:

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>get_functions</tool_name> <arguments> {} </arguments> </use_mcp_tool>

get_exports

バイナリからエクスポートのリストを取得します。

パラメータ:

  • 不要

例:

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>get_exports</tool_name> <arguments> {} </arguments> </use_mcp_tool>

get_strings

バイナリから文字列のリストを取得します。

パラメータ:

  • 不要

例:

<use_mcp_tool> <server_name>ida-pro</server_name> <tool_name>get_strings</tool_name> <arguments> {} </arguments> </use_mcp_tool>

IDA Pro リモート コントロール API

IDA Pro リモート コントロール プラグインは、次の HTTP エンドポイントを公開します。

  • GET /api/info : プラグイン情報を取得する
  • GET /api/strings : バイナリから文字列を取得する
  • GET /api/exports : バイナリからエクスポートを取得する
  • GET /api/imports : バイナリからインポートを取得する
  • GET /api/functions : 関数リストを取得する
  • GET /api/search/immediate : 命令内の即値を検索
  • GET /api/search/text : バイナリ内のテキストを検索する
  • GET /api/search/bytes : バイナリ内のバイトシーケンスを検索
  • GET /api/disassembly : アドレス範囲の逆アセンブリを取得する
  • POST /api/execute : Python スクリプト (JSON/フォーム) を実行
  • POST /api/executebypath : ファイルパスからPythonスクリプトを実行する
  • POST /api/executebody : 生のボディからPythonスクリプトを実行する

セキュリティに関する考慮事項

IDA Proリモートコントロールプラグインは、セキュリティ上の理由から、デフォルトで127.0.0.1 (ローカルホスト)のみをリッスンします。これにより、IDA Proインスタンスへのリモートアクセスが防止されます。

リモート アクセスを許可する必要がある場合は、 ida_remote_server.pyDEFAULT_HOST変数を変更できますが、セキュリティへの影響に注意してください。

発達

ソースから構築

npm run build

テストの実行

npm test

ライセンス

このプロジェクトはMITライセンスの下で提供されています。詳細はLICENSEファイルをご覧ください。

著者

フロリアン・ドレクスラー (@fdrechsler) fd@fdrechsler.com

Related MCP Servers

  • A
    security
    F
    license
    A
    quality
    A Model Context Protocol server that allows secure execution of pre-approved commands, enabling AI assistants to safely interact with the user's system.
    Last updated -
    1
    3
    18
    JavaScript
  • -
    security
    F
    license
    -
    quality
    A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
    Last updated -
    1
    Python
    • Linux
    • Apple
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server for IDA interaction and automation. This server provides tools to read IDA database via Large Language Models.
    Last updated -
    19
    443
    Python
    MIT License
    • Apple
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that enables AI assistants to search and retrieve information about security exploits and vulnerabilities from the Exploit Database, enhancing cybersecurity research capabilities.
    Last updated -
    4
    TypeScript
    MIT License
    • Linux
    • Apple

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fdrechsler/mcp-server-idapro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server