With the widespread adoption of blockchain technology, smart contract security issues have become increasingly prominent, making precise identification of attack paths a critical challenge for blockchain system security. Existing methods struggle to efficiently locate key attack paths when dealing with complex contract interactions and large-scale transaction data. This research proposes a precise attack path identification method based on large language models (LLMs), integrating semantic analysis of smart contract code with dynamic transaction data association, constructing a multi-layer architecture that utilizes pre-trained LLMs for deep semantic encoding of contract code and transaction sequences, combines graph structure modeling of contract call relationships, and captures cross-transaction temporal dependencies through attention mechanisms. Experimental results across ten representative attack cases show the LLM-based method achieves 87.2% accuracy and 81.5% recall, outperforming traditional graph analysis methods by 21.9% and 24.1% respectively, reducing analysis time from an average of 210 to 68 s, providing efficient technical support for smart contract security auditing and vulnerability remediation. This research establishes a new paradigm for applying LLMs in blockchain security, contributing to more robust smart contract protection systems.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Accurate Identification of Smart Contract Attack Paths Based on Large Language Models

  • Qingyang Dai,
  • Qiong Zhang,
  • Qiong Wu,
  • Yuntian Tan

摘要

With the widespread adoption of blockchain technology, smart contract security issues have become increasingly prominent, making precise identification of attack paths a critical challenge for blockchain system security. Existing methods struggle to efficiently locate key attack paths when dealing with complex contract interactions and large-scale transaction data. This research proposes a precise attack path identification method based on large language models (LLMs), integrating semantic analysis of smart contract code with dynamic transaction data association, constructing a multi-layer architecture that utilizes pre-trained LLMs for deep semantic encoding of contract code and transaction sequences, combines graph structure modeling of contract call relationships, and captures cross-transaction temporal dependencies through attention mechanisms. Experimental results across ten representative attack cases show the LLM-based method achieves 87.2% accuracy and 81.5% recall, outperforming traditional graph analysis methods by 21.9% and 24.1% respectively, reducing analysis time from an average of 210 to 68 s, providing efficient technical support for smart contract security auditing and vulnerability remediation. This research establishes a new paradigm for applying LLMs in blockchain security, contributing to more robust smart contract protection systems.