HGAT: smart contract vulnerability detection method based on hierarchical graph attention network

被引:11
作者
Ma, Chuang [1 ]
Liu, Shuaiwu [1 ]
Xu, Guangxia [2 ]
机构
[1] Chongqing Univ Posts & Telecommun, Sch Software Engn, Chongqing 400065, Peoples R China
[2] Guangzhou Univ, Adv Inst Cyberspace Technol, Guangzhou 510006, Peoples R China
来源
JOURNAL OF CLOUD COMPUTING-ADVANCES SYSTEMS AND APPLICATIONS | 2023年 / 12卷 / 01期
基金
中国国家自然科学基金;
关键词
Smart Contract; BlockChain; Graph Attention Network; Vulnerability Detection; Security;
D O I
10.1186/s13677-023-00459-x
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
With the widespread use of blockchain, more and more smart contracts are being deployed, and their internal logic is getting more and more sophisticated. Due to the large false positive rate and low detection accuracy of most current detection methods, which heavily rely on already established detection criteria, certain smart contracts additionally call for human secondary detection, resulting in low detection efficiency. In this study, we propose HGAT, a hierarchical graph attention network-based detection model, in order to address the aforementioned issues as well as the shortcomings of current smart contract vulnerability detection approaches. First, using Abstract Syntax Tree (AST) and Control Flow Graph, the functions in the smart contract are abstracted into code graphs (CFG). Then abstract each node in the code subgraph, extract the node features, utilize the graph attention mechanism GAT, splice the obtained vectors to form the features of each line of statements and use these features to detect smart contracts. To create test data and assess HGAT, we leverage the open-source smart contract vulnerability sample dataset. The findings of the experiment indicate that this method can identify smart contract vulnerabilities more quickly and precisely than other detection techniques.
引用
收藏
页数:13
相关论文
共 35 条
[1]  
Amani S, 2018, PROCEEDINGS OF THE 7TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON CERTIFIED PROGRAMS AND PROOFS, CPP 2018, P66, DOI 10.1145/3167084
[2]   Formal Verification of Smart Contracts Short Paper [J].
Bhargavan, Karthikeyan ;
Delignat-Lavaud, Antoine ;
Fournet, Cedric ;
Gollamudi, Anitha ;
Gonthier, Georges ;
Kobeissi, Nadim ;
Kulatova, Natalia ;
Rastogi, Aseem ;
Sibut-Pinote, Thomas ;
Swamy, Nikhil ;
Zanella-Beguelin, Santiago .
PROCEEDINGS OF THE 2016 ACM WORKSHOP ON PROGRAMMING LANGUAGES AND ANALYSIS FOR SECURITY (PLAS'16), 2016, :91-96
[3]   A survey of automated techniques for formal software verification [J].
D'Silva, Vijay ;
Kroening, Daniel ;
Weissenbacher, Georg .
IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 2008, 27 (07) :1165-1178
[4]  
Denton E, 2014, ADV NEUR IN, V27
[5]   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
[6]   Security Vulnerabilities in Ethereum Smart Contracts [J].
Dika, Ardit ;
Nowostawski, Mariusz .
IEEE 2018 INTERNATIONAL CONGRESS ON CYBERMATICS / 2018 IEEE CONFERENCES ON INTERNET OF THINGS, GREEN COMPUTING AND COMMUNICATIONS, CYBER, PHYSICAL AND SOCIAL COMPUTING, SMART DATA, BLOCKCHAIN, COMPUTER AND INFORMATION TECHNOLOGY, 2018, :955-962
[7]   Resource Pricing and Allocation in MEC Enabled Blockchain Systems: An A3C Deep Reinforcement Learning Approach [J].
Du, Jianbo ;
Cheng, Wenjie ;
Lu, Guangyue ;
Cao, Haotong ;
Chu, Xiaoli ;
Zhang, Zhicai ;
Wang, Junxuan .
IEEE TRANSACTIONS ON NETWORK SCIENCE AND ENGINEERING, 2022, 9 (01) :33-44
[8]   Min-Max Cost Optimization for Efficient Hierarchical Federated Learning in Wireless Edge Networks [J].
Feng, Jie ;
Liu, Lei ;
Pei, Qingqi ;
Li, Keqin .
IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 2022, 33 (11) :2687-2700
[9]   Heterogeneous Computation and Resource Allocation for Wireless Powered Federated Edge Learning Systems [J].
Feng, Jie ;
Zhang, Wenjing ;
Pei, Qingqi ;
Wu, Jinsong ;
Lin, Xiaodong .
IEEE TRANSACTIONS ON COMMUNICATIONS, 2022, 70 (05) :3220-3233
[10]   SmartBugs: A Framework to Analyze Solidity Smart Contracts [J].
Ferreira, Joao F. ;
Cruz, Pedro ;
Durieux, Thomas ;
Abreu, Rui .
2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, :1349-1352