Lune

USENIX Security2023Top-tier venue

SAFER: Efficient and Error-Tolerant Binary Instrumentation

Soumyakant Priyadarshan, Huan Nguyen, Rohit Chouhan, R. Sekar

Abstract

Recent advances in binary instrumentation have been focused on performance. By statically transforming the code to avoid additional runtime operations, systems such as Egalito and RetroWrite achieve near zero overheads. The safety of these static transformations relies on several assumptions: (a) errorfree and complete disassembly, (b) exclusive use of positionindependent code, and (c) code pointer identification that is free of both false positives and false negatives. Violations of these assumptions can cause an instrumented program to crash, or worse, experience delayed failures that corrupt data or compromise security. Many earlier binary instrumentation techniques (e.g., DynamoRio, Pin, and BinCFI) minimized such assumptions, but the price to be paid is a much higher overhead, especially for indirect-call-intensive (e.g., C++) applications. Thus, an open research question is whether the safety benefits of the earlier works can be combined with the performance benefits of recent works. We answer this question in the affirmative by presenting a new instrumentation technique that (a) tolerates the use of position-dependent code and common disassembly and static analysis errors, and (b) detects assumption violations at runtime before they can lead to undefined behavior. Our approach provides a fail-crash primitive for graceful shutdown or recovery. We achieve safe instrumentation without sacrificing performance, introducing a low overhead of about ∼ 2%.

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.

5 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

  • Superset Disassembly: Statically Rewriting x86 Binaries Without Heuristics cites Ramblr: Making Reassembly Great Again
  • Scalable, Sound, and Accurate Jump Table Analysis cites Ramblr: Making Reassembly Great Again
  • Scalable, Sound, and Accurate Jump Table Analysis cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization cites Superset Disassembly: Statically Rewriting x86 Binaries Without Heuristics
  • 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
  • Accurate Disassembly of Complex Binaries Without Use of Compiler Metadata cites Superset Disassembly: Statically Rewriting x86 Binaries Without Heuristics
  • Accurate Disassembly of Complex Binaries Without Use of Compiler Metadata cites RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • Accurate Disassembly of Complex Binaries Without Use of Compiler Metadata cites Ramblr: Making Reassembly Great Again
  • Accurate Disassembly of Complex Binaries Without Use of Compiler Metadata cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • Analyzing Bytes: Pre-Disassembly Static Binary Analysis cites Superset Disassembly: Statically Rewriting x86 Binaries Without Heuristics
  • Analyzing Bytes: Pre-Disassembly Static Binary Analysis cites Scalable, Sound, and Accurate Jump Table Analysis
  • Analyzing Bytes: Pre-Disassembly Static Binary Analysis cites RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • Analyzing Bytes: Pre-Disassembly Static Binary Analysis cites Accurate Disassembly of Complex Binaries Without Use of Compiler Metadata
  • Analyzing Bytes: Pre-Disassembly Static Binary Analysis cites Ramblr: Making Reassembly Great Again
  • Analyzing Bytes: Pre-Disassembly Static Binary Analysis cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • You Can't Judge a Binary by Its Header: Data-Code Separation for Non-Standard ARM Binaries Using Pseudo Labels cites Superset Disassembly: Statically Rewriting x86 Binaries Without Heuristics
  • You Can't Judge a Binary by Its Header: Data-Code Separation for Non-Standard ARM Binaries Using Pseudo Labels cites RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • You Can't Judge a Binary by Its Header: Data-Code Separation for Non-Standard ARM Binaries Using Pseudo Labels cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • Too Subtle to Notice: Investigating Executable Stack Issues in Linux Systems cites Superset Disassembly: Statically Rewriting x86 Binaries Without Heuristics
  • Too Subtle to Notice: Investigating Executable Stack Issues in Linux Systems cites RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • Too Subtle to Notice: Investigating Executable Stack Issues in Linux Systems cites Ramblr: Making Reassembly Great Again
  • Too Subtle to Notice: Investigating Executable Stack Issues in Linux Systems cites SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Accurate Disassembly of Complex Binaries Without Use of Compiler MetadataSoumyakant Priyadarshan, Huan Nguyen, R. SekarASPLOS 2023 · 7 citations
  2. Scalable, Sound, and Accurate Jump Table AnalysisHuan Nguyen, Soumyakant Priyadarshan, R. SekarISSTA 2024 · 3 citations
  3. Analyzing Bytes: Pre-Disassembly Static Binary AnalysisHuan Nguyen, Soumyakant Priyadarshan, Chencheng Jiang, R. SekarPLDI 2026
  4. You Can't Judge a Binary by Its Header: Data-Code Separation for Non-Standard ARM Binaries Using Pseudo LabelsHadjer Benkraouda, Nirav Diwan, Gang WangS&P 2025
  5. Too Subtle to Notice: Investigating Executable Stack Issues in Linux SystemsHengkai Ye, Hong HuNDSS 2025

Builds on11

  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. SoK: Shining Light on Shadow StacksNathan Burow, Xinping Zhang, Mathias PayerS&P 2019 · 170 citations
  4. Ramblr: Making Reassembly Great AgainRuoyu Wang, Yan Shoshitaishvili, Antonio Bianchi, Aravind Machiry et al.NDSS 2017 · 155 citations
  5. Superset Disassembly: Statically Rewriting x86 Binaries Without HeuristicsErick Bauman, Zhiqiang Lin, Kevin W. HamlenNDSS 2018 · 112 citations

Related papers

  1. Incremental CFG patching for binary rewritingXiaozhu Meng, Weijie LiuASPLOS 2021 · 8 citations
  2. Egalito: Layout-Agnostic Binary RecompilationDavid Williams-King, Hidenori Kobayashi, Kent Williams-King, Graham Patterson et al.ASPLOS 2020 · 68 citations
  3. SoK: Demystifying Binary Lifters Through the Lens of Downstream ApplicationsZhibo Liu, Yuanyuan Yuan, Shuai Wang, Yuyan BaoS&P 2022 · 29 citations
  4. StochFuzz: Sound and Cost-effective Fuzzing of Stripped Binaries by Incremental and Stochastic RewritingZhuo Zhang, Wei You, Guanhong Tao, Yousra Aafer et al.S&P 2021 · 53 citations
  5. Stack Bounds Protection with Low Fat PointersGregory J. Duck, Roland H. C. Yap, Lorenzo CavallaroNDSS 2017 · 121 citations
Dusk over the sea between two cliffs drawn in fine vertical lines