Lune

USENIX Security2025

TRex: Practical Type Reconstruction for Binary Code

Jay Bosamiya, Maverick Woo, Bryan Parno

2025年份

摘要

A lack of high-quality source-level types plagues decompiled code despite decades of advancement in the science and art of decompilation. Accurate type information is crucial in understanding program behavior, and existing decompilers rely heavily on manual input from human experts to improve decompiled output. We propose TRex, a tool that performs automated deductive type reconstruction, using a new perspective that accounts for the inherent impossibility of recovering lost source types. Compared with Ghidra, a state-of-the-art decompiler used by practitioners, TRex shows a noticeable improvement in the quality of output types on 124 of 125 binaries. By shifting focus away from recovering lost source types and towards constructing accurate behavior-capturing types, TRex broadens the possibilities for simpler and more elegant decompilation tools, and ultimately reduces the manual effort needed to analyze and understand binary code. 1 Indeed for one paper [25] , other employees at the same company attempting to reproduce the work stated that "[i]t is a powerful system but difficult to understand" and the "presentation is very dense and subtle" [12]. 2 https://github.com/secure-foundations/ trex,trex-usenix25 (archived at https://doi.org/10.5281/zenodo.15611994 ) 3 Capitalized to distinguish from prior informal usage ( §2) 4 TRex: Type Reconstruction for executables