Smart contract vulnerability detection based on adaptive genetic algorithm
Abstract
In recent years, with the rise of blockchain technology, smart contracts have also rapidly developed and applied in various industries. However, vulnerabilities in smart contracts can lead to serious consequences. When using current fuzz testing tools for vulnerability detection, a large number of test inputs are randomly generated, resulting in low code coverage due to high randomness. To address this issue, we propose a new adaptive genetic algorithm that combines the fuzzy testing process to generate a large number of test cases. We designed a fitness function for evaluating individual strengths and weaknesses in the adaptive genetic algorithm based on branch coverage and data dependency during the detection process. Based on the diversity and effectiveness of the current generated test cases, we dynamically adjusted the crossover and mutation probabilities during the algorithm execution process, gradually optimizing the quality of test cases in multiple testing iterations. According to the experimental results, the method proposed in this article has higher code coverage and vulnerability detection accuracy compared to other tools for detecting contract vulnerabilities.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.