[MCP] IDA-Cursor

koo00·2025년 6월 17일
0

MCP

목록 보기
2/2

jadx 에 이은 IDA Cursor 연동 레스기

자세한 내용은 https://github.com/mrexodia/ida-pro-mcp 참고

우선 가상 환경 말고 기존 환경에서도 파이썬 3.11을 설치했다. (3.11.9)

> uv venv --python 3.11
Using CPython 3.11.13
Creating virtual environment at: .venv
Activate with: .venv\Scripts\activate
>
> .\.venv\Scripts\activate
(ida-pro-mcp-1.3.0) >
(ida-pro-mcp-1.3.0) > ida-pro-mcp.exe --install
Skipping Cline installation
  Config: C:\Users\user\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json (not found)
Skipping Roo Code installation
  Config: C:\Users\user\AppData\Roaming\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json (not found)
Skipping Claude installation
  Config: C:\Users\user\AppData\Roaming\Claude\claude_desktop_config.json (not found)
Installed Cursor MCP server (restart required)
  Config: C:\Users\user\.cursor\mcp.json
Installed IDA Pro plugin (IDA restart required)
  Plugin: C:\Users\user\AppData\Roaming\Hex-Rays\IDA Pro\plugins\mcp-plugin.py
(ida-pro-mcp-1.3.0) >
(ida-pro-mcp-1.3.0) > uv pip install fastmcp
Resolved 35 packages in 598ms
Prepared 4 packages in 652ms
Uninstalled 1 package in 36ms
Installed 9 packages in 187ms
 + authlib==1.6.0
 + cffi==1.17.1
 + cryptography==45.0.4
 + exceptiongroup==1.3.0
 + fastmcp==2.8.1
 - mcp==1.6.0
 + mcp==1.9.4
 + openapi-pydantic==0.5.1
 + pycparser==2.22
 + python-multipart==0.0.20
(ida-pro-mcp-1.3.0) >

 
ida-pro-mcp.exe 실행 시 mcp.json 에 ida-pro-mcp 가 생긴다.

{
  "mcpServers": {
    "github.com/mrexodia/ida-pro-mcp": {
      "command": "C:\\Users\\user\\PATH\\ida-pro-mcp-1.3.0\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\Users\\user\\PATH\\ida-pro-mcp-1.3.0\\src\\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_strings",
        "search_strings",
        "decompile_function",
        "disassemble_function",
        "get_xrefs_to",
        "get_entry_points",
        "set_comment",
        "rename_local_variable",
        "rename_global_variable",
        "set_global_variable_type",
        "rename_function",
        "set_function_prototype",
        "declare_c_type",
        "set_local_variable_type"
      ],
      "alwaysAllow": [
        "check_connection",
        "get_metadata",
        "get_function_by_name",
        "get_function_by_address",
        "get_current_address",
        "get_current_function",
        "convert_number",
        "list_functions",
        "list_strings",
        "search_strings",
        "decompile_function",
        "disassemble_function",
        "get_xrefs_to",
        "get_entry_points",
        "set_comment",
        "rename_local_variable",
        "rename_global_variable",
        "set_global_variable_type",
        "rename_function",
        "set_function_prototype",
        "declare_c_type",
        "set_local_variable_type"
      ]
    }
  }
}

 
plugin은 임시 폴더에 설치되어서 PC에 설치된 IDA의 플러그인 경로로 옮겨주었다.

그리고 IDA 폴더에 있는 idapyswitch.exe 실행시켜서 파이썬 버전을 3.11로 실행하도록 바꿔주고 Cursor 랑 IDA 재시작

> .\idapyswitch.exe
Checking installs from "Python Software Foundation"
Checking "Python 3.11 (64-bit)" (3.11)
Found: "C:\Users\user\AppData\Local\Programs\Python\Python311\" (version: 3.11.9 ('3.11.9150.1013'))
Checking "Python 3.9 (64-bit)" (3.9)
Found: "C:\Users\user\AppData\Local\Programs\Python\Python39\" (version: 3.9.13 ('3.9.13150.1013'))
IDA previously used: "C:\Users\user\AppData\Local\Programs\Python\Python39\python39.dll" (guessed version: 3.9.13 ('3.9.13150.1013')). Making this the preferred version.
The following Python installations were found:
    #0: 3.9.13 ('3.9.13150.1013') (C:\Users\user\AppData\Local\Programs\Python\Python39\python3.dll)
    #1: 3.11.9 ('3.11.9150.1013') (C:\Users\user\AppData\Local\Programs\Python\Python311\python3.dll)
Please pick a number between 0 and 1 (default: 0)
1
Applying version 3.11.9 ('3.11.9150.1013')
> 

 
테스트 파일 하나 열어보니 짜잔. 나는 IDA 버전을 7.7 로 했는데 잘되는 것 같다.

Cursor 로 분석 요청하면 디컴파일에 계속 실패하는데 그래도 어셈블리어 보고 분석 결과를 알려준다.

이유는 나중에 체크해보는걸로,,

profile
JFDI !

0개의 댓글