Abstract
With smart contracts rapidly proliferating, the efficiency of existing detection methods is inadequate. Detecting loopholes in contracts is a critical concern, and in this article, we present a fragmented, symbolic representation of smart contracts aimed to capture vital vulnerability semantic information and control flow correlation. Furthermore, for in-depth analysis of vulnerabilities in extensive code fragments, we refine the conventional attention mechanism to balance attention weights based on code semantics and context-specific features. We also integrate the text classification model TextRNN with the improved attention mechanism (LinkAttention) to precisely identify reentrancy vulnerabilities. Our experimental studies conducted on diverse real-world smart contracts suggest that our method outperforms existing vulnerability detection tools.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Qiu, M., Guo, M., et al.: Loop scheduling and bank type assignment for heterogeneous multi-bank memory. JPDC 69(6), 546–558 (2009)
Huang, H., Chaturvedi, V., et al.: Throughput maximization for periodic real-time systems under the maximal temperature constraint. ACM TECS 13(2s), 1–22 (2014)
Qiu, M., Dai, W., Vasilakos, A.: Loop parallelism maximization for multimedia data processing in mobile vehicular clouds. IEEE Trans. Cloud Comput. 7(1), 250–258 (2016)
Zhang, Y., Qiu, M., et al.: Health-CPS: healthcare cyber-physical system assisted by cloud and big data. IEEE Syst. J. 11(1), 88–95 (2015)
Song, Y., Li, Y., et al.: Retraining strategy-based domain adaption network for intelligent fault diagnosis. IEEE TII 16(9), 6163–6171 (2019)
Qiu, M., Zhang, K., Huang, M.: Usability in mobile interface browsing. Web Intell. Agent Syst. Int. J. 4(1), 43–59 (2006)
Zeng, Y., Pan, M., et al.: Narcissus: a practical clean-label backdoor attack with limited information. In: ACM CCS (2023)
Li, C., Qiu, M.: Reinforcement Learning for Cyber-Physical Systems: With Cybersecurity Case Studies. CRC Press, Boca Raton (2019)
Gai, K., Wu, Y., et al.: Privacy-preserving energy trading using consortium blockchain in smart grid. IEEE TII 15(6), 3548–3558 (2019)
Tang, Y., Yu, J., et al.: Context-I2W: mapping images to context-dependent words for accurate zero-shot composed image retrieval. In: AAAI, vol. 38, no. 6, pp. 5180–5188 (2024)
Gai, K., Guo, J., Zhu, L., Yu, S.: Blockchain meets cloud computing: a survey. IEEE Commun. Surv. Tutor. 22(3), 2009–2030 (2020)
Gai, K., Zhang, Y., et al.: Blockchain-enabled service optimizations in supply chain digital twin. IEEE Trans. Serv. Comput. 16(3), 1673–1685 (2022)
Zhang, Y., Gai, K., et al.: Blockchain-empowered efficient data sharing in internet of things settings. IEEE J. Sel. Areas Commun. 40(12), 3422–3436 (2022)
Miao, Y., Gai, K., et al.: Blockchain-based shared data integrity auditing and deduplication. IEEE Trans. Dependable Secure Comput. (2023)
Wang, S., Ouyang, L., Yuan, Y., et al.: Blockchain-enabled smart contracts: architecture, applications, and future trends. IEEE Trans. Syst. Man Cybern. Syst. 49(11), 2266–2277 (2019)
Vaswani, A., Shazeer, N., Parmar, N., et al.: Attention is all you need. In: Advances in Neural Information Processing Systems, vol. 30 (2017)
Durieux, T., Ferreira, J.F., Abreu, R., et al.: Empirical review of automated analysis tools on 47,587 ethereum smart contracts. In: ACM/IEEE 42nd Conference on Software Engineering, pp. 530–541 (2020)
Qian, P., Liu, Z., He, Q., et al.: Towards automated reentrancy detection for smart contracts based on sequential models. IEEE Access 8, 19685–19695 (2020)
Luu, L., Chu, D.H., Olickel, H., et al.: Making smart contracts smarter. In: ACM SIGSAC Conference on Computer and Communications Security, pp. 254–269 (2016)
Tsankov, P., Dan, A., Drachsler-Cohen, D., et al.: Securify: practical security analysis of smart contracts. In: 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: ACM/IEEE International Conference on Automated Software Engineering, pp. 259–269 (2018)
Liu, C., Liu, H., Cao, Z., et al.: ReGuard: finding reentrancy bugs in smart contracts. In: Proceedings of the IEEE/ACM International Conference on Software Engineering: Companion (2018)
Liu, C., Liu, H., Cao, Z., et al.: Reguard: finding reentrancy bugs in smart contracts. In: International Conference on Software Engineering: Companion Proceedings, pp. 65–68 (2018)
Wang, W., Song, J., Xu, G., et al.: Contractward: automated vulnerability detection models for ethereum smart contracts. IEEE Trans. Netw. Sci. Eng. 8(2), 1133–1144 (2020)
Zhuang, Y., Liu, Z., Qian, P., et al.: Smart contract vulnerability detection using graph neural networks. In: 29th International Joint Conference on Artificial Intelligence, pp. 3283–3290 (2021)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Xu, H., Qiu, M., Zhao, H. (2024). Reentrancy Vulnerability Detection Based on Improved Attention Mechanism. In: Cao, C., Chen, H., Zhao, L., Arshad, J., Asyhari, T., Wang, Y. (eds) Knowledge Science, Engineering and Management. KSEM 2024. Lecture Notes in Computer Science(), vol 14886. Springer, Singapore. https://doi.org/10.1007/978-981-97-5498-4_25
Download citation
DOI: https://doi.org/10.1007/978-981-97-5498-4_25
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-97-5497-7
Online ISBN: 978-981-97-5498-4
eBook Packages: Computer ScienceComputer Science (R0)