arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2107.11598cs.CRcs.LGcs.PL
收藏

结合图神经网络和专家知识的智能合约漏洞检测

Combining Graph Neural Networks with Expert Knowledge for Smart Contract Vulnerability Detection

Zhejiang Gongshang University(浙江工商大学);Zhejiang University(浙江大学);National University of Singapore(新加坡国立大学);Southern University of Science and Technology(南方科技大学);Zhejiang Lab(之江实验室)

Zhenguang Liu, Peng Qian, Xiaoyang Wang, Yuan Zhuang, Lin Qiu, Xun Wang

摘要:

由于黑客攻击造成的巨大损失,智能合约漏洞检测近年来受到广泛关注。现有的合同安全分析工作严重依赖于专家定义的严格规则,这些规则是劳动密集型的,不可扩展的。更重要的是,专家定义的规则往往容易出错,并且存在被狡猾的攻击者欺骗的固有风险。最近的研究集中在用于漏洞检测的智能合约的符号执行和形式化分析上,尚未实现精确和可扩展的解决方案。尽管已经提出了几种方法来检测智能合约中的漏洞,但仍然缺乏考虑将专家定义的安全模式与深度神经网络相结合的努力。在本文中,我们探索使用图神经网络和专家知识的智能合约漏洞检测。具体地说,我们将源代码的丰富的控制流和数据流语义转换为契约图。为了突出图中的关键节点,我们进一步设计了一个节点消除阶段来规范化图。然后,我们提出了一种新的时间消息传播网络提取的图形特征的规范化图,并结合设计的专家模式,产生一个最终的检测系统的图形特征。对所有在以太坊和VNT Chain平台上具有源代码的智能合约进行了广泛的实验。实验结果表明,在三种类型的漏洞,我们的方法的检测准确率达到89.15%,89.02%,和83.21%的可重入性,时间戳依赖性和无限循环漏洞,分别为国家的最先进的方法显着的准确性提高。

英文摘要:

Smart contract vulnerability detection draws extensive attention in recent years due to the substantial losses caused by hacker attacks. Existing efforts for contract security analysis heavily rely on rigid rules defined by experts, which are labor-intensive and non-scalable. More importantly, expert-defined rules tend to be error-prone and suffer the inherent risk of being cheated by crafty attackers. Recent researches focus on the symbolic execution and formal analysis of smart contracts for vulnerability detection, yet to achieve a precise and scalable solution. Although several methods have been proposed to detect vulnerabilities in smart contracts, there is still a lack of effort that considers combining expert-defined security patterns with deep neural networks. In this paper, we explore using graph neural networks and expert knowledge for smart contract vulnerability detection. Specifically, we cast the rich control- and data- flow semantics of the source code into a contract graph. To highlight the critical nodes in the graph, we further design a node elimination phase to normalize the graph. Then, we propose a novel temporal message propagation network to extract the graph feature from the normalized graph, and combine the graph feature with designed expert patterns to yield a final detection system. Extensive experiments are conducted on all the smart contracts that have source code in Ethereum and VNT Chain platforms. Empirical results show significant accuracy improvements over the state-of-the-art methods on three types of vulnerabilities, where the detection accuracy of our method reaches 89.15%, 89.02%, and 83.21% for reentrancy, timestamp dependence, and infinite loop vulnerabilities, respectively.

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

↑