최근 ghidra도 mcp가 개발되면서 신기한 기능 및 편의성이 많이 생겼음 하지만 외부 LLM을 사용할 수 없는 기업 환경인 경우 해당 ghidra mcp 기능을 활용함에 있어 제약이 생기는데, 이를 로컬에 mcp tools를 지원하는 ollama를 구축하여 어느정도 해결할 수 있음
구축 과정
ghidra 설치
우선 ghidra를 다운받음
https://github.com/NationalSecurityAgency/ghidra/releases
Releases · NationalSecurityAgency/ghidra
Ghidra is a software reverse engineering (SRE) framework - NationalSecurityAgency/ghidra
github.com
ghidra는 jdk21 버전 이상을 설치해야지 사용이 가능함 (jdk 24 버전을 받았음)
https://www.oracle.com/kr/java/technologies/downloads/
Download the Latest Java LTS Free
Subscribe to Java SE and get the most comprehensive Java support available, with 24/7 global access to the experts.
www.oracle.com
ghidra mcp 설치 및 import
ghidra mcp를 다운받음 (다음의 경로에 압축을 해제함 ghidra_11.3.1_PUBLIC\Extensions\GhidraMCP-release-1-0)
https://github.com/LaurieWired/GhidraMCP?tab=readme-ov-file
GitHub - LaurieWired/GhidraMCP: MCP Server for Ghidra
MCP Server for Ghidra. Contribute to LaurieWired/GhidraMCP development by creating an account on GitHub.
github.com
python(필수), nodejs(필요에 따라) 설치가 필요함
https://www.python.org/downloads/
Download Python
The official home of the Python Programming Language
www.python.org
https://nodejs.org/ko/download
Node.js — Node.js® 다운로드
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
nodejs.org
ghidra mcp extension import
+ 버튼을 눌러 ghidra mcp를 불러오고 사용 체크함
CodeBrowser에서 File -> Configure를 통해서 ghidra mcp를 활성화함
Ollama3.1 설치 및 실행
ollama 다운로드
Download Ollama on macOS
Download Ollama for macOS
ollama.com
아래의 명령어를 통해 ollama3.1(3.1 버전은 tools 사용을 지원함) 설치 및 실행
ollama pull llama3.1
ollama run llama3.1
5ire 설치 및 환경 설정
5ire 설치
https://github.com/nanbingxyz/5ire/releases
Releases · nanbingxyz/5ire
5ire is a cross-platform desktop AI assistant, MCP client. It compatible with major service providers, supports local knowledge base and tools via model context protocol servers . - nanbingxyz/5ire
github.com
아래의 명령어의 통해 mcp, requests 라이브러리 설치 진행
pip install "mcp[cli]"
pip install requests
5ire 환경 설정
Tools 토클의 활성화가 중요함
완료
'Security > reverse engineering' 카테고리의 다른 글
[dreamhack] Simple Patch Me (0) | 2025.02.10 |
---|---|
[dreamhack] Inject ME!!! (1) | 2025.02.09 |
[dreamhack] Secure Mail (0) | 2025.02.09 |
[dreamhack] rev-basic-6 (0) | 2024.12.25 |
[dreamhack] rev-basic-4 (0) | 2024.12.25 |