arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.00282cs.SE
收藏

基于静态分析与多目标搜索的智能合约漏洞检测

Smart Contract Vulnerability Detection based on Static Analysis and Multi-Objective Search

Dongcheng Li, W. Eric Wong, Xiaodan Wang, Sean Pan, Liang-Seng Koh

AI总结:

本文提出一种结合静态分析与多目标优化的智能合约漏洞检测方法,针对重入、调用栈溢出、整数溢出和时间戳依赖四类漏洞,在6,693个合约上验证其覆盖率、精度和效率优于现有工具。

摘要:

本文介绍了一种利用静态分析和多目标优化算法检测智能合约漏洞的方法。我们重点关注四类漏洞:重入、调用栈溢出、整数溢出和时间戳依赖。首先,将智能合约编译为抽象语法树,以分析合约与函数之间的关系,包括调用、继承和数据流。这些分析被转换为静态评估和中间表示,以揭示内部关系。基于这些表示,我们检查合约的函数、变量和数据依赖,以检测指定的漏洞。为了提高检测精度和覆盖率,我们将多目标优化算法应用于静态分析过程。这包括为输入数据分配初始数值,并监测语句覆盖率和检测精度的变化。以覆盖率和精度作为适应度值,我们计算Pareto前沿和拥挤距离值,为新的父代种群选择最佳个体,迭代直到满足优化准则。我们使用从Etherscan收集的开源数据集验证了我们的方法,该数据集包含6,693个智能合约。实验结果表明,我们的方法在检测目标漏洞的覆盖率、精度、效率和有效性方面优于最先进的工具。

英文摘要:

This paper introduces a method for detecting vulnerabilities in smart contracts using static analysis and a multi-objective optimization algorithm. We focus on four types of vulnerabilities: reentrancy, call stack overflow, integer overflow, and timestamp dependencies. Initially, smart contracts are compiled into an abstract syntax tree to analyze relationships between contracts and functions, including calls, inheritance, and data flow. These analyses are transformed into static evaluations and intermediate representations that reveal internal relations. Based on these representations, we examine contract's functions, variables, and data dependencies to detect the specified vulnerabilities. To enhance detection accuracy and coverage, we apply a multi-objective optimization algorithm to the static analysis process. This involves assigning initial numeric values to input data and monitoring changes in statement coverage and detection accuracy. Using coverage and accuracy as fitness values, we calculate Pareto front and crowding distance values to select the best individuals for the new parent population, iterating until optimization criteria are met. We validate our approach using an open-source dataset collected from Etherscan, containing 6,693 smart contracts. Experimental results show that our method outperforms state-of-the-art tools in terms of coverage, accuracy, efficiency, and effectiveness in detecting the targeted vulnerabilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