xFuzz: Machine Learning Guided Cross-Contract Fuzzing

被引:15
作者
Xue, Yinxing [1 ]
Ye, Jiaming [2 ]
Zhang, Wei [1 ]
Sun, Jun [3 ]
Ma, Lei [2 ,4 ]
Wang, Haijun [5 ]
Zhao, Jianjun [2 ]
机构
[1] Univ Sci & Technol China, Hefei 230026, Anhui, Peoples R China
[2] Kyushu Univ, Fukuoka 8190395, Japan
[3] Singapore Management Univ, Singapore 188065, Singapore
[4] Univ Alberta, Alberta Machine Intelligence Inst, Edmonton T6G 2R3, AB, Canada
[5] Nanyang Technol Univ, Nanyang 639798, Singapore
关键词
Cross-contract vulnerability; fuzzing; machine learning; smart contract;
D O I
10.1109/TDSC.2022.3182373
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Smart contract transactions are increasingly interleaved by cross-contract calls. While many tools have been developed to identify a common set of vulnerabilities, the cross-contract vulnerability is overlooked by existing tools. Cross-contract vulnerabilities are exploitable bugs that manifest in the presence of more than two interacting contracts. Existing methods are however limited to analyze a maximum of two contracts at the same time. Detecting cross-contract vulnerabilities is highly non-trivial. With multiple interacting contracts, the search space is much larger than that of a single contract. To address this problem, we present xFuzz, a machine learning guided smart contract fuzzing framework. The machine learning models are trained with novel features (e.g., word vectors and instructions) and are used to filter likely benign program paths. Comparing with existing static tools, machine learning model is proven to be more robust, avoiding directly adopting manually-defined rules in specific tools. We compare xFuzz with three state-of-the-art tools on 7,391 contracts. xFuzz detects 18 exploitable cross-contract vulnerabilities, of which 15 vulnerabilities are exposed for the first time. Furthermore, our approach is shown to be efficient in detecting non-cross-contract vulnerabilities as well-using less than 20% time as that of other fuzzing tools, xFuzz detects twice as many vulnerabilities.
引用
收藏
页码:515 / 529
页数:15
相关论文
共 54 条
[11]   XGBoost: A Scalable Tree Boosting System [J].
Chen, Tianqi ;
Guestrin, Carlos .
KDD'16: PROCEEDINGS OF THE 22ND ACM SIGKDD INTERNATIONAL CONFERENCE ON KNOWLEDGE DISCOVERY AND DATA MINING, 2016, :785-794
[12]  
Das V. K, 2020, Top blockchain platforms of 2020
[13]   Z3: An efficient SMT solver [J].
de Moura, Leonardo ;
Bjorner, Nikolaj .
TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, 2008, 4963 :337-340
[14]  
Drewry T., 2007, USENIX WORKSH OFF TE, P1
[15]   LEOPARD: Identifying Vulnerable Code for Vulnerability Assessment Through Program Metrics [J].
Du, Xiaoning ;
Chen, Bihuan ;
Li, Yuekang ;
Guo, Jianmin ;
Zhou, Yaqin ;
Liu, Yang ;
Jiang, Yu .
2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2019), 2019, :60-71
[16]   Empirical Review of Automated Analysis Tools on 47,587 Ethereum Smart Contracts [J].
Durieux, Thomas ;
Ferreira, Joao F. ;
Abreu, Rui ;
Cruz, Pedro .
2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020), 2020, :530-541
[17]   Slither: A Static Analysis Framework For Smart Contracts [J].
Feist, Josselin ;
Greico, Gustavo ;
Groce, Alex .
2019 IEEE/ACM 2ND INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB 2019), 2019, :8-15
[18]   SmartBugs: A Framework to Analyze Solidity Smart Contracts [J].
Ferreira, Joao F. ;
Cruz, Pedro ;
Durieux, Thomas ;
Abreu, Rui .
2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, :1349-1352
[19]   Towards Automated Testing of Blockchain-based Decentralized Applications [J].
Gao, Jianbo ;
Liu, Han ;
Li, Yue ;
Liu, Chao ;
Yang, Zhiqiang ;
Li, Qingshan ;
Guan, Zhi ;
Chen, Zhong .
2019 IEEE/ACM 27TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2019), 2019, :294-299
[20]  
Ghaleb Asem, 2020, ISSTA '20: Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis, P415, DOI 10.1145/3395363.3397385