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 条
[21]   Reconfigurable Intelligent Surface-Assisted Secure Mobile Edge Computing Networks [J].
Mao, Sun ;
Liu, Lei ;
Zhang, Ning ;
Dong, Mianxiong ;
Zhao, Jun ;
Wu, Jinsong ;
Leung, Victor C. M. .
IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, 2022, 71 (06) :6647-6660
[22]  
Mueller B, 2018, CONSENSYS MYTHRIL
[23]   Blockchain-Supported Smart City Platform for Social Value Co-Creation and Exchange [J].
Scekic, Ognjen ;
Nastic, Stefan ;
Dustdar, Schahram .
IEEE INTERNET COMPUTING, 2019, 23 (01) :19-28
[24]   SmartCheck: Static Analysis of Ethereum Smart Contracts [J].
Tikhomirov, Sergei ;
Voskresenskaya, Ekaterina ;
Ivanitskiy, Ivan ;
Takhaviev, Ramil ;
Marchenko, Evgeny ;
Alexandrov, Yaroslav .
2018 IEEE/ACM 1ST INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB), 2018, :9-16
[25]  
Tsankov P, 2018, Arxiv, DOI arXiv:1806.01143
[26]  
Veličkovic P, 2018, Arxiv, DOI [arXiv:1710.10903, DOI 10.48550/ARXIV.1710.10903]
[27]   ContractWard: Automated Vulnerability Detection Models for Ethereum Smart Contracts [J].
Wang, Wei ;
Song, Jingjing ;
Xu, Guangquan ;
Li, Yidong ;
Wang, Hao ;
Su, Chunhua .
IEEE TRANSACTIONS ON NETWORK SCIENCE AND ENGINEERING, 2021, 8 (02) :1133-1144
[28]   ContractGuard: Defend Ethereum Smart Contracts with Embedded Intrusion Detection [J].
Wang, Xinming ;
He, Jiahao ;
Xie, Zhijian ;
Zhao, Gansen ;
Cheung, Shing-Chi .
IEEE TRANSACTIONS ON SERVICES COMPUTING, 2020, 13 (02) :314-328
[29]  
Wood G, 2014, Ethereum Project Yellow Paper
[30]   A new scheme of vulnerability analysis in smart contract with machine learning [J].
Xing, Cipai ;
Chen, Zhuorong ;
Chen, Lexin ;
Guo, Xiaojie ;
Zheng, Zibin ;
Li, Jin .
WIRELESS NETWORKS, 2024, 30 (07) :6325-6334