Abstract
As blockchain technology advances, the security of smart contracts has become increasingly crucial. However, most of smart contract vulnerability detection tools available on the market currently rely on artificial-predefined vulnerability rules, which result in suboptimal generalization ability and detection accuracy. Deep learning-based methods usually treat smart contracts as token sequences, which limit the utilization of structural information and the integration of artificial rules. To mitigate these issues, we propose a novel smart contract vulnerability detection method. First, we propose an approach for constructing contract graph to capture vital structural information, such as control- and data- flow. Then, we employ a Wide & Deep learning model to integrate the structural feature, sequencial feature, and artificial rules for smart contract vulnerability detection. Extensive experiments show that the proposed method performs exceptionally well in detecting four different types of vulnerabilities. The results demonstrate that integrating structural information and artificial rules can significantly improve the effectiveness of smart contract vulnerability detection.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Zheng, Z., Xie, S., Dai, H.N., Chen, X., Wang, H.: Blockchain challenges and opportunities: a survey. Int. J. Web Grid Serv. 14(4), 352–375 (2018)
Yuan, Z., Zhenguang, L., Peng, Q., Qi, L., Xiang, W., Qinming, H.: Smart contract vulnerability detection using graph neural networks. In: Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI (2020)
Tann, W.J.W., Han, X.J., Gupta, S.S., Ong, Y.S.: Towards safer smart contracts: a sequence learning approach to detecting security threats. arXiv: 1811.06632 (2018)
Liu, Z., Qian, P., Wang, X., Zhuang, Y., Qiu, L., Wang, X.: Combining graph neural networks with expert knowledge for smart contract vulnerability detection. IEEE Trans. Knowl. Data Eng. 35(2), 1296–1310 (2023)
Grishchenko, I., Maffei, M., Schneidewind, C.: A semantic framework for the security analysis of ethereum smart contracts. In: Bauer, L., Küsters, R. (eds.) POST 2018. LNCS, vol. 10804, pp. 243–269. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89722-6_10
Hildenbrandt, E., Saxena, M., Rodrigues, N., et al.: KEVM: a complete formal semantics of the ethereum virtual machine. In: Proceedings of the IEEE 31st Computer Security Foundations Symposium (CSF), pp. 204–217. IEEE (2018)
Amani, S., Bégel, M., Bortin, M., Staples, M.: Towards verifying ethereum smart contract bytecode in Isabelle/HOL. In: Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs, pp. 66–77 (2018 )
Luu, L., Chu, D.H., Olickel, H., Saxena, P., Hobor, A.: Making smart contracts smarter. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pp. 254–269 (2016)
Tsankov, P., Dan, A., Drachsler-Cohen, D., Gervais, A., Buenzli, F., Vechev, M.: Securify: practical security analysis of smart contracts. In: Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pp. 67–82 (2018)
Jiang, B., Liu, Y., Chan, W.K.: ContractFuzzer: fuzzing smart contracts for vulnerability detection. In: Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering, pp. 259–269 (2018)
Tian, G., Wang, Q., Zhao, Y., Guo, L., Sun, Z., Lv, L.: Smart contract classification with a Bi-LSTM based approach. IEEE Access 8, 43806–43816 (2020)
Allamanis, M., Brockschmidt, M., Khademi, M.: Learning to represent programs with graphs. In: International Conference on Learning Representations (2018)
Josselin, F., Grieco, G., Groce, A.: Slither: a static analysis framework for smart contracts. In: 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB). IEEE (2019)
Cheng, H.T., Koc, L., Harmsen, J., et al.: Wide & deep learning for recommender systems[J]. ACM (2016)
Feng, Z., et al.: CodeBERT: a pretrained model for programming and natural languages (2020)
Ruiz, L., Gama, F., Ribeiro, A.: Gated graph recurrent neural networks. IEEE Trans. Signal Process. 68, 6303–6318 (2020)
Acknowledgements
This work is supported by the National Natural Science Foundation of China (Grant Nos.62272132).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Wei, Z., Zheng, W., Su, X., Tao, W., Wang, T. (2023). A Graph Neural Network-Based Smart Contract Vulnerability Detection Method with Artificial Rule. In: Iliadis, L., Papaleonidas, A., Angelov, P., Jayne, C. (eds) Artificial Neural Networks and Machine Learning – ICANN 2023. ICANN 2023. Lecture Notes in Computer Science, vol 14257. Springer, Cham. https://doi.org/10.1007/978-3-031-44216-2_20
Download citation
DOI: https://doi.org/10.1007/978-3-031-44216-2_20
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-44215-5
Online ISBN: 978-3-031-44216-2
eBook Packages: Computer ScienceComputer Science (R0)