Abstract
As one of the key components of blockchain, smart contract is playing a vital role in achieving auto-functions; however, reentrant attacks are threatening the implementation of smart contracts, which limits the adoption of blockchain systems in various scenarios. To address this issue, we propose a reentrant vulnerability detection model based on word embedding, similarity detection, and Generative Adversarial Networks (GAN). Additionally, we provide a new approach for dynamically preventing reentrant attacks. We also implement experiments to evaluate our model and results show our scheme achieves 92% detecting accuracy for reentrant attack detection.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Ashizawa, N., Yanai, N., Cruz, J., Okamura, S.: Eth2Vec: learning contract-wide code representations for vulnerability detection on ethereum smart contracts. In: the 3rd ACM International Symposium on Blockchain and Secure Critical Infrastructure, Hong Kong, China, pp. 47–59 (2021)
Bojanowski, P., Grave, E., Joulin, A., Mikolov, T.: Enriching word vectors with subword information. Trans. Assoc. Comput. Linguist. 5, 135–146 (2017)
Dong, C., Li, Y., Tan, L.: A new approach to prevent reentrant attack in solidity smart contracts. In: Si, X., et al. (eds.) CBCC 2019. CCIS, vol. 1176, pp. 83–103. Springer, Singapore (2020). https://doi.org/10.1007/978-981-15-3278-8_6
Gai, K., Qiu, M., Zhao, H., Tao, L., Zong, Z.: Dynamic energy-aware cloudlet-based mobile cloud computing model for green computing. J. Netw. Comput. Appl. 59, 46–54 (2016)
Gai, K., Wu, Y., Zhu, L., Qiu, M., Shen, M.: Privacy-preserving energy trading using consortium blockchain in smart grid. IEEE Trans. Ind. Inf. 15(6), 3548–3558 (2019)
Gai, K., Wu, Y., Zhu, L., Zhang, Z., Qiu, M.: Differential privacy-based blockchain for industrial Internet-of-Things. IEEE Trans. Ind. Inf. 16(6), 4156–4165 (2019)
Gai, K., Guo, J., Zhu, L., Yu, S.: Blockchain meets cloud computing: a survey. IEEE Commun. Surv. Tutor. 22(3), 2009–2030 (2020)
Gao, Z., Jayasundara, V., Jiang, L., Xia, X., Lo, D., Grundy, J.: SmartEmbed: a tool for clone and bug detection in smart contracts through structural code embedding. In: IEEE International Conference on Software Maintenance and Evolution (ICSME) (2019)
Gao, Z., Jiang, L., Xia, X., Lo, D., Grundy, J.: Checking smart contracts with structural code embedding. IEEE Trans. Softw. Eng. PP(99), 1–1 (2020)
Griggs, K.N., Olya, O., Kohlios, C.P., Baccarini, A.N., Howson, E.A., Thaier, H.: Healthcare blockchain system using smart contracts for secure automated remote patient monitoring. J. Med. Syst. 42(7), 130 (2018). https://doi.org/10.1007/s10916-018-0982-x
Luu, L., Chu, D., Olickel, H., Saxena, P., Hobor, A.: Making smart contracts smarter. IACR Cryptol. ePrint Arch. 2016, 633 (2016)
Mikolov, T., Chen, K., Corrado, G., Dean, J.: Efficient estimation of word representations in vector space. Computer Science (2013)
Permenev, A., Dimitrov, D., Tsankov, P., Drachsler-Cohen, D., Vechev, M.: Verx: safety verification of smart contracts. In: IEEE Symposium on Security and Privacy (2020)
Qiu, H., Qiu, M., Memmi, G., Ming, Z., Liu, M.: A dynamic scalable blockchain based communication architecture for IoT. In: Qiu, M. (ed.) SmartBlock 2018. LNCS, vol. 11373, pp. 159–166. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-05764-0_17
Qiu, H., et al.: All-or-nothing data protection for ubiquitous communication: challenges and perspectives. Inf. Sci. 502, 434–445 (2019)
Rodler, M., Li, W., Karame, G., Davi, L.: Sereum: protecting existing smart contracts against re-entrancy attacks. arXiv preprint arXiv:1812.05934 (2018)
Tian, Z., Li, M., Qiu, M., Sun, Y., Su, S.: Block-DEF: A secure digital evidence framework using blockchain. Inf. Sci. 491, 151–165 (2019)
Tsankov, P., Dan, A.M., Drachsler-Cohen, D., Gervais, A., Bünzli, F., Vechev, M.T.: Securify: practical security analysis of smart contracts. In: ACM SIGSAC Conference on Computer and Communications Security (CCS) 2018, Toronto, Canada, pp. 67–82 (2018)
Wang, K., Tao, J., Zhu, J., Ye, Z., Qiu, B., Xu, J.: Compressed sensing MRI reconstruction using generative adversarial network with enhanced antagonism. In: 12th International Conference on Intelligent Computation Technology and Automation, pp. 282–285 (2019)
Xin, R., Zhang, J., Shao, Y.: Complex network classification with convolutional neural network. Tsinghua Sci. Technol. 25(4), 447–457 (2020)
Zhuang, Y., et al.: Smart contract vulnerability detection using graph neural network. In: IJCAI-PRICAI-20 (2020)
Acknowledgement
This work is partially supported by National Natural Science Foundation of China (Grant No. 61972034), Natural Science Foundation of Beijing Municipality (Grant No. 4202068), Natural Science Foundation of Shandong Province (Grant No. ZR2019ZD10, ZR2020ZD01).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Zhao, H., Su, P., Wei, Y., Gai, K., Qiu, M. (2021). GAN-Enabled Code Embedding for Reentrant Vulnerabilities Detection. In: Qiu, H., Zhang, C., Fei, Z., Qiu, M., Kung, SY. (eds) Knowledge Science, Engineering and Management. KSEM 2021. Lecture Notes in Computer Science(), vol 12817. Springer, Cham. https://doi.org/10.1007/978-3-030-82153-1_48
Download citation
DOI: https://doi.org/10.1007/978-3-030-82153-1_48
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-82152-4
Online ISBN: 978-3-030-82153-1
eBook Packages: Computer ScienceComputer Science (R0)