DA-GNN: A smart contract vulnerability detection method based on Dual Attention Graph Neural Network

被引:19
作者
Zhen, Zixian [1 ]
Zhao, Xiangfu [1 ]
Zhang, Jinkai [1 ]
Wang, Yichen [1 ]
Chen, Haiyue [1 ]
机构
[1] Yantai Univ, Sch Comp & Control Engn, Yantai, Peoples R China
关键词
Smart contract; Vulnerability detection; Graph neural networks; Attention mechanisms; Opcodes;
D O I
10.1016/j.comnet.2024.110238
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
A smart contract is an automated computer program based on blockchain technology. In recent years, the security incidents of smart contracts have caused serious economic losses. However, existing smart contract vulnerability detection methods rely on fixed expert rules, resulting in reduced detection accuracy and scalability. Therefore, addressing the issues of low accuracy in traditional smart contract vulnerability detection methods and the insufficient feature extraction in neural network -based approaches for smart contracts, this paper introduces an intelligent contract vulnerability identification method, Dual Attention Graph Neural Network (DA-GNN). Firstly, DA-GNN transforms the operation code sequence of nodes in the smart contract Control Flow Graph (CFG) into a feature matrix of semantic features and relationships between nodes based on the five types of instructions we propose. Secondly, our proposed dual attention mechanism introduces node semantic features and relationship features between nodes into the GAT to achieve node embedding updates. The updated graph node information is fused through self -attention mechanism to obtain the graph features. Then, the classification and prediction of vulnerabilities are achieved through the classification module. Finally, we evaluated our method on 17,670 real smart contracts. The experimental results show that the precision in detecting integer overflow vulnerabilities, self-destruct vulnerabilities, and transaction sequence dependency vulnerabilities reaches 72.17%, 67.03%, and 73.66%, respectively.
引用
收藏
页数:11
相关论文
共 40 条
[1]   ETHIR: A Framework for High-Level Analysis of Ethereum Bytecode [J].
Albert, Elvira ;
Gordillo, Pablo ;
Livshits, Benjamin ;
Rubio, Albert ;
Sergey, Ilya .
AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS (ATVA 2018), 2018, 11138 :513-520
[2]  
[Anonymous], 2017, Santiago Palladino2017
[3]  
Brent L, 2018, Arxiv, DOI arXiv:1809.03981
[4]  
Buterin V., 2014, Ethereum white paper, V3, P2
[5]  
Dey R, 2017, MIDWEST SYMP CIRCUIT, P1597, DOI 10.1109/MWSCAS.2017.8053243
[6]   A Survey of Tools for Analyzing Ethereum Smart Contracts [J].
di Angelo, Monika ;
Salzer, Gernot .
2019 IEEE INTERNATIONAL CONFERENCE ON DECENTRALIZED APPLICATIONS AND INFRASTRUCTURES (DAPPCON), 2019, :69-78
[7]   Slither: A Static Analysis Framework For Smart Contracts [J].
Feist, Josselin ;
Greico, Gustavo ;
Groce, Alex .
2019 IEEE/ACM 2ND INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB 2019), 2019, :8-15
[8]   Addressing the DAO Insider Attack in RPL's Internet of Things Networks [J].
Ghaleb, Baraq ;
Al-Dubai, Ahmed ;
Ekonomou, Elias ;
Qasem, Mamoun ;
Romdhani, Imed ;
Mackenzie, Lewis .
IEEE COMMUNICATIONS LETTERS, 2019, 23 (01) :68-71
[9]   MadMax: Surviving Out-of-Gas Conditions in Ethereum Smart Contracts [J].
Grech, Neville ;
Kong, Michael ;
Jurisevic, Anton ;
Brent, Lexi ;
Scholz, Bernhard ;
Smaragdakis, Yannis .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2 (OOPSLA)
[10]   The SeaHorn Verification Framework [J].
Gurfinkel, Arie ;
Kahsai, Temesghen ;
Komuravelli, Anvesh ;
Navas, Jorge A. .
COMPUTER AIDED VERIFICATION, PT I, 2015, 9206 :343-361