Font Size: a A A

Smart Contract Vulnerability Detection Based On The Combination Of Dynamic And Static Method

Posted on:2022-06-27Degree:MasterType:Thesis
Country:ChinaCandidate:L GaoFull Text:PDF
GTID:2518306350481874Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Ethereum has been a global decentralized application platform since its inception in 2015,the decentralized application based on the smart contract has developed rapidly,and the design of smart contracts has gradually become a research focus.However,due to the lack of strict verification and adequate support for development tools,many vulnerabilities have been found in the smart contract.Simultaneously,the transaction in the contract is irreversible once successful,which leads to the vulnerability and financial losses that,once incurred,cannot be remedied.Therefore,aiming at the security problems existing in intelligent contract,it is of great significance to realize efficient smart contract vulnerability detection.The smart contract's vulnerability detection technology is relatively ineffective and straightforward,and existing works mainly focus on the smart contract's source code.Few explore the binary code detection of the smart contract.This paper presents a method to detect Ethereum smart contracts vulnerabilities specific to the contract bytecode.This paper proposes a smart contract vulnerability detection method based on the combination of dynamic and static.The method aims at detecting the four highest frequency types of smart contract vulnerabilities:reentrancy,gasless send,delegate call and timestamp dependence.The static symbol execution is a primary detection method,and the dynamic fuzzy test is an auxiliary detection method.This paper proposes a static smart contract vulnerability detection method based on critical instructions in the static symbol execution detection method.Firstly,the control flow graphs are built by decompiled contract bytecode.Secondly,by analyzing the characteristics of vulnerabilities,define essential instructions and vulnerability detection rules for different vulnerabilities,and extract critical paths based on control flow graphs and critical instructions.Finally,according to the vulnerability detection rules,generate path constraints for the critical path,and use the constraint solving algorithm to solve the constraints,generate input data leading to the execution of the critical path of the vulnerability,and feed the result of the constraint solution back to the fuzzing test.In the dynamic fuzzy test detection method,based on the application of binary interface,the format and characteristics of input data are statically analyzed to generate different sets of specific input candidate values for different types of data.Then,the fuzzy test case is generated by combining with constraint solving during symbol execution.Finally,execute test cases and monitor the program status,followed by vulnerability collection and log analysis.In the combination of dynamic and static vulnerability detection method proposed in this paper,symbolic execution is used to make up for the insufficient coverage of fuzzy test path,and the result of constraint solving in symbolic execution is used to generate the input data that fuzzy test does not trigger,to trigger the path not covered by the fuzzy test.This paper conducts experiments on real smart contracts on the Ethereum official website.The experimental results show that the combination of static symbolic execution and dynamic fuzzing can effectively improve smart contract vulnerability detection efficiency,and the accuracy can reach up to 94.44%.
Keywords/Search Tags:smart contract, vulnerability detection, dynamic and static combination, symbolic execution, fuzzing
PDF Full Text Request
Related items