首页 | 本学科首页   官方微博 | 高级检索  
     检索      

SlightDetection:一种以太坊智能合约安全漏洞的静态分析工具
引用本文:陈霄汉,赵相福,张登记,费佳佳.SlightDetection:一种以太坊智能合约安全漏洞的静态分析工具[J].应用科学学报,2021,40(4):695-712.
作者姓名:陈霄汉  赵相福  张登记  费佳佳
作者单位:1. 烟台大学 计算机与控制工程学院, 山东 烟台 264005;2. 浙江师范大学 数学与计算机科学学院, 浙江 金华 321004
基金项目:国家自然科学基金(No.61972360,No.62072392)资助
摘    要:以太坊智能合约若存在安全漏洞,则会导致无可估量的损失。为缓解该问题,提出了一种以静态程序分析技术实现代码全覆盖的智能合约漏洞检测工具SlightDetection。该工具将智能合约源代码转化为对应的抽象语法树,并翻译为XML中间表示;以几个经典漏洞的特征为例,书写自定义的XPath规则库;将XML中间表示与XPath库作为输入不断遍历XPath规则库并进行匹配,最终得到漏洞检测的报告。该文测试了3个经典合约,充分展示了SlightDetection具有更快、更准确的检测特性;对Etherscan上提供的大量智能合约进行测试并对其中100多份合约进行了手动验证,进一步证明了该工具的有效性。

关 键 词:智能合约  漏洞检测  静态分析  以太坊  
收稿时间:2021-11-12

SlightDetection: A Static Analysis Tool for Smart Contracts Security Vulnerabilities on Ethereum
CHEN Xiaohan,ZHAO Xiangfu,ZHANG Dengji,FEI Jiajia.SlightDetection: A Static Analysis Tool for Smart Contracts Security Vulnerabilities on Ethereum[J].Journal of Applied Sciences,2021,40(4):695-712.
Authors:CHEN Xiaohan  ZHAO Xiangfu  ZHANG Dengji  FEI Jiajia
Institution:1. School of Computer and Control Engineering, Yantai University, Yantai 264005, Shandong, China;2. School of Mathematics and Computer Science, Zhejiang Normal University, Jinhua 321004, Zhejiang, China
Abstract:Security vulnerabilities in Ethereum smart contracts may lead to immeasurable losses. To alleviate this problem, a smart contract vulnerability detection tool SlightDetection is proposed, which uses static program analysis technology to achieve full code coverage. The tool converts smart contract source codes into a corresponding abstract syntax tree, and translates it into an XML intermediate representation. Taking the characteristics of several classic vulnerabilities as an example, the tool writes a custom XPath rule library, and using the XML intermediate representation and the XPath library as inputs, the tool keeps traversing and matching the XPath rule base, till getting the report of vulnerability detection. This work tests 3 classic contracts, and fully demonstrates the faster and more accurate detection features of SlightDetection. The effectiveness of the tool is proved by testing a large number of smart contracts provided on Etherscan and manually verifying more than 100 of them.
Keywords:smart contract  vulnerability detection  static analysis  Ethereum  
点击此处可从《应用科学学报》浏览原始摘要信息
点击此处可从《应用科学学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号