Smart contract vulnerability detection method based on pre-training and novel timing graph neural network
Papers|更新时间:2024-10-10
|
Smart contract vulnerability detection method based on pre-training and novel timing graph neural network
Journal on CommunicationsVol. 45, Issue 9, Pages: 101-114(2024)
作者机构:
1.哈尔滨工程大学计算机科学与技术学院,黑龙江 哈尔滨 150001
2.西安电子科技大学杭州研究院,浙江 杭州 311231
3.北京理工大学计算机学院,北京 100081
作者简介:
基金信息:
The National Natural Science Foundation of China(62202121);The National Key Research and Development Program of China(2022YFB4400703);The Fundamental Research Funds for the Central Universities(3072022TS0604)
ZHUANG Yuan,FAN Zekai,WANG Cheng,et al.Smart contract vulnerability detection method based on pre-training and novel timing graph neural network[J].Journal on Communications,2024,45(09):101-114.
To address the limitations of current deep learning-based methods in extracting contract bytecode features and representing vulnerability semantics
as well as the shortcomings of the traditional graph neural networks in learning temporal information from contract statements
a method for detecting vulnerabilities in contracts was proposed based on pre-trained and temporal graph neural network. Firstly
the pre-trained model was used to transform smart contract bytecode into a vulnerability semantics-aware contract graph structure. Then
combined with a self-attention mechanism
the event-driven temporal graph neural network was designed to extract temporal information during contract execution. Finally
focusing on reentrant vulnerabilities
timestamp dependency vulnerabilities
and Tx.origin authentication vulnerabilities
extensive experiments were conducted on a dataset of 120 932 actual contracts. The results show that the proposed method significantly outperforms existing approaches.
CHEN J F , WANG Z X , CAI S H , et al . Vulnerability detection method for blockchain smart contracts based on metamorphic testing [J ] . Journal on Communications , 2023 , 44 ( 10 ): 164 - 176 .
WU K D , MA Y , CAI H Q , et al . Consortium blockchain system based on smart contract-oriented sharding [J ] . Journal of Software , 2023 , 34 ( 11 ): 5042 - 5057 .
BADRUDDOJA S , DANTU R , HE Y Y , et al . Making smart contracts smarter [C ] // Proceedings of the 2021 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) . Piscataway : IEEE Press , 2021 : 1 - 3 .
FEIST J , GRIECO G , GROCE A . Slither: a static analysis framework for smart contracts [C ] // Proceedings of the 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB) . Piscataway : IEEE Press , 2019 : 8 - 15 .
JIANG B , LIU Y , CHAN W K . ContractFuzzer: fuzzing smart contracts for vulnerability detection [C ] // Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering . New York : ACM Press , 2018 : 259 - 269 .
WANG Y W , HOU Y D , FENG L Z . Honeypot contract detection method for Ethereum based on source code structure and graph attention network [J ] . Journal on Communications , 2023 , 44 ( 9 ): 161 - 172 .
MUELLER B , HONIG J , PARASARAM N , et al . Mythril-reversing and bug hunting framework for the Ethereum blockchain [R ] . 2017 .
TSANKOV P , DAN A , DRACHSLER-COHEN D , et al . Securify: practical security analysis of smart contracts [C ] // Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security . New York : ACM Press , 2018 : 67 - 82 .
KALRA S , GOEL S , DHAWAN M , et al . ZEUS: analyzing safety of smart contracts [C ] // Proceedings of the 2018 Network and Distributed System Security Symposium . Reston : Internet Society , 2018 : 26 - 35 .
MA F C , XU Z Y , REN M , et al . Pluto: exposing vulnerabilities in inter-contract scenarios [J ] . IEEE Transactions on Software Engineering , 2022 , 48 ( 11 ): 4380 - 4396 .
CAMINO R , TORRES C F , BADEN M , et al . A data science approach for detecting honeypots in ethereum [C ] // Proceedings of the 2020 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) . Piscataway : IEEE Press , 2020 : 1 - 9 .
ZHANG H X , WANG Q , WANG D Y , et al . Honeypot contract detection of blockchain based on deep learning [J ] . Journal on Communications , 2022 , 43 ( 1 ): 194 - 202 .
MI F , WANG Z Y , ZHAO C , et al . VSCL: automating vulnerability detection in smart contracts with deep learning [C ] // Proceedings of the 2021 IEEE International Conference on Blockchain and Cryptocurrency (ICBC) . Piscataway : IEEE Press , 2021 : 1 - 9 .
ZHANG L J , WANG J L , WANG W Z , et al . A novel smart contract vulnerability detection method based on information graph and ensemble learning [J ] . Sensors , 2022 , 22 ( 9 ): 3581 .
HUANG J J , HAN S M , YOU W , et al . Hunting vulnerable smart contracts via graph embedding based bytecode matching [J ] . IEEE Transactions on Information Forensics and Security , 2021 , 16 : 2144 - 2156 .
FAN Y Q , SHANG S Y , DING X . Smart contract vulnerability detection based on dual attention graph convolutional network [C ] // Proceedings of the International Conference on Collaborative Computing: Networking, Applications and Worksharing . Berlin : Springer , 2021 : 335 - 351 .
ANGELO M D , SALZER G . A survey of tools for analyzing ethereum smart contracts [C ] // Proceedings of the 2019 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPCON) . Piscataway : IEEE Press , 2019 : 69 - 78 .
DEVLIN J , CHANG M W , LEE K , et al . BERT: pre-training of deep bidirectional transformers for language understanding [J ] . arXiv Preprint , arXiv: 1810 . 04805 v 2 , 2018 .
ZENG Q R , HE J H , ZHAO G S , et al . EtherGIS: a vulnerability detection framework for ethereum smart contracts based on graph learning features [C ] // Proceedings of the 2022 IEEE 46th Annual Computers, Software, and Applications Conference (COMPSAC) . Piscataway : IEEE Press , 2022 : 1742 - 1749 .
ZHUANG Y , LIU Z G , QIAN P , et al . Smart contract vulnerability detection using graph neural network [C ] // Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence . California : International Joint Conferences on Artificial Intelligence Organization , 2020 : 3283 .