[IDA-AI-MCP] ida-pro-mcp로 mcp 연동하여 바이너리 분석하기

반응형

1. 개요

ida-pro-mcp 설치한다. 이전에 포스팅했던 jadx보다 좀더 쉬운 설정이 가능하다.

 

https://github.com/mrexodia/ida-pro-mcp

 

GitHub - mrexodia/ida-pro-mcp: AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.

AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP. - mrexodia/ida-pro-mcp

github.com

 

2. 사전요구사항

  • python 3.11 버전 이상
  • IDA pro (8.3버전 이상), Free버전은 불가
  • MCP Client

 

3. 설치

 

pip uninstall ida-pro-mcp
pip install https://github.com/mrexodia/ida-pro-mcp/archive/refs/heads/main.zip

 

ida-pro-mcp --install

 

설치를 완료하면 각 mcp 클라이언트 설정 파일에 로드가 되어 있다.

{
  "mcpServers": {
    "ida-pro-mcp": {
      "command": "C:\\Python313\\python.exe",
      "args": [
        "C:\\Users\\User\\AppData\\Roaming\\Python\\Python313\\site-packages\\ida_pro_mcp\\server.py"
      ],
      "timeout": 1800,
      "disabled": false,
      "autoApprove": [
        "check_connection",
        "get_metadata",
        "get_function_by_name",
        "get_function_by_address",
        "get_current_address",
        "get_current_function",
        "convert_number",
        "list_functions",
        "list_globals_filter",
        "list_globals",
        "list_imports",
        "list_strings_filter",
        "list_strings",
        "list_local_types",
        "decompile_function",
        "disassemble_function",
        "get_xrefs_to",
        "get_xrefs_to_field",
        "get_callees",
        "get_callers",
        "get_entry_points",
        "set_comment",
        "rename_local_variable",
        "rename_global_variable",
        "set_global_variable_type",
        "patch_address_assembles",
        "get_global_variable_value_by_name",
        "get_global_variable_value_at_address",
        "rename_function",
        "set_function_prototype",
        "declare_c_type",
        "set_local_variable_type",
        "get_stack_frame_variables",
        "get_defined_structures",
        "analyze_struct_detailed",
        "get_struct_at_address",
        "get_struct_info_simple",
        "search_structures",
        "rename_stack_frame_variable",
        "create_stack_frame_variable",
        "set_stack_frame_variable_type",
        "delete_stack_frame_variable",
        "read_memory_bytes",
        "data_read_byte",
        "data_read_word",
        "data_read_dword",
        "data_read_qword",
        "data_read_string"
      ],
      "alwaysAllow": [
        "check_connection",
        "get_metadata",
        "get_function_by_name",
        "get_function_by_address",
        "get_current_address",
        "get_current_function",
        "convert_number",
        "list_functions",
        "list_globals_filter",
        "list_globals",
        "list_imports",
        "list_strings_filter",
        "list_strings",
        "list_local_types",
        "decompile_function",
        "disassemble_function",
        "get_xrefs_to",
        "get_xrefs_to_field",
        "get_callees",
        "get_callers",
        "get_entry_points",
        "set_comment",
        "rename_local_variable",
        "rename_global_variable",
        "set_global_variable_type",
        "patch_address_assembles",
        "get_global_variable_value_by_name",
        "get_global_variable_value_at_address",
        "rename_function",
        "set_function_prototype",
        "declare_c_type",
        "set_local_variable_type",
        "get_stack_frame_variables",
        "get_defined_structures",
        "analyze_struct_detailed",
        "get_struct_at_address",
        "get_struct_info_simple",
        "search_structures",
        "rename_stack_frame_variable",
        "create_stack_frame_variable",
        "set_stack_frame_variable_type",
        "delete_stack_frame_variable",
        "read_memory_bytes",
        "data_read_byte",
        "data_read_word",
        "data_read_dword",
        "data_read_qword",
        "data_read_string"
      ]
    }
  }
}

 

IDA - Edit - Plugin - MCP 선택하여 MCP 서버 실행을 확인한다.

 

MCP Client(Cursor) 에서도 정상 실행을 확인한다.

 

프롬프트로 질의하면 AI가 분석을 수행하고 결과를 제공해준다.