RHEXA

User manual

Development status: RHEXA is not yet published as a package. It is installed from source. The command and the MCP server are called rhexa.

Concepts

Target
The artefact under examination: a native program, a library, an app, a web page, a capture. RHEXA identifies it by its SHA-256 hash.
Session
open_binary opens a target; the Rhexa Engine starts on the first analysis call and keeps the analysed program until close_binary.
Engine and providers
Deep static analysis is done by the Rhexa Engine. Hopper (G5.3), IDA (G5.4) and JEB (G5.5) are removed, so the engine is the only static deep analyser. Specialist tools such as jadx remain.
Evidence
Every result is evidence with artefact identity, tool, parameters, engine version and location. Observations, inferences, hypotheses and open questions stay separate; missing coverage is reported.
Unknowns
What cannot be backed by evidence is recorded as unknown instead of guessed.

Working with the agent

Key tools

ToolPurpose
open_binary, close_binaryopen a target or close the session, optionally with a snapshot
binary_overviewformat, architecture, segments, number of functions and strings
list_procedures, search_strings, list_stringssearch inventories
analyze_function, procedure_pseudo_codefunction dossier or pseudocode
read_bytes, inspect_native_instructionmemory contents and single instructions
disassemble_rangelisting of a section or address range; data stays data
run_engine_scriptcurated engine scripts: raw_strings, instruction_search, function_graph, cpp_classes
inspect_object_fileheader, sections, symbols, relocations and DWARF line tables of ELF, PE and Mach-O as the file states them
search_pe_symbolssearch the export and import tables of every PE file in a directory tree within seconds, without the engine: which DLL exports or imports X?
inspect_com_type_libraryread COM type libraries (.tlb or embedded in DLLs): interfaces, methods, DispIDs, parameters, enums
create_investigation_project, open_investigation_projectcreate an investigation record or resume it after a restart
record_investigation_notekeep hypotheses, comments and next steps in the record
capture_process_scenariorun and observe a program under control (runtime)

The agent itself or rhexa --help shows the complete list.

Command line

rhexa providers --json                            # available analysis providers
rhexa analyze  <target> --provider ghidra --json   # overview
rhexa search   <target> "text" --provider ghidra --json
rhexa function <target> <name|address> --provider ghidra --json
rhexa decompile <target> <address> --provider ghidra --json
rhexa xrefs    <target> <address> --provider ghidra --json
rhexa trace    <target> "text" --provider ghidra --json

Without --json a readable summary is printed. The exit code is 0 on success and non-zero on a typed error, whose code and remedy appear in the output.

Snapshots and evidence

When closing a session, a snapshot can be written that contains target, analysis profile and all evidence:

close_binary  snapshot_path=/path/investigation.snapshot.json

On the command line, commands load a saved snapshot with --snapshot, so the analysis does not have to be repeated. Evidence can also be exported as a bundle, imported and compared.

Investigation projects

An investigation can run as a named project under ~/.rhexa/projects. While it is open, RHEXA saves every piece of evidence, open question, note and annotation immediately; even a crashed server loses nothing that was confirmed. Analysed programs stay in the project as an engine database and reopen without a new analysis when you resume: small programs in about 4 seconds, a 50 MB program in 9 seconds instead of 20 minutes. When a file changes, a new artefact version is created; runtime evidence from earlier sessions counts as historical.

rhexa project create my-investigation
rhexa project list
rhexa project show my-investigation

In the agent it is enough to say: "Open the investigation project my-investigation and continue."

Built-in agent

Without a separate agent client, RHEXA can answer a question itself with your own Claude API key (ANTHROPIC_API_KEY or ant auth login). Progress appears in the terminal; the run ends with a report of the answer, evidence and token use.

rhexa agent run ./app.apk "Does this app contain malicious code?"

Analysis tools run without asking. Tools that run foreign code, change the target or a device, use the network or paths outside the target ask in the terminal; without a terminal they are denied unless --allow permits them. Each run writes a private transcript under ~/.rhexa/agent/runs/. With --budget-usd 2 a run ends before its next tool round once the estimated cost reaches 2 USD.

Without the cloud it works with a local model through Ollama too, on the same machine or on the home network. RHEXA checks beforehand whether the model can use tools; it sends unencrypted traffic only to private addresses.

rhexa agent models --provider ollama
rhexa agent run ./app.apk "Does this app contain malicious code?" --provider ollama --model qwen3:14b   --ollama-url http://192.168.1.20:11434

For several questions in a row, rhexa agent chat ./app.apk opens a session that keeps the engine, the evidence and the conversation. /cost shows the use, /exit ends the chat, Ctrl+C cancels only the running question.

Workspace in the browser

rhexa ui --interactive opens a workspace under /w/ next to the read-only views. There you create an investigation record, choose a program from the start directory (more directories through RHEXA_UI_ROOTS) or upload one, and then run either direct analyses without AI – overview, finding functions, decompiling, cross-references, strings, APK – or a task for the built-in agent. Progress appears live; tools with side effects ask on the page and are denied after 5 minutes without an answer.

cd ~/samples
rhexa ui --interactive --open

The interface listens on 127.0.0.1 only, needs the access token from its start output and accepts forms only from itself.

Software installed on Windows

For programs installed on Windows, RHEXA works best in WSL2. The Windows drives are readable there under /mnt/c, /mnt/d and so on, and RHEXA also accepts Windows paths such as D:\Programs\Product\bin\module.dll directly. rhexa setup --client claude_desktop_windows registers RHEXA with Claude Desktop on Windows, which then starts it through wsl.exe. For large products with thousands of DLLs, search_pe_symbols first finds the right DLL (an installation of 4,300 files in about 8 seconds); only that one is opened with the engine. If the product is automated through COM, inspect_com_type_library reads the automation interface from its type libraries.

Runtime observation

Where static analysis is not enough, RHEXA can start and observe processes under control, use Frida sessions or observe web pages in a browser. These tools execute code and are marked accordingly in the tool contract.

Limits