VEXIR2Vec:一种面向二进制相似性的架构无关嵌入框架
VEXIR2Vec: An Architecture-Neutral Embedding Framework for Binary Similarity
AI总结:
针对二进制相似性判定问题,提出基于架构无关中间表示VEX-IR的VexIR2Vec嵌入框架,通过窥孔归一化、知识图谱嵌入与孪生网络实现相似性评估,在多场景下性能显著优于基线,且具备高可扩展性与速度优势。
摘要:
二进制相似性研究旨在判定两个二进制程序是否具有相似功能,这类程序通常源自同一源代码。本文提出VexIR2Vec方法,该方法借助架构无关的中间表示(IR)VEX-IR实现二进制相似性分析。我们通过在控制流图上随机游走,提取被称为“窥孔(peepholes)”的基本块序列的嵌入向量。窥孔会通过受编译器优化启发的变换进行归一化处理,VEX-IR归一化引擎借助这些变换,缓解二进制文件中由架构和编译器带来的差异,同时凸显语义相似性。随后,我们采用无监督的知识图谱嵌入技术,在IR的实体层面学习表示词汇表,再利用该词汇表通过VexNet(一种前馈孪生网络)生成用于相似性评估的函数嵌入,VexNet的设计目标是让相似函数在n维空间中位置接近,不相似的函数相互分离。该方法同时适用于差异比对和搜索任务,对词汇表外(OOV)问题具备鲁棒性。\n我们在包含270万个函数、1.55万个二进制文件的数据集上评估VexIR2Vec,这些样本来自7个项目,经12种编译器编译,目标架构为x86和ARM。在差异比对实验中,VexIR2Vec在跨优化、跨编译、跨架构和混淆设置下,分别比性能最接近的基线高出40%、18%、21%和60%。在搜索实验中,VexIR2Vec的平均精度均值达到0.76,比最接近的基线高出46%。我们的框架具备高可扩展性,仅使用开源工具构建为轻量级多线程并行库,速度比性能最接近的基线快3.1到3.5倍,比其他工具快数个数量级。
英文摘要:
Binary similarity involves determining whether two binary programs exhibit similar functionality, often originating from the same source code. In this work, we propose VexIR2Vec, an approach for binary similarity using VEX-IR, an architecture-neutral Intermediate Representation (IR). We extract the embeddings from sequences of basic blocks, termed peepholes, derived by random walks on the control-flow graph. The peepholes are normalized using transformations inspired by compiler optimizations. The VEX-IR Normalization Engine mitigates, with these transformations, the architectural and compiler-induced variations in binaries while exposing semantic similarities. We then learn the vocabulary of representations at the entity level of the IR using the knowledge graph embedding techniques in an unsupervised manner. This vocabulary is used to derive function embeddings for similarity assessment using VexNet, a feed-forward Siamese network designed to position similar functions closely and separate dissimilar ones in an n-dimensional space. This approach is amenable for both diffing and searching tasks, ensuring robustness against Out-Of-Vocabulary (OOV) issues. We evaluate VexIR2Vec on a dataset comprising 2.7M functions and 15.5K binaries from 7 projects compiled across 12 compilers targeting x86 and ARM architectures. In diffing experiments, VexIR2Vec outperforms the nearest baselines by $40\%$, $18\%$, $21\%$, and $60\%$ in cross-optimization, cross-compilation, cross-architecture, and obfuscation settings, respectively. In the searching experiment, VexIR2Vec achieves a mean average precision of $0.76$, outperforming the nearest baseline by $46\%$. Our framework is highly scalable and is built as a lightweight, multi-threaded, parallel library using only open-source tools. VexIR2Vec is $3.1$-$3.5 \times$ faster than the closest baselines and orders-of-magnitude faster than other tools.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。