VEXIR2Vec: An Architecture-Neutral Embedding Framework for Binary Similarity
S VenkataKeerthy, Y Andaluri, S Dey… - arXiv preprint arXiv …, 2023 - arxiv.org
S VenkataKeerthy, Y Andaluri, S Dey, S Banerjee, R Upadrasta
arXiv preprint arXiv:2312.00507, 2023•arxiv.orgWe propose VEXIR2Vec, a code embedding framework for finding similar functions in
binaries. Our representations rely on VEX IR, the intermediate representation used by binary
analysis tools like Valgrind and angr. Our proposed embeddings encode both syntactic and
semantic information to represent a function, and is both application and architecture
independent. We also propose POV, a custom Peephole Optimization engine that
normalizes the VEX IR for effective similarity analysis. We design several optimizations like …
binaries. Our representations rely on VEX IR, the intermediate representation used by binary
analysis tools like Valgrind and angr. Our proposed embeddings encode both syntactic and
semantic information to represent a function, and is both application and architecture
independent. We also propose POV, a custom Peephole Optimization engine that
normalizes the VEX IR for effective similarity analysis. We design several optimizations like …
We propose VEXIR2Vec, a code embedding framework for finding similar functions in binaries. Our representations rely on VEX IR, the intermediate representation used by binary analysis tools like Valgrind and angr. Our proposed embeddings encode both syntactic and semantic information to represent a function, and is both application and architecture independent. We also propose POV, a custom Peephole Optimization engine that normalizes the VEX IR for effective similarity analysis. We design several optimizations like copy/constant propagation, constant folding, common subexpression elimination and load-store elimination in POV. We evaluate our framework on two experiments -- diffing and searching -- involving binaries targeting different architectures, compiled using different compilers and versions, optimization sequences, and obfuscations. We show results on several standard projects and on real-world vulnerabilities. Our results show that VEXIR2Vec achieves superior precision and recall values compared to the state-of-the-art works. Our framework is highly scalable and is built as a multi-threaded, parallel library by only using open-source tools. VEXIR2Vec achieves about speedup on the closest competitor, and orders-of-magnitude speedup on other tools.
arxiv.org