Lune

EuroSys2020Top-tier venue

BinRec: dynamic binary lifting and recompilation

Anil Altinay, Joseph Nash, Taddeus Kroes, Prabhu Rajasekaran, Dixin Zhou, Adrian Dabrowski, David Gens, Yeoul Na, Stijn Volckaert, Cristiano Giuffrida, Herbert Bos, Michael Franz

Abstract

Binary lifting and recompilation allow a wide range of installtime program transformations, such as security hardening, deobfuscation, and reoptimization. Existing binary lifting tools are based on static disassembly and thus have to rely on heuristics to disassemble binaries.

In this paper, we present BinRec, a new approach to heuristic-free binary recompilation which lifts dynamic traces of a binary to a compiler-level intermediate representation (IR) and lowers the IR back to a "recovered" binary. This enables BinRec to apply rich program transformations, such as compiler-based optimization passes, on top of the recovered representation. We identify and address a number of challenges in binary lifting, including unique challenges posed by our dynamic approach. In contrast to existing frameworks, our dynamic frontend can accurately disassemble and lift binaries without heuristics, and we can successfully recover obfuscated code and all SPEC INT 2006 benchmarks including C++ applications. We evaluate BinRec in three application domains: i) binary reoptimization, ii) deobfuscation (by recovering partial program semantics Joint-First Authors

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

24 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization cites An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization cites Ramblr: Making Reassembly Great Again
  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • StateFormer: fine-grained type recovery from binaries using generative state modeling cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • Ramblr: Making Reassembly Great Again cites An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
  • Plankton: Reconciling Binary Code and Debug Information cites RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • RAZOR: A Framework for Post-deployment Software Debloating cites An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
  • RAZOR: A Framework for Post-deployment Software Debloating cites Ramblr: Making Reassembly Great Again
  • A Broad Comparative Evaluation of Software Debloating Tools cites RAZOR: A Framework for Post-deployment Software Debloating
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers24

  1. StateFormer: fine-grained type recovery from binaries using generative state modelingKexin Pei, Jonas Guan, Matthew Broughton, Zhongtian Chen et al.FSE 2021 · 53 citations
  2. A Broad Comparative Evaluation of Software Debloating ToolsMichael D. Brown, Adam Meily, Brian Fairservice, Akshay Sood et al.USENIX Security 2024 · 16 citations
  3. Minimum viable device drivers for ARM trustzoneLiwei Guo, Felix Xiaozhu LinEuroSys 2022 · 15 citations
  4. Plankton: Reconciling Binary Code and Debug InformationAnshunkang Zhou, Chengfeng Ye, Heqing Huang, Yuandao Cai et al.ASPLOS 2024 · 11 citations
  5. Towards Smart Contract Fuzzing on GPUsWeimin Chen, Xiapu Luo, Haipeng Cai, Haoyu WangS&P 2024 · 8 citations

Builds on6

  1. 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
  2. RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and SanitizationSushant Dinesh, Nathan Burow, Dongyan Xu, Mathias PayerS&P 2020 · 187 citations
  3. An In-Depth Analysis of Disassembly on Full-Scale x86/x64 BinariesDennis Andriesse, Xi Chen, Victor van der Veen, Asia Slowinska et al.USENIX Security 2016 · 162 citations
  4. Ramblr: Making Reassembly Great AgainRuoyu Wang, Yan Shoshitaishvili, Antonio Bianchi, Aravind Machiry et al.NDSS 2017 · 155 citations
  5. RAZOR: A Framework for Post-deployment Software DebloatingChenxiong Qian, Hong Hu, Mansour Alharthi, Simon Pak Ho Chung et al.USENIX Security 2019 · 132 citations

Related papers

  1. What You Trace is What You Get: Dynamic Stack-Layout Recovery for Binary RecompilationFabian Parzefall, Chinmay Deshpande, Felicitas Hetzelt, Michael FranzASPLOS 2024 · 5 citations
  2. Lifting Optimized Binaries to Canonical Compiler IR via Structure-Aware Retrieval and Iterative VerificationXiaoao Zhu, Jie Ren, Zhiqiang Li, Jie Zheng et al.ACL 2026
  3. LeanBin: Harnessing Lifting and Recompilation to Debloat BinariesIgor Wodiany, Antoniu Pop, Mikel LujánASE 2024 · 1 citation
  4. SoK: Demystifying Binary Lifters Through the Lens of Downstream ApplicationsZhibo Liu, Yuanyuan Yuan, Shuai Wang, Yuyan BaoS&P 2022 · 29 citations
  5. Polynima: Practical Hybrid Recompilation for Multithreaded BinariesChinmay Deshpande, Fabian Parzefall, Felicitas Hetzelt, Michael FranzEuroSys 2024 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines