用大模型+符号执行自动检测以太坊合约违规,发现超五千个漏洞
SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Models
- 将规则转为特定语言,结合符号执行构建漏洞检测约束
- 在4000个真实合约中发现5783处违规,1375个可导致资金被盗
- 比六种自动化方法和专家审计更准,适合安全团队快速筛查
为规范以太坊上的智能合约,已制定多项ERC标准,规定了合约行为规则。违反这些规则可能引发严重安全问题和财务损失,因此验证合规性至关重要。当前的手动审计、程序分析工具及大语言模型(LLMs)均难以有效识别违规。本文提出SymGPT,结合大语言模型与符号执行,自动验证合约对ERC规则的遵守情况。我们首先分析了三大主流ERC标准中的132条规则,研究其内容、安全影响及自然语言描述。基于此,SymGPT引导大模型将规则转化为领域特定语言,从中合成约束以建模潜在违规,并通过符号执行进行检测。评估显示,SymGPT在4,000个真实合约中发现了5,783个ERC规则违规,其中1,375个具备明确攻击路径可导致资金盗窃。此外,它优于六种自动化技术及专业安全审计服务,证明其在智能合约分析中的显著优势。
原文摘要 · Abstract (English)
To govern smart contracts running on Ethereum, multiple Ethereum Request for Comment (ERC) standards have been developed, each defining a set of rules governing contract behavior. Violating these rules can cause serious security issues and financial losses, signifying the importance of verifying ERC compliance. Today's practices of such verification include manual audits, expert-developed program-analysis tools, and large language models (LLMs), all of which remain ineffective at detecting ERC rule violations. This paper introduces SymGPT, a tool that combines LLMs with symbolic execution to automatically verify smart contracts' compliance with ERC rules. We begin by empirically analyzing 132 ERC rules from three major ERC standards, examining their content, security implications, and natural language descriptions. Based on this study, SymGPT instructs an LLM to translate ERC rules into a domain-specific language, synthesizes constraints from the translated rules to model potential rule violations, and performs symbolic execution for violation detection. Our evaluation shows that SymGPT identifies 5,783 ERC rule violations in 4,000 real-world contracts, including 1,375 violations with clear attack paths for financial theft. Furthermore, SymGPT outperforms six automated techniques and a security-expert auditing service, underscoring its superiority over current smart contract analysis methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。