Binary function similarity detection plays an important role in a wide range of security applications. Existing works usually assume that the query function and target function share equal semantics and compare their full semantics to obtain the similarity. However, we find that the function mapping is more complex, especially when function inlining happens.
In this paper, we will systematically investigate cross-inlining binary function similarity detection. We first construct a cross-inlining dataset by compiling 51 projects using 9 compilers, with 4 optimizations, to 6 architectures, with 2 inlining flags, which results in two datasets both with 216 combinations. Then we construct the cross-inlining function mappings by linking the common source functions in these two datasets. Through analysis of this dataset, we find that three cross-inlining patterns widely exist while existing work suffers when detecting cross-inlining binary function similarity. Next, we propose a pattern-based model named CI-Detector for cross-inlining matching. CI-Detector uses the attributed CFG to represent the semantics of binary functions and GNN to embed binary functions into vectors. CI-Detector respectively trains a model for these three cross-inlining patterns. Finally, the testing pairs are input to these three models and all the produced similarities are aggregated to produce the final similarity. We conduct several experiments to evaluate CI-Detector. Results show that CI-Detector can detect cross-inlining pairs with a precision of 81% and a recall of 97%, which exceeds all state-of-the-art works.
Comparing One with Many -- Solving Binary2source Function Matching Under Function Inlining
Binary2source function matching is a fundamental task for many security applications, including Software Component Analysis (SCA). The "1-to-1" mechanism has been applied in existing binary2source matching works, in which one binary function is matched against one source function. However, we discovered that such mapping could be "1-to-n" (one query binary function maps multiple source functions), due to the existence of function inlining. To help conduct binary2source function matching under function inlining, we propose a method named O2NMatcher to generate Source Function Sets (SFSs) as the…
Towards an Oracle for Binary Decomposition Under Compilation Variance
School of Software, Dalian University of Technology(大连理工大学软件学院);MOE Key Laboratory of Intelligent Networks and Network Security, Xi'an Jiaotong University(西安交通大学智能网络与网络安全教育部重点实验室)
A Large Scale Study of AI-based Binary Function Similarity Detection Techniques for Security Researchers and Practitioners
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络安全学院);University of New South Wales(新南威尔士大学);Imperial College London(帝国理工学院);Nanyang Technological University(南洋理工大学)
Understanding Binary Code Similarity for Real-World Vulnerability Detection: A Large-Scale Empirical Study
Institute of Information Engineering, CAS(中国科学院信息工程研究所);University of Chinese Academy of Sciences(中国科学院大学);Hangzhou Dianzi University(杭州电子科技大学);Shandong University(山东大学)
Decompile-Bench: Million-Scale Binary-Source Function Pairs for Real-World Binary Decompilation
Research Institute of Trustworthy Autonomous Systems, Southern University of Science and Technology(南方科技大学可信自主系统研究院);Department of Computing, The Hong Kong Polytechnic University, Research Centre for Data Science & Artificial Intelligence(香港理工大学计算学系数据科学与人工智能研究中心)
Trex: Learning Execution Semantics from Micro-Traces for Binary Similarity
Columbia University(哥伦比亚大学);University of California, Riverside(加州大学河滨分校)
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 fr…
kTrans: Knowledge-Aware Transformer for Binary Code Embedding
Tsinghua University(清华大学);Beijing University of Technology(北京工业大学);Huazhong University of Science and Technology(华中科技大学);Information Engineering University(信息工程大学)
SimCLF: A Simple Contrastive Learning Framework for Function-level Binary Embeddings
Army Engineering University of PLA(中国人民解放军陆军工程大学);National Computer Network and Information Security Management Center(国家计算机网络与信息安全管理中心);Shanghai Jiao Tong University(上海交通大学);University Of Science & Technology Beijing(北京科技大学)