Binary code similarity detection (BCSD) is fundamental to various applications, including firmware vulnerability search, code clone detection, and malware code segment identification. Many deep learning models have been proposed to learn code semantics from graph structures. However, most existing methods struggle to capture long-range dependencies in binary code represented by tree structures. To address this issue, this paper proposes Lanstree, a cross-architecture binary code similarity detection framework based on a bidirectional Tree-Transformer. Lanstree performs bottom-up and top-down semantic learning on abstract syntax trees (ASTs), enabling each node to fully aggregate features from its parent and child nodes. It employs a global attention mechanism to obtain a comprehensive representation of the AST and adopts a Siamese architecture to enhance binary code similarity detection performance. We have implemented a prototype of Lanstree, and experimental results demonstrate that Lanstree outperforms previous state-of-the-art BCSD methods.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Lanstree: Cross-Architecture Binary Code Similarity Detection with a Bidirectional Tree-Structured Embedding Model

  • Congyu Cao,
  • Xiaohan Wang,
  • Shunda Pan,
  • Guohang Shen,
  • Haipeng Qu

摘要

Binary code similarity detection (BCSD) is fundamental to various applications, including firmware vulnerability search, code clone detection, and malware code segment identification. Many deep learning models have been proposed to learn code semantics from graph structures. However, most existing methods struggle to capture long-range dependencies in binary code represented by tree structures. To address this issue, this paper proposes Lanstree, a cross-architecture binary code similarity detection framework based on a bidirectional Tree-Transformer. Lanstree performs bottom-up and top-down semantic learning on abstract syntax trees (ASTs), enabling each node to fully aggregate features from its parent and child nodes. It employs a global attention mechanism to obtain a comprehensive representation of the AST and adopts a Siamese architecture to enhance binary code similarity detection performance. We have implemented a prototype of Lanstree, and experimental results demonstrate that Lanstree outperforms previous state-of-the-art BCSD methods.