The establishment of the global decentralized application platform Ethereum has promoted the development and design of smart contracts.However,with the continuous increase in the number and scale of smart contracts,the functions of smart contracts have become increasingly complex,leading to various security vulnerabilities in smart contracts.Attackers use these contract vulnerabilities to attack blockchain systems,bringing huge economic losses to people.In the early days,it mainly relied on manual review of code defects in smart contracts,but the time cost of manual review was relatively high.Automated vulnerability detection methods typically have the characteristics of fast detection speed,multiple types of vulnerabilities covered,and low cost.Therefore,it is particularly important to achieve efficient and universal automated detection of smart contract vulnerabilities in response to the security issues existing in smart contracts.This paper analyzes the existing smart contract vulnerability detection technology,summarizes its advantages and disadvantages,and proposes a new automated smart contract vulnerability detection method based on Symbolic Execution technology.(1)Aiming at the problem that path traversal is easy to lead to path explosion in the process of Symbolic Execution,a vulnerability detection method for smart contract automation based on path pruning of control flow chart is proposed.This method takes the source code of the smart contract as input,and compiles the source code through the Ethereum compiler.The compiled EVM bytecode will be disassembled and converted into human-readable operating code.Based on the EVM instruction sequence,the transaction process of the contract will be further analyzed.By defining path critical instructions,a control flow chart is constructed,and a bottom-up path selection method combining depth first and breadth first is used to filter the critical path.Finally,the constraint solver is used to solve the path constraint expressions collected during Symbolic Execution,judge the path reachability through the result of constraint solution,and then determine whether there is a corresponding vulnerability,and finally achieve vulnerability detection.(2)In response to the low efficiency of detecting denial of service vulnerabilities in existing smart contract vulnerability detection schemes,a new vulnerability detection strategy is proposed by analyzing the principle of the generation of denial of service vulnerabilities in smart contracts.At the same time,as constraint solving is an important part of Symbolic execution,the speed of solving symbol expressions can have a direct impact on the running efficiency of dynamic Symbolic execution.Therefore,in this study,before conducting constraint solving,constraints unrelated to vulnerabilities will be identified and removed,and a constraint cache layer will be set up to cache and reuse the constraint solving results during the constraint solving process to reduce repetitive solving operations and improve the solving speed.The ultimate goal is to improve the detection ability of existing smart contract vulnerability detection tools for denial of service vulnerabilities in smart contracts. |