Enhancing Manually Guided Fuzz Testing with Fuzz Shrinking for EVM Smart Contracts
Rozšíření manuálního fuzz testování o minimalizaci fuzz testů pro EVM chytré kontrakty
Authors
Supervisors
Reviewers
Editors
Other contributors
Journal Title
Journal ISSN
Volume Title
Publisher
České vysoké učení technické v Praze
Czech Technical University in Prague
Czech Technical University in Prague
Date of defense
2025-06-23
Abstract
Testování bezpečnosti smart kontraktů čelí značným výzvám při ladění a analýze problémů odhalených při ručně řízeném fuzzingu. Tento přístup k testování sice účinně vyhledává zranitelnosti, ale výsledné testovací případy často obsahují stovky nebo tisíce kroků, takže ladění a analýza příčin jsou časově náročné a složité. V této práci představujeme Fuzz Shrink v ručně řízeném fuzzingu, nový přístup k automatické minimalizaci testovacích případů při zachování jejich schopnosti vyvolat chybu. Implementujeme vícefázový zmenšovací algoritmus, který kombinuje odstraňování typu flow a postupné zmenšování, podporované efektivní architekturou správy stavů, která zpracovává jak stavy EVM, tak stavy běhu Pythonu. Naše implementace v rámci Wake vykazuje míru redukce velikosti testovacího při zachování schopnosti reprodukce chyb. Náš přístup významně zkracuje dobu ladění z hodin na minuty u různých protokolů smart kontraktů, přičemž praktická vyhodnocení ukazují zlepšení efektivity pracovních postupů ladění. Prostřednictvím systematického hodnocení s využitím reálných protokolů a komplexních případových studií demonstrujeme, jak Fuzz Shrink řeší neefektivitu ladění v pracovních postupech testování smart kontraktů, čímž přispívá ke spolehlivějším a bezpečnějším blockchain systémům.
Smart contract security testing faces significant challenges in debugging and analyzing issues discovered through manually-guided fuzzing. While this testing approach effectively finds vulnerabilities, the resulting test cases often contain hundreds or thousands of steps, making debugging and root cause analysis time-consuming and complex. In this thesis, we present the integration of fuzz shrinking techniques into manually-guided fuzzing for smart contracts, adapting and enhancing existing shrinking approaches for stateful blockchain testing. We implement a specialized multi-phase shrinking algorithm that combines flow-type removal and step-by-step reduction, supported by an efficient state management architecture handling both EVM and Python runtime states. Our implementation in the Wake framework demonstrates reduction in test case size while maintaining bug reproduction capability. Our approach significantly reduces debugging time from hours to minutes across various smart contract protocols, with practical evaluations showing improvements in debugging workflow efficiency. Through systematic evaluation using real-world protocols and comprehensive case studies, we demonstrate how our adapted shrinking approach addresses the debugging inefficiencies in smart contract testing workflows, contributing to more reliable and secure blockchain systems.
Smart contract security testing faces significant challenges in debugging and analyzing issues discovered through manually-guided fuzzing. While this testing approach effectively finds vulnerabilities, the resulting test cases often contain hundreds or thousands of steps, making debugging and root cause analysis time-consuming and complex. In this thesis, we present the integration of fuzz shrinking techniques into manually-guided fuzzing for smart contracts, adapting and enhancing existing shrinking approaches for stateful blockchain testing. We implement a specialized multi-phase shrinking algorithm that combines flow-type removal and step-by-step reduction, supported by an efficient state management architecture handling both EVM and Python runtime states. Our implementation in the Wake framework demonstrates reduction in test case size while maintaining bug reproduction capability. Our approach significantly reduces debugging time from hours to minutes across various smart contract protocols, with practical evaluations showing improvements in debugging workflow efficiency. Through systematic evaluation using real-world protocols and comprehensive case studies, we demonstrate how our adapted shrinking approach addresses the debugging inefficiencies in smart contract testing workflows, contributing to more reliable and secure blockchain systems.
Description
Citation
Underlying research data set URL
Permanent link
Rights/License
Vysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem v platném znění.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.
A university thesis is a work protected by the Copyright Act of the Czech Republic. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one`s own expense. The use of thesis should be in compliance with the Copyright Act.