Ethereum smart contracts are automated decentralized applications on the blockchain that describe the terms of the agreement between buyers and sellers, reducing the need for trusted intermediaries and arbitration. However, the deployment of smart contracts introduces new attack vectors into the cryptocurrency systems. In particular, programming flaws in smart contracts can be and have already been exploited to gain enormous financial profits. It is thus an emerging yet crucial issue to detect vulnerabilities of different classes in contracts in an efficient manner. Existing machine learning-based vulnerability detection methods are limited and only inspect whether the smart contract is vulnerable, or train individual classifiers for each specific vulnerability, or demonstrate multi-class vulnerability detection without extensibility consideration. To overcome the scalability and generalization limitations of existing works, we propose ESCORT, the first Deep Neural Network (DNN)-based vulnerability detection framework for Ethereum smart contracts that support lightweight transfer learning on unseen security vulnerabilities, thus is extensible and generalizable. ESCORT leverages a multi-output NN architecture that consists of two parts: (i) A common feature extractor that learns the semantics of the input contract; (ii) Multiple branch structures where each branch learns a specific vulnerability type based on features obtained from the feature extractor. Experimental results show that ESCORT achieves an average F1-score of 95% on six vulnerability types and the detection time is 0.02 seconds per contract. When extended to new vulnerability types, ESCORT yields an average F1-score of 93%. To the best of our knowledge, ESCORT is the first framework that enables transfer learning on new vulnerability types with minimal modification of the DNN model architecture and re-training overhead.
翻译:Eceenum智能合同是在链链条上自动分散应用,描述买方和卖方之间的协议条款,减少对受信任中间人和仲裁的需要。然而,智能合同的部署将新的攻击矢量引入加密货币系统。特别是,智能合同的编程缺陷可以而且已经被利用以获得巨大的财务利润。因此,这是一个新兴的、但又至关重要的问题,可以以高效的方式在合同中发现不同类别的脆弱性。现有的基于机械学习的脆弱性检测方法有限,只能检查智能合同是否脆弱,或为每个具体脆弱性培训单个分类人员,或显示多级脆弱性检测而不考虑扩展。为了克服现有工程的可缩放性和概括性限制,我们提议Escoral网络(DNN)的第一个基于智能合同的编程缺陷检测框架,支持轻量转移学习隐性安全弱点,从而可以推广和普及。ESCORT利用现有的多功能提取模型,从投入合同的缩略图 0-RSO 的缩略图的缩略图的缩略图,在E-LODRO 的缩图中,每个缩略图的缩图的缩略图是缩图的缩图的缩图。