WakeMint:检测NFT智能合约中的Sleepminting漏洞
WakeMint: Detecting Sleepminting Vulnerabilities in NFT Smart Contracts
AI总结:
针对NFT智能合约中的sleepminting漏洞,本文分类了四种类型,并提出基于符号执行的检测工具WakeMint,在11,161个真实合约中实现87.8%的精确度。
摘要:
非同质化代币(NFT)市场在过去十年中不断发展,NFT作为区块链上的独特数字标识符,用于证明所有权和真实性。然而,其高价值也吸引了攻击者利用NFT智能合约中的漏洞获取非法利润,从而损害NFT生态系统。NFT智能合约中一个显著的漏洞是sleepminting,该漏洞允许攻击者非法转移他人的代币。尽管已有一些关于sleepminting的研究,但这些研究基本上是定性分析或基于历史交易数据。从合约代码角度缺乏理解,而这对于识别此类问题并在攻击发生前进行预防至关重要。为弥补这一空白,本文对NFT智能合约中的sleepminting进行了四种不同类别的分类。每种类型都配有全面的定义和说明性代码示例,以展示这些漏洞如何在合约代码中显现。此外,为了在sleepminting问题发生前帮助检测所定义的缺陷,我们提出了一种名为WakeMint的工具,该工具基于符号执行框架构建,并设计为兼容高版本和低版本的Solidity。该工具还采用剪枝策略以缩短检测时间。此外,WakeMint在符号执行过程中收集一些关键信息,如NFT的所有者以及与NFT所有权转移相关的事件发射。然后,它基于这些信息分析转移函数的特征,从而判断sleepminting的存在。我们在11,161个真实世界的NFT智能合约上运行了WakeMint并评估了结果。我们总共发现了115个sleepminting问题实例,我们工具的精确度为87.8%。
英文摘要:
The non-fungible tokens (NFTs) market has evolved over the past decade, with NFTs serving as unique digital identifiers on a blockchain that certify ownership and authenticity. However, their high value also attracts attackers who exploit vulnerabilities in NFT smart contracts for illegal profits, thereby harming the NFT ecosystem. One notable vulnerability in NFT smart contracts is sleepminting, which allows attackers to illegally transfer others' tokens. Although some research has been conducted on sleepminting, these studies are basically qualitative analyses or based on historical transaction data. There is a lack of understanding from the contract code perspective, which is crucial for identifying such issues and preventing attacks before they occur. To address this gap, in this paper, we categoriz four distinct types of sleepminting in NFT smart contracts. Each type is accompanied by a comprehensive definition and illustrative code examples to provide how these vulnerabilities manifest within the contract code. Furthermore, to help detect the defined defects before the sleepminting problem occurrence, we propose a tool named WakeMint, which is built on a symbolic execution framework and is designed to be compatible with both high and low versions of Solidity. The tool also employs a pruning strategy to shorten the detection period. Additionally, WakeMint gathers some key information, such as the owner of an NFT and emissions of events related to the transfer of the NFT's ownership during symbolic execution. Then, it analyzes the features of the transfer function based on this information so that it can judge the existence of sleepminting. We ran WakeMint on 11,161 real-world NFT smart contracts and evaluated the results. We found 115 instances of sleepminting issues in total, and the precision of our tool is 87.8%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。