[go: up one dir, main page]

Skip to main content

A Graph Neural Network-Based Smart Contract Vulnerability Detection Method with Artificial Rule

  • Conference paper
  • First Online:
Artificial Neural Networks and Machine Learning – ICANN 2023 (ICANN 2023)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. 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)

    Article  Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

  4. 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)

    Google Scholar 

  5. 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

    Chapter  Google Scholar 

  6. 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)

    Google Scholar 

  7. 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 )

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Article  Google Scholar 

  12. Allamanis, M., Brockschmidt, M., Khademi, M.: Learning to represent programs with graphs. In: International Conference on Learning Representations (2018)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. Cheng, H.T., Koc, L., Harmsen, J., et al.: Wide & deep learning for recommender systems[J]. ACM (2016)

    Google Scholar 

  15. Feng, Z., et al.: CodeBERT: a pretrained model for programming and natural languages (2020)

    Google Scholar 

  16. Ruiz, L., Gama, F., Ribeiro, A.: Gated graph recurrent neural networks. IEEE Trans. Signal Process. 68, 6303–6318 (2020)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This work is supported by the National Natural Science Foundation of China (Grant Nos.62272132).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiaohong Su .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics