Deep Learning-Based Program-Wide Binary Code Similarity for Smart Contracts

被引:0
|
作者
Zhuang, Yuan [1 ]
Wang, Baobao [1 ]
Sun, Jianguo [2 ]
Liu, Haoyang [1 ]
Yang, Shuqi [1 ]
Ma, Qingan [3 ]
机构
[1] Harbin Engn Univ, Harbin 150000, Peoples R China
[2] Univ Sanya, Sanya 572000, Peoples R China
[3] Univ Alberta, Edmonton, AB T5J 4P6, Canada
来源
CMC-COMPUTERS MATERIALS & CONTINUA | 2023年 / 74卷 / 01期
关键词
Smart contract; similarity detection; neural network;
D O I
10.32604/cmc.2023.028058
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Recently, security issues of smart contracts are arising great atten-tion due to the enormous financial loss caused by vulnerability attacks. There is an increasing need to detect similar codes for hunting vulnerability with the increase of critical security issues in smart contracts. Binary similarity detection that quantitatively measures the given code diffing has been widely adopted to facilitate critical security analysis. However, due to the difference between common programs and smart contract, such as diversity of bytecode generation and highly code homogeneity, directly adopting existing graph matching and machine learning based techniques to smart contracts suffers from low accuracy, poor scalability and the limitation of binary similarity on function level. Therefore, this paper investigates graph neural network to detect smart contract binary code similarity at the program level, where we conduct instruction-level normalization to reduce the noise code for smart contract pre-processing and construct contract control flow graphs to represent smart contracts. In particular, two improved Graph Convolutional Network (GCN) and Message Passing Neural Network (MPNN) models are explored to encode the contract graphs into quantitatively vectors, which can capture the semantic information and the program-wide control flow information with temporal orders. Then we can efficiently accomplish the similarity detection by measuring the distance between two targeted contract embeddings. To evaluate the effectiveness and efficient of our proposed method, extensive experiments are performed on two real-world datasets, i.e., smart contracts from Ethereum and Enterprise Operation System (EOS) blockchain-based platforms. The results show that our proposed approach outperforms three state-of-the-art methods by a large margin, achieving a great improvement up to 6.1% and 17.06% in accuracy.
引用
收藏
页码:1011 / 1024
页数:14
相关论文
共 50 条
  • [1] DEEPBINDIFF: Learning Program-Wide Code Representations for Binary Diffing
    Duan, Yue
    Li, Xuezixiang
    Wang, Jinghan
    Yin, Heng
    27TH ANNUAL NETWORK AND DISTRIBUTED SYSTEM SECURITY SYMPOSIUM (NDSS 2020), 2020,
  • [2] A Review of Deep Learning-Based Binary Code Similarity Analysis
    Du, Jiang
    Wei, Qiang
    Wang, Yisen
    Sun, Xiangjie
    ELECTRONICS, 2023, 12 (22)
  • [3] Deep learning-based methodology for vulnerability detection in smart contracts
    Wang, Zhibo
    Guoming, Liu
    Xu, Hongzhen
    You, Shengyu
    Ma, Han
    Wang, Hongling
    PEERJ COMPUTER SCIENCE, 2024, 10
  • [4] Asteria: Deep Learning-based AST-Encoding for Cross-platform Binary Code Similarity Detection
    Yang, Shouguo
    Cheng, Long
    Zeng, Yicheng
    Lang, Zhe
    Zhu, Hongsong
    Shi, Zhiqiang
    51ST ANNUAL IEEE/IFIP INTERNATIONAL CONFERENCE ON DEPENDABLE SYSTEMS AND NETWORKS (DSN 2021), 2021, : 224 - 236
  • [5] Asteria-Pro: Enhancing Deep Learning-based Binary Code Similarity Detection by Incorporating Domain Knowledge
    Yang, Shouguo
    Dong, Chaopeng
    Xiao, Yang
    Cheng, Yiran
    Shi, Zhiqiang
    Li, Zhi
    Sun, Limin
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (01)
  • [6] A Review of Deep Learning-Based Vulnerability Detection Tools for Ethernet Smart Contracts
    Wu, Huaiguang
    Peng, Yibo
    He, Yaqiong
    Fan, Jinlin
    CMES-COMPUTER MODELING IN ENGINEERING & SCIENCES, 2024, 140 (01): : 77 - 108
  • [7] BinDeep: A deep learning approach to binary code similarity detection
    Tian, Donghai
    Jia, Xiaoqi
    Ma, Rui
    Liu, Shuke
    Liu, Wenjing
    Hu, Changzhen
    EXPERT SYSTEMS WITH APPLICATIONS, 2021, 168
  • [8] Empowering competence: A program-wide active learning framework for a pharmacy program
    Al-Taweel, Dalal
    Moreau, Pierre
    Koshy, Samuel
    Khedr, Mohammed A.
    Nafee, Noha
    Al-Romaiyan, Altaf
    Bayoud, Tania
    Alghanem, Sarah S.
    Al-Awadhi, Fatma H.
    Al-Haqan, Asmaa
    Al-Owayesh, Maryam S.
    AMERICAN JOURNAL OF PHARMACEUTICAL EDUCATION, 2024, 88 (10)
  • [9] Deep Learning-based Polar Code Design
    Ebada, Moustafa
    Cammerer, Sebastian
    Elkelesh, Ahmed
    ten Brink, Stephan
    2019 57TH ANNUAL ALLERTON CONFERENCE ON COMMUNICATION, CONTROL, AND COMPUTING (ALLERTON), 2019, : 177 - 183
  • [10] Guiding Code Optimizations with Deep Learning-Based Code Matching
    Meng, Kewen
    Norris, Boyana
    LANGUAGES AND COMPILERS FOR PARALLEL COMPUTING, LCPC 2020, 2022, 13149 : 20 - 28