One Signature, Multiple Payments: Demystifying and Detecting Signature Replay Vulnerabilities in Smart Contracts
Zexu Wang, Jiachi Chen, Zewei Lin, Wenqing Chen, Kaiwen Ning, Jianxing Yu, Yuming Feng, Yu Zhang, Weizhe Zhang, Zibin Zheng
智能合约具有显着先进的区块链技术,数字签名对于可靠验证合同权限至关重要。 通过签名验证,智能合约可以确保签名者拥有所需的权限,从而增强安全性和可扩展性。 然而,缺乏对签名使用条件的检查会导致重复验证,增加许可滥用和威胁合同资产的风险。 我们将此问题定义为 Signature Replay Vulnerability (SRV)。 在本文中,我们进行了第一个实证研究,以调查SRV的原因和特征。 从37家区块链安全公司的1,419份审计报告中,我们确定了108份详细的SRV描述和分类的五种SRV。 为了自动检测这些漏洞,我们设计了LASiR,它利用大型语言模型(LLM)的一般语义理解能力,协助对签名状态进行静态污点分析,并识别签名重用行为。 它还通过符号执行实现路径可访问性验证,以确保有效和可靠的检测。 为了评估LASiR的性能,我们对涉及签名验证的15,383份合同进行了大规模实验,这些合同从四个区块链的918,964合同的初始数据集中选出:以太坊,币安智能链,Polygon和Arbitrum。 结果表明,SRV很普遍,受影响的合同持有476万活跃资产。 其中,19.63%在以太坊上使用签名的合同包含SRV。 此外,手动验证表明,LASiR的检测成绩为87.90%。 消融研究和比较实验表明,LLM提供的语义信息有助于静态污渍分析,显著增强LASiR的检测性能。
Smart contracts have significantly advanced blockchain technology, and digital signatures are crucial for reliable verification of contract authority. Through signature verification, smart contracts can ensure that signers possess the required permissions, thus enhancing security and scalability. However, lacking checks on signature usage conditions can lead to repeated verifications, increasing the risk of permission abuse and threatening contract assets. We define this issue as the Signature R...