• 文献检索
  • 文档翻译
  • 深度研究
  • 学术资讯
  • Suppr Zotero 插件Zotero 插件
  • 邀请有礼
  • 套餐&价格
  • 历史记录
应用&插件
Suppr Zotero 插件Zotero 插件浏览器插件Mac 客户端Windows 客户端微信小程序
定价
高级版会员购买积分包购买API积分包
服务
文献检索文档翻译深度研究API 文档MCP 服务
关于我们
关于 Suppr公司介绍联系我们用户协议隐私条款
关注我们

Suppr 超能文献

核心技术专利:CN118964589B侵权必究
粤ICP备2023148730 号-1Suppr @ 2026

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验

基于深度学习的智能合约漏洞检测解决方案。

Deep learning-based solution for smart contract vulnerabilities detection.

作者信息

Tang Xueyan, Du Yuying, Lai Alan, Zhang Ze, Shi Lingzhi

机构信息

Salus Security, Beijing, 100020, China.

出版信息

Sci Rep. 2023 Nov 16;13(1):20106. doi: 10.1038/s41598-023-47219-0.

DOI:10.1038/s41598-023-47219-0
PMID:37973832
原文链接:https://pmc.ncbi.nlm.nih.gov/articles/PMC10654660/
Abstract

This paper aims to explore the application of deep learning in smart contract vulnerabilities detection. Smart contracts are an essential part of blockchain technology and are crucial for developing decentralized applications. However, smart contract vulnerabilities can cause financial losses and system crashes. Static analysis tools are frequently used to detect vulnerabilities in smart contracts, but they often result in false positives and false negatives because of their high reliance on predefined rules and lack of semantic analysis capabilities. Furthermore, these predefined rules quickly become obsolete and fail to adapt or generalize to new data. In contrast, deep learning methods do not require predefined detection rules and can learn the features of vulnerabilities during the training process. In this paper, we introduce a solution called Lightning Cat which is based on deep learning techniques. We train three deep learning models for detecting vulnerabilities in smart contract: Optimized-CodeBERT, Optimized-LSTM, and Optimized-CNN. Experimental results show that, in the Lightning Cat we propose, Optimized-CodeBERT model surpasses other methods, achieving an f1-score of 93.53%. To precisely extract vulnerability features, we acquire segments of vulnerable code functions to retain critical vulnerability features. Using the CodeBERT pre-training model for data preprocessing, we could capture the syntax and semantics of the code more accurately. To demonstrate the feasibility of our proposed solution, we evaluate its performance using the SolidiFI-benchmark dataset, which consists of 9369 vulnerable contracts injected with vulnerabilities from seven different types.

摘要

本文旨在探讨深度学习在智能合约漏洞检测中的应用。智能合约是区块链技术的重要组成部分,对开发去中心化应用程序至关重要。然而,智能合约漏洞可能导致财务损失和系统崩溃。静态分析工具经常用于检测智能合约中的漏洞,但由于它们高度依赖预定义规则且缺乏语义分析能力,往往会产生误报和漏报。此外,这些预定义规则很快就会过时,无法适应或推广到新数据。相比之下,深度学习方法不需要预定义的检测规则,并且可以在训练过程中学习漏洞的特征。在本文中,我们介绍了一种基于深度学习技术的名为Lightning Cat的解决方案。我们训练了三个用于检测智能合约漏洞的深度学习模型:优化的CodeBERT、优化的LSTM和优化的CNN。实验结果表明,在我们提出的Lightning Cat中,优化的CodeBERT模型优于其他方法,f1分数达到93.53%。为了精确提取漏洞特征,我们获取易受攻击的代码函数片段以保留关键的漏洞特征。使用CodeBERT预训练模型进行数据预处理,我们可以更准确地捕获代码的语法和语义。为了证明我们提出的解决方案的可行性,我们使用SolidiFI基准数据集评估其性能,该数据集由9369个注入了七种不同类型漏洞的易受攻击合约组成。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/34f2d963c10d/41598_2023_47219_Fig9_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/905a4c0c2303/41598_2023_47219_Fig1_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/56ed275dbc52/41598_2023_47219_Fig2_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/3bc0039c4534/41598_2023_47219_Fig3_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/6f9271a53cd3/41598_2023_47219_Fig4_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/bcce50918577/41598_2023_47219_Fig5_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/0a4e0b277b0c/41598_2023_47219_Fig6_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/c34ecbc53eb3/41598_2023_47219_Fig7_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/1089a3c3ee9b/41598_2023_47219_Fig8_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/34f2d963c10d/41598_2023_47219_Fig9_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/905a4c0c2303/41598_2023_47219_Fig1_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/56ed275dbc52/41598_2023_47219_Fig2_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/3bc0039c4534/41598_2023_47219_Fig3_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/6f9271a53cd3/41598_2023_47219_Fig4_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/bcce50918577/41598_2023_47219_Fig5_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/0a4e0b277b0c/41598_2023_47219_Fig6_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/c34ecbc53eb3/41598_2023_47219_Fig7_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/1089a3c3ee9b/41598_2023_47219_Fig8_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/78e2/10654660/34f2d963c10d/41598_2023_47219_Fig9_HTML.jpg

