Litcius/Paper detail

Codeformer: A GNN-Nested Transformer Model for Binary Code Similarity Detection

Guangming Liu, Xin Zhou, Jianmin Pang, Yue Feng, Wenfu Liu, Junchao Wang

2023Electronics16 citationsDOIOpen Access PDF

Abstract

Binary code similarity detection is used to calculate the code similarity of a pair of binary functions or files, through a certain calculation method and judgment method. It is a fundamental task in the field of computer binary security. Traditional methods of similarity detection usually use graph matching algorithms, but these methods have poor performance and unsatisfactory effects. Recently, graph neural networks have become an effective method for analyzing graph embeddings in natural language processing. Although these methods are effective, the existing methods still do not sufficiently learn the information of the binary code. To solve this problem, we propose Codeformer, an iterative model of a graph neural network (GNN)-nested Transformer. The model uses a Transformer to obtain an embedding vector of the basic block and uses the GNN to update the embedding vector of each basic block of the control flow graph (CFG). Codeformer iteratively executes basic block embedding to learn abundant global information and finally uses the GNN to aggregate all the basic blocks of a function. We conducted experiments on the OpenSSL, Clamav and Curl datasets. The evaluation results show that our method outperforms the state-of-the-art models.

Topics & Concepts

Computer scienceGraph embeddingTransformerBinary numberEmbeddingTheoretical computer scienceBinary codeGraphAlgorithmArtificial intelligencePattern recognition (psychology)MathematicsQuantum mechanicsPhysicsVoltageArithmeticSoftware Engineering ResearchAdvanced Malware Detection TechniquesSoftware System Performance and Reliability