How cyberkaida/reverse-engineering-assistant works
Project type and purpose
• This is an open-source, tool-driven AI assistant for reverse engineering (ReVA), composed of:
• A Java-based Ghidra extension (“ghidra-assistant”)
• A Python service/CLI suite (“reverse-engineering-assistant”)
• A gRPC protocol layer for bi-directional communication
• Integration with LLM providers (OpenAI, Ollama)
File-structure analysis
• Top-level:
• CI/CD workflows (.github/workflows)
• Makefile for building protocol stubs
• protocol/: .proto definitions (Reva*.proto)
• ghidra-assistant/: Gradle Java plugin for Ghidra
• reverse-engineering-assistant/: Python package, CLI tools, server logic
• requirements.txt & pyproject.toml for Python dependencies
• Patterns:
• Plugin microservice (Java) ↔ Core AI service (Python) via gRPC
• Python side uses LangChain for LLM orchestration and tool‐driven approach
• Build scripts generate gRPC clients/servers in both languages
Key README insights
• Two-step workflow:
1) Ghidra plugin launches/attaches to Python “reva-server”
2) CLI “reva-chat” starts interactive chat session
• Configuration via Ghidra Tool Options (provider, follow, auto-allow)
• gRPC underpins extension ↔ server communication
• LLM support pluggable via LangChain (OpenAI, Ollama, others)
a. Main components
• Ghidra Extension (Java)
• Python Service (“reva-server”)
• CLI Chat Client (“reva-chat”)
• LLM Providers (OpenAI API or Ollama server)
• Protocol buffers & gRPC layer
• Build toolchain (Makefile, protoc, Gradle, pipx)
b. Relationships & interactions
• Java plugin ↔ Python service: gRPC calls to request decompilation, bookmarks, symbols, etc.
• CLI “reva-chat” ↔ Python service: chat I/O over local IPC (could be gRPC or stdin/stdout)
• Python service ↔ LLM provider: HTTP or local RPC for model inference
• Build: .proto → protoc → generated stubs in Java & Python
c. Architectural patterns & principles
• Microservices / separation of concerns (UI plugin vs. AI engine)
• Tool-driven AI orchestration (small, self-contained RE tools exposed to LLM)
• Chain-of-reasoning pattern: each action broken into atomic steps with feedback
d. Technologies & frameworks
• Java/Gradle for Ghidra plugin
• Python/pyproject + pipx + LangChain
• gRPC / Protocol Buffers
• Makefile / protoc for codegen
• OpenAI REST API or Ollama local server for LLM inference