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

通过仅使用Solidity训练实现低资源智能合约的零样本漏洞检测

Zero-Shot Vulnerability Detection in Low-Resource Smart Contracts Through Solidity-Only Training

George Mason University(乔治梅森大学)

Minghao Hu, Qiang Zeng, Lannan Luo

AI总结:

本文提出Sol2Vy框架,通过Solidity训练模型实现Vyper漏洞检测,无需大量标注数据,实验显示在重入、弱随机性和未检查转账等漏洞上表现优异。

摘要:

智能合约已革新去中心化金融,但其逻辑缺陷仍构成重大安全威胁。现有漏洞检测技术多聚焦于支持良好的语言如Solidity,而低资源语言如Vyper因分析工具稀缺和标注数据有限而被忽视。直接在Vyper上训练稳健的检测模型尤其具有挑战性,因为实际中难以收集足够大且多样的Vyper训练数据集。为解决这一差距,我们引入Sol2Vy,一种新颖的框架,通过从Solidity到Vyper的跨语言知识迁移,允许使用仅在Solidity上训练的模型进行Vyper漏洞检测。此方法消除了通常需要大量标注Vyper数据来构建稳健漏洞检测模型的需要。我们实现了并评估了Sol2Vy在各种关键漏洞类型上的表现,包括重入、弱随机性和未检查转账。实验结果表明,尽管仅在Solidity上训练,Sol2Vy在Vyper合约上的检测性能强大,并显著优于现有最先进方法。

英文摘要:

Smart contracts have transformed decentralized finance, but flaws in their logic still create major security threats. Most existing vulnerability detection techniques focus on well-supported languages like Solidity, while low-resource counterparts such as Vyper remain largely underexplored due to scarce analysis tools and limited labeled datasets. Training a robust detection model directly on Vyper is particularly challenging, as collecting sufficiently large and diverse Vyper training datasets is difficult in practice. To address this gap, we introduce Sol2Vy, a novel framework that enables cross-language knowledge transfer from Solidity to Vyper, allowing vulnerability detection on Vyper using models trained exclusively on Solidity. This approach eliminates the need for extensive labeled Vyper datasets typically required to build a robust vulnerability detection model. We implement and evaluate Sol2Vy on various critical vulnerability types, including reentrancy, weak randomness, and unchecked transfer. Experimental results show that Sol2Vy, despite being trained exclusively on Solidity, achieves strong detection performance on Vyper contracts and significantly outperforms prior state-of-the-art methods.

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

↑