Lune

USENIX Security2024顶会

Ahoy SAILR! There is No Need to DREAM of C: A Compiler-Aware Structuring Algorithm for Binary Decompilation

Zion Leonahenahe Basque, Ati Priya Bajaj, Wil Gibbs, Jude O'Kain, Derron Miao, Tiffany Bao, Adam Doupé, Yan Shoshitaishvili, Ruoyu Wang

摘要

Contrary to prevailing wisdom, we argue that the measure of binary decompiler success is not to eliminate all gotos or reduce the complexity of the decompiled code but to get as close as possible to the original source code. Many gotos exist in the original source code (the Linux kernel version 6.1 contains 3,754) and, therefore, should be preserved during decompilation, and only spurious gotos should be removed.

Fundamentally, decompilers insert spurious gotos in decompilation because structuring algorithms fail to recover C-style structures from binary code. Through a quantitative study, we find that the root cause of spurious gotos is compiler-induced optimizations that occur at all optimization levels (17% in non-optimized compilation). Therefore, we believe that to achieve high-quality decompilation, decompilers must be compiler-aware to mirror (and remove) the goto-inducing optimizations.

In this paper, we present a novel structuring algorithm called SAILR that mirrors the compilation pipeline of GCC and precisely inverts goto-inducing transformations. We build an open-source decompiler on angr (the ANGR DE-COMPILER) and implement SAILR as well as otherwiseunavailable prior work (Phoenix, DREAM, and rev.ng's Combing) and evaluate them, using a new metric of how close the decompiled code structure is to the original source code, showing that SAILR markedly improves on prior work. In addition, we find that SAILR performs well on binaries compiled with non-GCC compilers, which suggests that compilers similarly implement goto-inducing transformations.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 14 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Decompiling for Constant-Time Analysis 引用了 D-Helix: A Generic Decompiler Testing Framework Using Symbolic Differentiation
  • Decompiling for Constant-Time Analysis 引用了 Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study
  • Decompiling for Constant-Time Analysis 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • OSPREY: Recovery of Variable and Data Structure via Probabilistic Analysis for Stripped Binary 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • D-Helix: A Generic Decompiler Testing Framework Using Symbolic Differentiation 引用了 OSPREY: Recovery of Variable and Data Structure via Probabilistic Analysis for Stripped Binary
  • D-Helix: A Generic Decompiler Testing Framework Using Symbolic Differentiation 引用了 Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study
  • "Len or index or count, anything but v1": Predicting Variable Names in Decompilation Output with Transfer Learning 引用了 OSPREY: Recovery of Variable and Data Structure via Probabilistic Analysis for Stripped Binary
  • "Len or index or count, anything but v1": Predicting Variable Names in Decompilation Output with Transfer Learning 引用了 Debin: Predicting Debug Information in Stripped Binaries
  • "Len or index or count, anything but v1": Predicting Variable Names in Decompilation Output with Transfer Learning 引用了 Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study
  • "Len or index or count, anything but v1": Predicting Variable Names in Decompilation Output with Transfer Learning 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • Bin2Wrong: a Unified Fuzzing Framework for Uncovering Semantic Errors in Binary-to-C Decompilers 引用了 D-Helix: A Generic Decompiler Testing Framework Using Symbolic Differentiation
  • Bin2Wrong: a Unified Fuzzing Framework for Uncovering Semantic Errors in Binary-to-C Decompilers 引用了 "Len or index or count, anything but v1": Predicting Variable Names in Decompilation Output with Transfer Learning
  • Bin2Wrong: a Unified Fuzzing Framework for Uncovering Semantic Errors in Binary-to-C Decompilers 引用了 Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study
  • Debin: Predicting Debug Information in Stripped Binaries 引用了 Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detection
  • Debin: Predicting Debug Information in Stripped Binaries 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • Decompiling the Synergy: An Empirical Study of Human-LLM Teaming in Software Reverse Engineering 引用了 Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper14

  1. "Len or index or count, anything but v1": Predicting Variable Names in Decompilation Output with Transfer LearningKuntal Kumar Pal, Ati Priya Bajaj, Pratyay Banerjee, Audrey Dutcher 等S&P 2024 · 30 次引用
  2. D-Helix: A Generic Decompiler Testing Framework Using Symbolic DifferentiationMuqi Zou, Arslan Khan, Ruoyu Wu, Han Gao 等USENIX Security 2024 · 14 次引用
  3. Decompiling the Synergy: An Empirical Study of Human-LLM Teaming in Software Reverse EngineeringZion Leonahenahe Basque, Samuele Doria, Ananta Soneji, Wil Gibbs 等NDSS 2026 · 7 次引用
  4. Bin2Wrong: a Unified Fuzzing Framework for Uncovering Semantic Errors in Binary-to-C DecompilersZao Yang, Stefan NagyUSENIX ATC 2025 · 6 次引用
  5. Decompiling for Constant-Time AnalysisSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Youcef Bouzid 等OOPSLA 2026 · 1 次引用

它引用的 Paper9

  1. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
  2. Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity DetectionXiaojun Xu, Chang Liu, Qian Feng, Heng Yin 等CCS 2017 · 682 次引用
  3. Debin: Predicting Debug Information in Stripped BinariesJingxuan He, Pesho Ivanov, Petar Tsankov, Veselin Raychev 等CCS 2018 · 148 次引用
  4. Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User StudyKhaled Yakdan, Sergej Dechand, Elmar Gerhards-Padilla, Matthew SmithS&P 2016 · 128 次引用
  5. OSPREY: Recovery of Variable and Data Structure via Probabilistic Analysis for Stripped BinaryZhuo Zhang, Yapeng Ye, Wei You, Guanhong Tao 等S&P 2021 · 78 次引用

相关 Paper

  1. Augmenting Decompiler Output with Learned Variable Names and TypesQibin Chen, Jeremy Lacomis, Edward J. Schwartz, Claire Le Goues 等USENIX Security 2022
  2. PseudoFix: Refactoring Distorted Structures in Decompiled C PseudocodeGangyang Li, Xiuwei Shang, Shaoyin Cheng, Junqi Zhang 等ASE 2025 · 1 次引用
  3. Oxidizer: Toward Concise and High-fidelity Rust DecompilationYibo Liu, Zion Leonahenahe Basque, Arvind S. Raj, Chavin Udomwongsa 等S&P 2026 · 1 次引用
  4. An In-Depth Analysis of Disassembly on Full-Scale x86/x64 BinariesDennis Andriesse, Xi Chen, Victor van der Veen, Asia Slowinska 等USENIX Security 2016 · 162 次引用
  5. Lifting Optimized Binaries to Canonical Compiler IR via Structure-Aware Retrieval and Iterative VerificationXiaoao Zhu, Jie Ren, Zhiqiang Li, Jie Zheng 等ACL 2026
黄昏的海面,两侧是细线勾勒的悬崖