arrow
返回

Learning Approximate Execution Semantics From Traces for Binary Function Similarity

delete2023-04-01
delete13
PRE
AI
K
Kexin Pei *
Z
Zhou Xuan
J
Junfeng Yang
S
Suman Jana
B
Baishakhi Ray
DOI:10.1109/TSE.2022.3231621delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Detecting semantically similar binary functions - a crucial capability with broad security usages including vulnerability detection, malware analysis, and forensics - requires understanding function behaviors and intentions. This task is challenging as semantically similar functions can be compiled to run on different architectures and 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 approximate execution semantics explicitly from functions' traces collected via forced-execution (i.e., by violating the control flow semantics) and transfer the learned knowledge to match semantically similar functions. While it is known that forced-execution traces are too imprecise to be directly used to detect semantic similarity, our key insight is that these traces can instead be used to teach an ML model approximate execution semantics of diverse instructions and their compositions. We thus design a pretraining task, which trains the model to learn approximate execution semantics from the two modalities (i.e., forced-executed code and traces) of the function. We then finetune the pretrained model to match semantically similar functions. We evaluate Trex on 1,472,066 functions from 13 popular software projects, compiled to run on 4 architectures (x86, x64, ARM, and MIPS), and with 4 optimizations (O0-O3) and 5 obfuscations. Trex outperforms the state-of-the-art solutions by 7.8%, 7.2%, and 14.3% in cross-architecture, optimization, and obfuscation function matching, respectively, while running 8x faster. Ablation studies suggest that the pretraining significantly boosts the function matching performance, underscoring the importance of learning execution semantics. Our case studies demonstrate the practical use-cases of Trex - on 180 real-world firmware images, Trex uncovers 14 vulnerabilities not disclosed by previous studies. We release the code and dataset of Trex at https://github.com/CUMLSec/trex.
Keyword:
Semantics
Task analysis
Computer architecture
Optimization
Codes
Behavioral sciences
Computational modeling
Binary analysis
large language models
software security

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.9K
被引数:
1.1W

机构

C
Columbia University
学者数:
7.1W
论文数: 6.4W
被引数: 263
Purdue University System 封面图
Purdue University System
学者数:
4.0W
论文数: 3.6W
被引数: 66
引用论文

引用论文

Degenerating compartment and functioning compartment of motor neurons in ALS
err1983-05-01
err0
PREAI
errGen Sobue; Ko Sahashi; Akira Takahashi; Yukihiko Matsuoka; Tatsuo Muroga; Itsuro Sobue
err分享
err收藏
Exchange interactions in (FeT)90Zr10 (T = Mn, Ru) metallic glasses
err1997-12-01
err0
PREAI
errP.L. Paulose; S. Bhattacharya; V. Nagarajan; R. Nagarajan
err分享
err收藏
The Seattle Structural Genomics Center for Infectious Disease (SSGCID)
err2009-10-01
err0
errOAAI
errP. Myler; R. Stacy; L. Stewart; B. Staker; W. Van Voorhis; G. Varani; G. Buchko
err分享
err收藏
Modeling Functional Similarity in Source Code With Graph-Based Siamese Networks
err2022-10-01
err17
errOAAI
errMehrotra, Nikita; Agarwal, Navdha; Gupta, Piyush; Anand, Saket; Lo, David; Purandare, Rahul
err分享
err收藏
An autonomous in situ detection system for radioactivity measurements in the marine environment
err2008-10-01
err0
PREAI
errC. Tsabaris; C. Bagatelas; Th. Dakladas; C.T. Papadopoulos; R. Vlastou; G.T. Chronis
err分享
err收藏
Caveolin-1 and -2 regulate cell motility in castration-resistant prostate cancer
err2018-10-01
err0
errOAAI
errToyoharu Kamibeppu; Koji Yamasaki; Kozue Nakahara; Takahiro Nagai; Naoki Terada; Hiromasa Tsukino; Shoichiro Mukai; Toshiyuki Kamoto
err分享
err收藏
学者 查看更多内容