Generering av initiala testfrön för fuzzning av smarta kontrakt
Abstract
Smart contracts are self-executing programs on the blockchain, representing the core of Decentralized Finance (DeFi). They can carry billions of dollars, making their correctness and security essential. However, like any other software application, smart contracts may contain vulnerabilities that can be exploited by malicious adversaries — a concern that is further exacerbated by their immutability and transparent nature. Fuzzing is a widely adopted automated testing approach for assessing and ensuring smart contract quality. Although powerful, its effectiveness heavily depends on the quality of the initial inputs, also referred to as seeds. This thesis identifies a key limitation in traditional smart contract fuzzers, such as Echidna, which often rely on randomly generated seeds. It investigates how these fuzzers can be improved in exploring deep contract states, reaching hard-to-trigger conditional paths, and increasing the number of executed instructions by providing higher-quality initial seeds. This thesis proposes AutumnEchidna, a smart contract pre-processing tool that leverages static analysis to generate optimized initial seeds for fuzzing. The methodology involves generating transaction sequences based on state dependencies and producing arguments through constraint solving, aiming to guide execution toward critical contract states. Experiments are conducted on two datasets: a Motivation Dataset and a Maze Dataset, designed to simulate complex input constraints and deep state transitions. Performance is evaluated based on instruction coverage and execution time under consistent configurations for both baseline Echidna (with random seeds) and AutumnEchidna (with optimized seeds). The experiment results show that AutumnEchidna improves instruction coverage by 1.26% on the aggregated Motivation Dataset and by 4.45% on the aggregated Maze Dataset. Additionally, it also reduces the execution time to achieve comparable or higher coverage. These findings demonstrate that optimized seed generation can enhance both the effectiveness and efficiency of smart contract fuzzing. This thesis concludes that incorporating static analysis to generate high-quality initial seeds is a promising approach for enhancing the performance of fuzzing strategies.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.