Finding Substitutable Binary Code By Synthesizing Adapters
Vaibhav Sharma, Kesha Hietala, Stephen McCamant

TL;DR
This paper introduces an algorithm for identifying functionally equivalent binary code segments by synthesizing adapters, enabling applications like security improvements, deobfuscation, and code optimization in large-scale binary analysis.
Contribution
The paper presents a novel adapter synthesis technique for finding substitutable binary functions, combining concrete enumeration and symbolic execution, with large-scale evaluations demonstrating its effectiveness.
Findings
Adapter synthesis finds functionally equivalent code in real-world binaries.
The technique can improve security and efficiency of binary functions.
Large-scale experiments show practical applicability in reverse engineering.
Abstract
Independently developed codebases typically contain many segments of code that perform same or closely related operations (semantic clones). Finding functionally equivalent segments enables applications like replacing a segment by a more efficient or more secure alternative. Such related segments often have different interfaces, so some glue code (an adapter) is needed to replace one with the other. We present an algorithm that searches for replaceable code segments at the function level by attempting to synthesize an adapter between them from some family of adapters; it terminates if it finds no possible adapter. We implement our technique using (1) concrete adapter enumeration based on Intel's Pin framework (2) binary symbolic execution, and explore the relation between size of adapter search space and total search time. We present examples of applying adapter synthesis for improving…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
