arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.04479cs.CR
收藏

基于多关系嵌套图卷积网络的智能合约漏洞函数定位

Vulnerable Smart Contract Function Locating Based on Multi-Relational Nested Graph Convolutional Network

Haiyang Liu, Yuqi Fan, Lin Feng, Zhenchun Wei

AI总结:

针对智能合约漏洞函数定位问题,提出MRNG/MRFG嵌套图表示与MRN-GCN模型,融合边增强图卷积和自注意力提取函数及合约特征,实验表明其显著提升定位性能。

摘要:

区块链的不可篡改和可信特性使智能合约得以应用于各个领域。然而,智能合约存在各种漏洞,这些漏洞经常被攻击者利用,给用户造成经济损失。本文研究智能合约漏洞函数定位问题。我们构建了一种新颖的多关系嵌套合约图(MRNG),以更好地表征智能合约代码中丰富的语法和语义信息,包括数据与指令之间的关系。MRNG表示一个智能合约,其中每个节点表示智能合约中的一个函数,每条边描述函数之间的调用关系。此外,我们为每个函数创建多关系函数图(MRFG),用于表征相应的函数代码。也就是说,每个函数都被表征为一个MRFG,并对应于MRNG中的一个节点。每个MRFG使用不同类型的边来表示函数内节点之间不同的控制关系和数据关系。我们还提出了一种多关系嵌套图卷积网络(MRN-GCN)来处理MRNG。MRN-GCN首先使用边增强图卷积网络和自注意力机制从每个MRFG中提取并聚合特征。随后,提取出的特征向量被分配给MRNG中的相应节点,从而为智能合约获得一个新的带特征合约图(FCG)。接着使用图卷积从FCG中进一步提取特征。最后,使用带有Sigmoid函数的前馈网络来定位漏洞函数。在真实智能合约数据集上的实验结果表明,MRN-GCN模型能够有效提升智能合约漏洞函数定位的准确率、精确率、召回率和F1分数性能。

英文摘要:

The immutable and trustable characteristics of blockchain enable smart contracts to be applied in various fields. Unfortunately, smart contracts are subject to various vulnerabilities, which are frequently exploited by attackers, causing financial damage to users.In this paper, we study the problem of vulnerable smart contract function locating. We construct a novel Multi-Relational Nested contract Graph (MRNG) to better characterize the rich syntactic and semantic information in the smart contract code, including the relationships between data and instructions. An MRNG represents a smart contract, where each node represents a function in the smart contract and each edge describes the calling relationship between the functions. In addition, we create a Multi-Relational Function Graph (MRFG) for each function, which characterizes the corresponding function code. That is, each function is characterized as an MRFG, which corresponds to a node in the MRNG. Each MRFG uses different types of edges to represent the different control and data relationships between nodes within a function. We also propose a Multi-Relational Nested Graph Convolutional Network (MRN-GCN) to process the MRNG. MRN-GCN first extracts and aggregates features from each MRFG, using the edge-enhanced graph convolution network and self-attention mechanism. The extracted feature vector is then assigned to the corresponding node in the MRNG to obtain a new Featured Contract Graph (FCG) for the smart contract. Graph convolution is used to further extract features from the FCG. Finally, a feed forward network with a Sigmoid function is used to locate the vulnerable functions. Experimental results on the real-world smart contract datasets show that model MRN-GCN can effectively improve the accuracy, precision, recall and F1-score performance of vulnerable smart contract function locating.

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

↑