相似文献

1
Deep learning-based solution for smart contract vulnerabilities detection.基于深度学习的智能合约漏洞检测解决方案。
Sci Rep. 2023 Nov 16;13(1):20106. doi: 10.1038/s41598-023-47219-0.
2
CBGRU: A Detection Method of Smart Contract Vulnerability Based on a Hybrid Model.CBGRU:一种基于混合模型的智能合约漏洞检测方法。
Sensors (Basel). 2022 May 7;22(9):3577. doi: 10.3390/s22093577.
3
Smart Contract Vulnerability Detection Based on Deep Learning and Multimodal Decision Fusion.基于深度学习和多模态决策融合的智能合约漏洞检测
Sensors (Basel). 2023 Aug 18;23(16):7246. doi: 10.3390/s23167246.
4
Taxonomic insights into ethereum smart contracts by linking application categories to security vulnerabilities.通过将应用类别与安全漏洞相关联,深入了解以太坊智能合约的分类学。
Sci Rep. 2024 Oct 8;14(1):23433. doi: 10.1038/s41598-024-73454-0.
5
Smart Contract Vulnerability Detection Model Based on Multi-Task Learning.基于多任务学习的智能合约漏洞检测模型。
Sensors (Basel). 2022 Feb 25;22(5):1829. doi: 10.3390/s22051829.
6
A Novel Smart Contract Vulnerability Detection Method Based on Information Graph and Ensemble Learning.基于信息图和集成学习的新型智能合约漏洞检测方法。
Sensors (Basel). 2022 May 8;22(9):3581. doi: 10.3390/s22093581.
7
Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer.利用多通道 TextCNN 和 Transformer 改进庞氏骗局合同检测
Sensors (Basel). 2021 Sep 26;21(19):6417. doi: 10.3390/s21196417.
8
SPCBIG-EC: A Robust Serial Hybrid Model for Smart Contract Vulnerability Detection.SPCBIG-EC:一种用于智能合约漏洞检测的健壮串行混合模型。
Sensors (Basel). 2022 Jun 19;22(12):4621. doi: 10.3390/s22124621.
9
Design and Application of Legally Valid Payment Templates Based on Linking Contracts.基于链接合约的合法有效支付模板的设计与应用。
Comput Math Methods Med. 2022 Jul 18;2022:1331237. doi: 10.1155/2022/1331237. eCollection 2022.
10
Multi-objective test selection of smart contract and blockchain applications.智能合约和区块链应用的多目标测试选择
PeerJ Comput Sci. 2023 Oct 17;9:e1587. doi: 10.7717/peerj-cs.1587. eCollection 2023.

引用本文的文献

1
An elegant intellectual engine towards automation of blockchain smart contract vulnerability detection.一个致力于区块链智能合约漏洞检测自动化的精巧智能引擎。
Sci Rep. 2025 Jul 18;15(1):26104. doi: 10.1038/s41598-025-08870-x.
2
Classifying the Information Needs of Survivors of Domestic Violence in Online Health Communities Using Large Language Models: Prediction Model Development and Evaluation Study.使用大语言模型对在线健康社区中家庭暴力幸存者的信息需求进行分类:预测模型的开发与评估研究
J Med Internet Res. 2025 May 12;27:e65397. doi: 10.2196/65397.
3
Taxonomic insights into ethereum smart contracts by linking application categories to security vulnerabilities.

本文引用的文献

1
iDetect for vulnerability detection in internet of things operating systems using machine learning.使用机器学习进行物联网操作系统漏洞检测的 iDetect。
Sci Rep. 2022 Oct 12;12(1):17086. doi: 10.1038/s41598-022-21325-x.
2
SPCBIG-EC: A Robust Serial Hybrid Model for Smart Contract Vulnerability Detection.SPCBIG-EC:一种用于智能合约漏洞检测的健壮串行混合模型。
Sensors (Basel). 2022 Jun 19;22(12):4621. doi: 10.3390/s22124621.
3
A Novel Smart Contract Vulnerability Detection Method Based on Information Graph and Ensemble Learning.
通过将应用类别与安全漏洞相关联,深入了解以太坊智能合约的分类学。
Sci Rep. 2024 Oct 8;14(1):23433. doi: 10.1038/s41598-024-73454-0.
基于信息图和集成学习的新型智能合约漏洞检测方法。
Sensors (Basel). 2022 May 8;22(9):3581. doi: 10.3390/s22093581.
4
CBGRU: A Detection Method of Smart Contract Vulnerability Based on a Hybrid Model.CBGRU:一种基于混合模型的智能合约漏洞检测方法。
Sensors (Basel). 2022 May 7;22(9):3577. doi: 10.3390/s22093577.
5
Natural language processing: an introduction.自然语言处理:入门。
J Am Med Inform Assoc. 2011 Sep-Oct;18(5):544-51. doi: 10.1136/amiajnl-2011-000464.