From bytes to artifacts
Follow the bytes through HydIR
Open an ELF in HydIR and two static paths can examine it: an automatic Ghidra worker exports raw P-code, while HydIR's native frontend builds its own intermediate representations. For a selected function and bounded input, a separate Frida observer (Linux directly, or a packaged WSL2 worker on Windows) can record one runtime path. The optional Triton bridge explores bounded machine-instruction paths and returns symbolic expressions and candidate models. Each result stays tied to the original bytes and addresses.
The whole project on one map#
Start with one ELF. Follow static analysis, a recorded execution, or bounded symbolic exploration. Select a path to highlight its inputs and outputs.
Arrows indicate artifact or input dependencies. Trace, slice, and LLVM are alternative Ghidra operations. Native LLVM exports from FunctionIR; native C generation uses CIR. Frida witnesses one input-specific run; optional comparisons and rediscovery use validated Ghidra evidence. Triton operates on bounded machine-instruction paths, independently of LLVM and native C generation. A solver candidate needs separate concrete validation. Explore the workflow guides.
The two static routes examine the same bytes independently. Ghidra exports raw P-code; HydIR's native frontend builds MachineIR, StateIR, and FunctionIR. Native C generation uses CIR; LLVM is an optional FunctionIR export. Neither Frida observation nor Triton exploration is a prerequisite for producing static C.
Each connection denotes a supported input or artifact dependency. A successful earlier stage does not guarantee that every later stage succeeds. Inspect the binary identity, source addresses, scope, and explicit boundaries before interpreting a result.
Where runtime observation fits#
Open a local ELF, select an analyzed function, and choose Frida → Session. Supply program arguments directly or choose an InputSpec file for file inputs and custom limits. The current observer rejects nonempty stdin. Linux uses the observer bundle; Windows uses an explicitly installed, hash-verified WSL2 worker with isolation probes. A source checkout requires the generated bundle. Setup and runtime requirements explain both paths.
The observer returns a byte-checked DynamicTrace of blocks, calls, computed jumps, and captured entry registers for that one input. The GUI can use those registers as a P-code seed or plan observed indirect calls and jumps for isolated Ghidra reanalysis. A trace does not prove that unobserved paths are absent, that the static CFG is complete, or that the process exit code is known.
Where symbolic exploration fits#
Run Triton explores the selected x86-64 function through an optional Python bridge. It uses concrete state and selected symbolic inputs to build expressions, path conditions, and solver queries. Missing state, unsupported effects, and exhausted budgets remain boundaries. This route operates on machine instructions independently of Ghidra P-code lifting, LLVM export, and native C generation.
A returned model is a candidate under those assumptions. Concrete validation is a separate operation; a solver result does not establish whole-program equivalence. Triton setup and exploration and captured-state investigation describe the distinct workflows.
The native path in four steps#
1. Inventory the ELF
The native importer reads a little-endian x86-64 ELF and records file-derived sections, load mappings, symbols, imports, and relocations. Ordinary inspection does not pretend that an empty call or reference list proves there are none; recovery state is explicit. The desktop's broader disassembly scan marks uncertain uncovered regions.
2. Recover a bounded CFG
For a selected function symbol or analyst-supplied entry and byte extent, iced-x86 decodes reachable instructions and follows direct branches. Recovery rejects overlapping instructions and edges outside the declared extent. The CFG retains instruction addresses, original bytes, edge kinds, and scope provenance.
3. Lift supported machine state
MachineIR keeps decoded instructions and their source bytes. StateIR tracks how registers, flags, and memory change across branches. FunctionIR adds calls, parameters, stack objects, and evidence for pointers. The separate scalar LLVM route accepts an explicit SysV AMD64 u64(u64,u64) assertion, rejects reads that may be uninitialized, and emits explicit joins. Wrapping machine arithmetic does not acquire an LLVM no-overflow promise.
4. Emit and test scoped outputs
The native C path turns supported FunctionIR into CIR and then low-level or structured C. Recovered DWARF facts and analyst edits in AnalysisModel can feed a typed C view. Unresolved flow may keep labels and gotos, while unsupported effects remain visible. Demo scripts verify generated LLVM where tools are available and compare selected outputs with trusted originals on finite input sets. Those checks execute the originals, so they use trusted fixtures.
Another path: whole-executable rebuilding is not a consequence of a successful scalar function lift. It requires complete supported text coverage in a static freestanding program, bounded mapped data, and checked read/write/exit syscall behavior. It emits a new executable and a separate report.
Typed models and artifact revisions#
Digest-bound AnalysisModel facts feed bounded HighLevelCIR and HighLevelCfgCir views. Local model edits create revisions, and selective caches retain unaffected typed output. The v3 API exposes analysis models, high-level artifacts, and typed C with revision and digest checks. Typed model contracts describe inference limits and provenance.
Interfaces and ownership#
The egui workbench and hydirctl expose native analysis and can start the automatic Ghidra worker for a local ELF. hydird exposes authenticated projects with immutable revisions and artifacts; the Python SDK covers the implemented remote subset. Local ELF opening stays local until a separate upload action. Local analyst facts live in a private on-device ledger; remote project facts live in the service ledger and do not automatically sync.
Read the compiler theory article in the blogs, or inspect the source tree and SDK reference.
