arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.21685cs.CRcs.SE
收藏

代码转换对智能合约漏洞检测的影响

Impact of Code Transformation on Detection of Smart Contract Vulnerabilities

Cuong Tran Manh, Hieu Dinh Vo

AI总结:

针对智能合约漏洞检测训练数据集有限的问题,提出基于语义保持代码转换的数据集扩充方法,可生成能绕过现有检测工具的漏洞样本,使检测漏报率最高达100%,数据集规模至少扩大2.5倍。

摘要:

智能合约是区块链应用的基础要素,但其本身易受安全漏洞影响的特性带来了严峻挑战。现有用于漏洞检测工具的训练数据集可能存在局限性,进而可能削弱其检测效能。本文提出了一种提升智能合约漏洞数据集数量与质量的方法,并对当前的检测方法进行了评估。该方法以语义保持代码转换为核心,这是一种在不改变源代码语义的前提下修改其结构的技术。转换后的代码片段会被插入到良性智能合约代码内的所有潜在位置,生成新的存在漏洞的合约版本。该方法旨在生成更多样化的漏洞代码,包括那些能够绕过当前分析工具检测的代码。本文通过Slither、Mythril和CrossFuzz等工具开展实验,评估该方法的有效性,重点关注生成的漏洞样本数量、检测这些漏洞时的漏报率等指标。实验结果表明,大量新生成的漏洞能够绕过检测工具,漏报率最高可达100%,且数据集规模至少扩大了2.5倍。

英文摘要:

While smart contracts are foundational elements of blockchain applications, their inherent susceptibility to security vulnerabilities poses a significant challenge. Existing training datasets employed for vulnerability detection tools may be limited, potentially compromising their efficacy. This paper presents a method for improving the quantity and quality of smart contract vulnerability datasets and evaluates current detection methods. The approach centers around semantic-preserving code transformation, a technique that modifies the source code structure without altering its semantic meaning. The transformed code snippets are inserted into all potential locations within benign smart contract code, creating new vulnerable contract versions. This method aims to generate a wider variety of vulnerable codes, including those that can bypass detection by current analysis tools. The paper experiments evaluate the method's effectiveness using tools like Slither, Mythril, and CrossFuzz, focusing on metrics like the number of generated vulnerable samples and the false negative rate in detecting these vulnerabilities. The improved results show that many newly created vulnerabilities can bypass tools and the false reporting rate goes up to 100% and increases dataset size minimum by 2.5X.

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

↑