Lune

ASPLOS2021顶会

Incremental CFG patching for binary rewriting

Xiaozhu Meng, Weijie Liu

摘要

Binary rewriting has been widely used in software security, software correctness assessment, performance analysis, and debugging. One approach for binary rewriting lifts the binary to IR and then regenerates a new one, which achieves near-to-zero runtime overhead, but relies on several limiting assumptions on binaries to achieve complete binary analysis to perform IR lifting. Another approach patches individual instructions without utilizing any binary analysis, which has great reliability as it does not make assumptions about the binary, but incurs prohibitive runtime overhead.

In this paper, we introduce Incremental CFG Patching, a general binary rewriting approach, to balance the runtime overhead and binary rewriting generality. The basic idea is to utilize code patching to catch control flow that we cannot accurately rewrite and use binary analysis to rewrite as much control flow as possible. A key feature of our approach is that we opportunistically utilize binary analysis and binary meta-data to reduce runtime overhead; but for cases where binary analysis failed or there is no sufficient metadata to support binary analysis, we can still correctly rewrite the binary with small, additional runtime overhead, or achieve partial instrumentation by skipping certain challenging functions. Our approach supports multiple architectures (x86-64, ppc64le, and aarch64), and multiple source programming languages (C/C++ including C++ exceptions, Fortran, Rust and Go), and works with both position dependent and independent code. The evaluation shows that our new approach on average incurs little runtime overhead with SPEC CPU 2017 (<1%) and small overhead on Firefox (<2%), and can successfully rewrite Docker, which is written in Go. Finally, we present a case study that speeds up an instrumentation based CPU/GPU synchronization analysis tool.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries 引用了 A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary Level
  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization 引用了 An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization 引用了 Ramblr: Making Reassembly Great Again
  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • LeanBin: Harnessing Lifting and Recompilation to Debloat Binaries 引用了 ARMore: Pushing Love Back Into Binaries
  • Ramblr: Making Reassembly Great Again 引用了 An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
  • Long-Range Indirect Control-Flow Prediction in Stripped Binaries via Dual Virtual Hubs and Multi-Task Graph Learning 引用了 An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
  • Long-Range Indirect Control-Flow Prediction in Stripped Binaries via Dual Virtual Hubs and Multi-Task Graph Learning 引用了 A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary Level
  • Long-Range Indirect Control-Flow Prediction in Stripped Binaries via Dual Virtual Hubs and Multi-Task Graph Learning 引用了 RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • Long-Range Indirect Control-Flow Prediction in Stripped Binaries via Dual Virtual Hubs and Multi-Task Graph Learning 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • ARMore: Pushing Love Back Into Binaries 引用了 RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • ARMore: Pushing Love Back Into Binaries 引用了 Ramblr: Making Reassembly Great Again
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. FITS: Inferring Intermediate Taint Sources for Effective Vulnerability Analysis of IoT Device FirmwarePuzhuo Liu, Yaowen Zheng, Chengnian Sun, Chuan Qin 等ASPLOS 2023 · 21 次引用
  2. LeanBin: Harnessing Lifting and Recompilation to Debloat BinariesIgor Wodiany, Antoniu Pop, Mikel LujánASE 2024 · 1 次引用
  3. Long-Range Indirect Control-Flow Prediction in Stripped Binaries via Dual Virtual Hubs and Multi-Task Graph LearningKun Liu, Zhengming Ding, Chenke Luo, Tianyi Xu 等CCS 2026
  4. ARMore: Pushing Love Back Into BinariesLuca Di Bartolomeo, Hossein Moghaddas, Mathias PayerUSENIX Security 2023

它引用的 Paper11

  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. A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary LevelVictor van der Veen, Enes Göktas, Moritz Contag, Andre Pawlowski 等S&P 2016 · 227 次引用
  3. RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and SanitizationSushant Dinesh, Nathan Burow, Dongyan Xu, Mathias PayerS&P 2020 · 187 次引用
  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. Ramblr: Making Reassembly Great AgainRuoyu Wang, Yan Shoshitaishvili, Antonio Bianchi, Aravind Machiry 等NDSS 2017 · 155 次引用

相关 Paper

  1. Binary rewriting without control flow recoveryGregory J. Duck, Xiang Gao, Abhik RoychoudhuryPLDI 2020 · 77 次引用
  2. StochFuzz: Sound and Cost-effective Fuzzing of Stripped Binaries by Incremental and Stochastic RewritingZhuo Zhang, Wei You, Guanhong Tao, Yousra Aafer 等S&P 2021 · 53 次引用
  3. SAFER: Efficient and Error-Tolerant Binary InstrumentationSoumyakant Priyadarshan, Huan Nguyen, Rohit Chouhan, R. SekarUSENIX Security 2023
  4. Superset Disassembly: Statically Rewriting x86 Binaries Without HeuristicsErick Bauman, Zhiqiang Lin, Kevin W. HamlenNDSS 2018 · 112 次引用
  5. SelectiveTaint: Efficient Data Flow Tracking With Static Binary RewritingSanchuan Chen, Zhiqiang Lin, Yinqian ZhangUSENIX Security 2021 · 45 次引用
黄昏的海面,两侧是细线勾勒的悬崖