Research Article

SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework

Volume: 4 Number: 2 December 31, 2024
EN

SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework

Abstract

Smart contracts are essential for managing digital assets in blockchain networks, highlighting the need for effective security measures. This paper introduces SmartLLMSentry, a novel framework that leverages large language models (LLMs), specifically ChatGPT with in-context training, to advance smart contract vulnerability detection. Traditional rule-based frameworks have limitations in integrating new detection rules efficiently. In contrast, SmartLLMSentry utilizes LLMs to streamline this process. We created a specialized dataset of five randomly selected vulnerabilities for model training and evaluation. Our results show an exact match accuracy of 91.1% with sufficient data, although GPT-4 demonstrated reduced performance compared to GPT-3 in rule generation. This study illustrates that SmartLLMSentry significantly enhances the speed and accuracy of vulnerability detection through LLM-driven rule integration, offering a new approach to improving Blockchain security and addressing previously underexplored vulnerabilities in smart contracts.

Keywords

References

  1. Shabani Baghani, A., Rahimpour, S., & Khabbazian, M. (2022). The DAO Induction Attack: Analysis and Countermeasure. IEEE Internet of Things Journal, 9(7), 4875–4887. IEEE Internet of Things Journal. https://doi.org/10.1109/JIOT.2021.3108154
  2. Fatima Samreen, N., & Alalfi, M. H. (2020). Reentrancy Vulnerability Identification in Ethereum Smart Contracts. 2020 IEEE International Workshop on Blockchain Oriented Software Engineering (IWBOSE), 22–29. https://doi.org/10.1109/IWBOSE50093.2020.9050260
  3. Zaazaa, O., & Bakkali, H. E. (n.d.). Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examination and Codification of Vulnerabilities in Prominent Blockchains.
  4. Matulevicius, N., & Cordeiro, L. C. (2021). Verifying Security Vulnerabilities for Blockchain-based Smart Contracts. 2021 XI Brazilian Symposium on Computing Systems Engineering (SBESC), 1–8. https://doi.org/10.1109/SBESC53686.2021.9628229
  5. etherscan.io. (n.d.). Ethereum Daily Deployed Contracts Chart | Etherscan. Ethereum (ETH) Blockchain Explorer. Retrieved July 22, 2024, from https://etherscan.io/chart/deployed-contracts
  6. Singh, N., Meherhomji, V., & Chandavarkar, B. R. (2020). Automated versus Manual Approach of Web Application Penetration Testing. 2020 11th International Conference on Computing, Communication and Networking Technologies (ICCCNT), 1–6.
  7. OpenAI, Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., Anadkat, S., Avila, R., Babuschkin, I., Balaji, S., Balcom, V., Baltescu, P., Bao, H., Bavarian, M., Belgum, J., … Zoph, B. (2023). GPT-4 Technical Report (arXiv:2303.08774). arXiv.
  8. Cao, J., Li, M., Wen, M., & Cheung, S. (2023). A study on Prompt Design, Advantages and Limitations of ChatGPT for Deep Learning Program Repair. Association for Computing Machinery, 1(1).

Details

Primary Language

English

Subjects

Information Security and Cryptology , Computer Software

Journal Section

Research Article

Early Pub Date

November 2, 2024

Publication Date

December 31, 2024

Submission Date

May 25, 2024

Acceptance Date

October 31, 2024

Published in Issue

Year 1970 Volume: 4 Number: 2

APA
Zaazaa, O., & El Bakkali, H. (2024). SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework. Journal of Metaverse, 4(2), 126-137. https://doi.org/10.57019/jmv.1489060

Cited By

Journal of Metaverse
is indexed and abstracted by
Scopus, ESCI and DOAJ

Publisher
Izmir Academy Association
www.izmirakademi.org