Automated Smart Contract Vulnerability Detection using Fine-tuned Large Language Models

被引:0
作者
Yang, Zhiju [1 ]
Man, Gaoyuan [2 ]
Yue, Songqing [3 ]
机构
[1] Seattle Univ, Seattle, WA 98122 USA
[2] Arizona State Univ, Tempe, AZ 85287 USA
[3] Univ Wisconsin, Platteville, WI USA
来源
6TH INTERNATIONAL CONFERENCE ON BLOCKCHAIN TECHNOLOGY AND APPLICATIONS, ICBTA 2023 | 2023年
关键词
Vulnerability detection; Smart contract; Security; Large language model;
D O I
10.1145/3651655.3651658
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
As decentralized finance (DeFi) built on blockchain grows rapidly, the security of smart contracts underpinning DeFi has become a major concern due to exploits leading to billions in damages. Although tools exist for automated vulnerability detection in smart contracts, studies show that most vulnerabilities remain undetected. In this work, we propose using fine-tuned large language models (LLMs) for enhanced automated detection of vulnerabilities in smart contracts. We collected over 26,727 labeled smart contract vulnerabilities and fine-tuned the 13B parameter Llama-2 model. Evaluation of 1,000 unseen functions shows promising precision of 31-36% in predicting vulnerability categories. The fine-tuned LLM demonstrates potential as an auxiliary tool to identify vulnerable code and assist auditors. Future work is outlined for improving performance via larger models, higher-quality data, and specialized binary detection models. We present promising preliminary results on integrating LLMs into smart contract analysis and motivate further research at the intersection of LLMs and blockchain security.
引用
收藏
页码:19 / 23
页数:5
相关论文
共 42 条
  • [1] An Accurate CT Saturation Classification Using a Deep Learning Approach Based on Unsupervised Feature Extraction and Supervised Fine-Tuning Strategy
    Ali, Muhammad
    Son, Dae-Hee
    Kang, Sang-Hee
    Nam, Soon-Ryul
    [J]. ENERGIES, 2017, 10 (11)
  • [2] [Anonymous], 2023, AutoTrain Advanced
  • [3] [Anonymous], 2023, CertiK Security Audit
  • [4] [Anonymous], 2023, Claude 2
  • [5] [Anonymous], 2023, Discover the World's Top Smart Contract Auditing Companies
  • [6] A Survey of Attacks on Ethereum Smart Contracts (SoK)
    Atzei, Nicola
    Bartoletti, Massimo
    Cimoli, Tiziana
    [J]. PRINCIPLES OF SECURITY AND TRUST (POST 2017), 2017, 10204 : 164 - 186
  • [7] Brent L, 2018, Arxiv, DOI [arXiv:1809.03981, 10.48550/arXiv.1809.03981, DOI 10.48550/ARXIV.1809.03981]
  • [8] Ethainter: A Smart Contract Security Analyzer for Composite Vulnerabilities
    Brent, Lexi
    Grech, Neville
    Lagouvardos, Sifis
    Scholz, Bernhard
    Smaragdakis, Yannis
    [J]. PROCEEDINGS OF THE 41ST ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '20), 2020, : 454 - 469
  • [9] ChatGPT, 2023, about us
  • [10] Chen Mark, 2021, arXiv, DOI DOI 10.48550/ARXIV.2107.03374