Disassembly as Weighted Interval Scheduling with Learned Weights
Authors:
- 12 May 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 3033-3050
Abstract
Disassembly is the first step of a variety of binary analysis and transformation techniques, such as reverse engineering, or binary rewriting. Recent disassembly approaches consist of three phases: an exploration phase, that overapproximates the binary's code; an analysis phase, that assigns weights to candidate instructions or basic blocks; and a conflict resolution phase, that downselects the final set of instructions. We present a disassembly algorithm that generalizes this pattern for a wide range of architectures, namely x86, x64, arm32, and aarch64. Our algorithm presents a novel conflict resolution method that reduces disassembly to weighted interval scheduling. Additionally, we present a weight assignment algorithm that allows us to learn optimal weights for the various disassembly heuristics in the analysis phase. Learned weights outperform manually tuned weights in most cases while reducing the number of necessary heuristics by 40% (by setting their weights to zero). Our implementation, built on top of Ddisasm, outperforms state-of-the-art disassemblers in several metrics and achieves the largest proportion of perfectly disassembled binaries by a wide margin in all evaluated datasets.Keywords
All Related Versions
This publication has 18 references indexed in Scilit:
- On the Decidability of Disassembling Binaries2024
- D-ARM: Disassembling ARM Binaries by Lightweight Superset Instruction Interpretation and Graph Modeling2023
- StochFuzz: Sound and Cost-effective Fuzzing of Stripped Binaries by Incremental and Stochastic Rewriting2021
- SoK: All You Ever Wanted to Know About x86/x64 Binary Disassembly But Were Afraid to Ask2021
- RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization2020
- Probabilistic Disassembly2019
- Compiler-Agnostic Function Detection in Binaries2017
- SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis2016
- BAP: A Binary Analysis Platform2011
- A note on greedy algorithms for the maximum weighted independent set problemDiscrete Applied Mathematics, 2003