Skip to content

Reverse engineering

Context Code ships with a built-in reverse engineering tool on top of Ghidra, based on REA (rea-agents, MIT license). With it the agent analyzes executables, DLLs, .NET binaries, ELF, Mach-O, APK and firmware without you opening Ghidra or writing scripts: just ask in the chat.

  • Ghidra 12.1 or later, unpacked in a usual folder (C:\tools, C:\Program Files, your home folder, /opt…) or wherever GHIDRA_INSTALL_DIR points.
  • A JDK 21 or later (for example Temurin 21), in its normal install path or wherever JAVA_HOME points.

If both are there, the app registers the rea server by itself when a conversation opens; you will see it in Settings → MCP, among the built-in ones. If either is missing it does not appear, and nothing else changes. The first time it downloads REA and a compatible Node (a few minutes); after that it starts in seconds.

Type something like this in the chat:

  • “Analyze C:\Downloads\setup.exe and tell me what it does.”
  • “In this DLL, where is the license checked?”
  • “Decompile the function that uses the string “Invalid password”.”
  • “Does this binary open network connections or stay resident?”

The agent follows a fixed method: it computes the SHA-256, opens the binary, gets an overview (format, architecture, sections, resources), searches strings and functions related to your question, follows their cross-references, decompiles what matters to pseudocode, renames and comments the functions it already understands and ends with a concrete answer: what it does, where (address and function name) and what is verified versus inferred.

In **Skills and MCP → Installed** the `rea` server shows as built in and the `ingenieria-inversa` skill as enabled (the app is shown in Spanish).

REA offers about 200 tools (web, Android over adb, macOS, EVM contracts…). The agent only gets the 32 for binary analysis: open and close, overview, PE resources, .NET, Mach-O, APK, firmware, functions, strings, names, pseudocode, assembly, callers and callees, cross-references, call graph, paths between functions, string tracing, byte reads and renaming. That keeps the context free of what does not help with “analyze this exe”.

If you need the rest, set CONTEXT_CODE_REA_TODAS=1 before opening the app. To remove the tool, set CONTEXT_CODE_DISABLE_REA_MCP=1 or turn it off in Settings → MCP.

  • It is static analysis: the agent does not run the binary. If you suspect malware, still work on an isolated machine.
  • On Windows, REA opens Windows executables (PE) well; ELF and Mach-O are better analyzed from Linux or macOS.
  • Use it on software you have the right to analyze: your own, one whose license allows it, interoperability or security research.