基于混合模型和注意力机制的智能合约重入漏洞检测方法  

Reentrancy Vulnerability Detection Method in Smart Contracts Based on Hybrid Model and Attention Mechanism

在线阅读下载全文

作  者:沈学利 李明峰 Shen Xueli;Li Mingfeng(College of Software,Liaoning Technical University,Huludao,Liaoning 125105)

机构地区:[1]辽宁工程技术大学软件学院,辽宁葫芦岛125105

出  处:《信息安全研究》2024年第11期1056-1063,共8页Journal of Information Security Research

基  金:国家自然科学基金项目(62173171)。

摘  要:针对传统智能合约漏洞检测工具和单一深度学习模型对重入漏洞检测效率和精确率低等问题,提出了一种基于混合模型和注意力机制的重入漏洞检测方法(CNN-BiLSTM-ATT).首先,使用单词嵌入模型(Word2vec)进行数据处理并得到特征向量;然后,将处理后的特征向量通过卷积神经网络(CNN)和双向长短期记忆网络(BiLSTM)相结合的方法进行特征提取,并通过注意力机制赋予权重以突出关键特征;最后,采用全连接层和Softmax分类器对生成的结果进行分类,实现智能合约的重入漏洞检测.实验结果表明,与传统工具和深度学习方法相比,基于CNN-BiLSTM-ATT的方法在重入漏洞检测方面有较大的提升,准确率、精确率、召回率和F1值分别达到了92.53%,93.27%,91.73%,92.5%,证明该方法的有效性.Addressing the challenges of low efficiency and accuracy in reentrancy vulnerability detection by traditional smart contract vulnerability detection tools and single deep learning models,this paper proposes a reentrancy vulnerability detection method based on hybrid model and attention mechanism(CNN-BiLSTM-ATT).Firstly,data processing is performed using the Word2vec model to obtain feature vectors.Secondly,these vectors undergo processing through a combination of convolutional neural network(CNN)and bi-directional long short-term memory(BiLSTM)networks to extract features.The attention mechanism then assigns weights to highlight key features.Finally,a fully connected layer and Softmax classifier are utilized to classify the generated results,enabling reentrancy vulnerability detection in smart contracts.The experimental results demonstrate that compared with the traditional tools and deep learning methods,the method based on CNN-BiLSTM-ATT proposed in this paper has been greatly improved in reentrant vulnerability detection.The accuracy,precision,recall rate and F1 value reached 92.53%,93.27%,91.73%and 92.5%respectively,confirming the effectiveness of the proposed method.

关 键 词:智能合约 重入漏洞 漏洞检测 混合模型 注意力机制 

分 类 号:TP309[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象