论文标题
TREX:从微轨迹学习执行语义的二进制相似性
Trex: Learning Execution Semantics from Micro-Traces for Binary Similarity
论文作者
论文摘要
检测语义上相似的功能 - 具有广泛的现实世界安全用法在内的关键分析能力,包括漏洞检测,恶意软件谱系和取证 - 需要理解功能行为和意图。此任务具有挑战性,因为可以不同的是在不同的体系结构上运行的语义相似功能,并以各种编译器的优化或混淆进行编译。大多数现有方法匹配基于句法特征的功能,而无需了解功能的执行语义。 我们提出了TREX,这是一种基于转移学习的框架,以从功能的微观轨迹中明确自动化学习执行语义,并将学习知识传输以匹配语义上相似的功能。我们的关键见解是,这些迹线可用于教授ML模型的执行语义不同指令序列。因此,我们在没有任何手动标记的工作的情况下训练模型从功能的微轨迹中学习执行语义。然后,我们开发了一种新型的神经结构,以从微观轨迹学习执行语义,并对验证的模型进行了匹配的语义相似函数。 我们从13个受欢迎的软件项目中评估了1,472,066个功能二进制功能二进制文件的Trex。这些功能来自不同的体系结构,并通过各种优化和混淆进行编译。 TREX在跨架构,优化和混淆函数的匹配中,最新系统的表现分别匹配了7.8%,7.2%和14.3%。消融研究表明,预处理显着提高了功能匹配性能,从而强调了学习执行语义的重要性。
Detecting semantically similar functions -- a crucial analysis capability with broad real-world security usages including vulnerability detection, malware lineage, and forensics -- requires understanding function behaviors and intentions. This task is challenging as semantically similar functions can be implemented differently, run on different architectures, and compiled with diverse compiler optimizations or obfuscations. Most existing approaches match functions based on syntactic features without understanding the functions' execution semantics. We present Trex, a transfer-learning-based framework, to automate learning execution semantics explicitly from functions' micro-traces and transfer the learned knowledge to match semantically similar functions. Our key insight is that these traces can be used to teach an ML model the execution semantics of different sequences of instructions. We thus train the model to learn execution semantics from the functions' micro-traces, without any manual labeling effort. We then develop a novel neural architecture to learn execution semantics from micro-traces, and we finetune the pretrained model to match semantically similar functions. We evaluate Trex on 1,472,066 function binaries from 13 popular software projects. These functions are from different architectures and compiled with various optimizations and obfuscations. Trex outperforms the state-of-the-art systems by 7.8%, 7.2%, and 14.3% in cross-architecture, optimization, and obfuscation function matching, respectively. Ablation studies show that the pretraining significantly boosts the function matching performance, underscoring the importance of learning execution semantics.