Lifting Optimized Binaries to Canonical Compiler IR via Structure-Aware Retrieval and Iterative Verification
Xiaoao Zhu, Jie Ren, Zhiqiang Li, Jie Zheng, Zhanyong Tang, Zheng Wang
Abstract
Lifting stripped and highly optimized binaries to the canonical compiler intermediate representation (IR) enables program analysis when source code is unavailable. However, compiler optimizations severely distort controlflow and data-flow structure, making existing rule-based and LLM-based decompilation approaches brittle. We present BRIDGE, a system that reliably lifts optimized binaries to analysis-friendly compiler IR. BRIDGE combines control-flow-aware retrieval-augmented generation with feedback-driven verification. It uses pseudo-probe instrumentation to align optimized binary fragments with normalized IR semantics, and then employs an iterative refinement loop guided by static analysis and runtime feedback to improve executability and semantic consistency. We evaluate BRIDGE on HumanEval-Decompile and MBPP, lifting x86-64 and ARM64 binaries to LLVM IR. BRIDGE outperforms seven baselines, achieving an average of over 30% higher re-executability than the strongest general-purpose LLM baseline.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext dc8e6659-9925-42b8-829f-d952effbd2a6Builds on6
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens et al.S&P 2016 · 1,085 citations
- LLM4Decompile: Decompiling Binary Code with Large Language ModelsHanzhuo Tan, Qi Luo, Jing Li, Yuqun ZhangEMNLP 2024 · 31 citations
- A Taxonomy of C Decompiler Fidelity IssuesLuke Dramko, Jeremy Lacomis, Edward J. Schwartz, Bogdan Vasilescu et al.USENIX Security 2024 · 23 citations
- BTR: Binary Token Representations for Efficient Retrieval Augmented Language ModelsQingqing Cao, Sewon Min, Yizhong Wang, Hannaneh HajishirziICLR 2024 · 7 citations
Related papers
- SoK: Demystifying Binary Lifters Through the Lens of Downstream ApplicationsZhibo Liu, Yuanyuan Yuan, Shuai Wang, Yuyan BaoS&P 2022 · 29 citations
- BinRec: dynamic binary lifting and recompilationAnil Altinay, Joseph Nash, Taddeus Kroes, Prabhu Rajasekaran et al.EuroSys 2020 · 51 citations
- Formally verified lifting of C-compiled x86-64 binariesFreek Verbeek, Joshua A. Bockenek, Zhoulai Fu, Binoy RavindranPLDI 2022 · 17 citations
- Scalable validation of binary liftersSandeep Dasgupta, Sushant Dinesh, Deepan Venkatesh, Vikram S. Adve et al.PLDI 2020 · 29 citations
- LeanBin: Harnessing Lifting and Recompilation to Debloat BinariesIgor Wodiany, Antoniu Pop, Mikel LujánASE 2024 · 1 citation
