Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection

Authors

  • Zeping Yu Tencent Security Keen Lab
  • Rui Cao Tencent Security Keen Lab
  • Qiyi Tang Tencent Security Keen Lab
  • Sen Nie Tencent Security Keen Lab
  • Junzhou Huang Tencent AI Lab
  • Shi Wu Tencent Security Keen Lab

DOI:

https://doi.org/10.1609/aaai.v34i01.5466

Abstract

Binary code similarity detection, whose goal is to detect similar binary functions without having access to the source code, is an essential task in computer security. Traditional methods usually use graph matching algorithms, which are slow and inaccurate. Recently, neural network-based approaches have made great achievements. A binary function is first represented as an control-flow graph (CFG) with manually selected block features, and then graph neural network (GNN) is adopted to compute the graph embedding. While these methods are effective and efficient, they could not capture enough semantic information of the binary code. In this paper we propose semantic-aware neural networks to extract the semantic information of the binary code. Specially, we use BERT to pre-train the binary code on one token-level task, one block-level task, and two graph-level tasks. Moreover, we find that the order of the CFG's nodes is important for graph similarity detection, so we adopt convolutional neural network (CNN) on adjacency matrices to extract the order information. We conduct experiments on two tasks with four datasets. The results demonstrate that our method outperforms the state-of-art models.

Downloads

Published

2020-04-03

How to Cite

Yu, Z., Cao, R., Tang, Q., Nie, S., Huang, J., & Wu, S. (2020). Order Matters: Semantic-Aware Neural Networks for Binary Code Similarity Detection. Proceedings of the AAAI Conference on Artificial Intelligence, 34(01), 1145-1152. https://doi.org/10.1609/aaai.v34i01.5466

Issue

Section

AAAI Technical Track: Applications