Designing and Implementing Educational Exercises for Exploring Smart Contract Vulnerabilities

Návrh a implementace vzdělávacích cvičení pro zkoumání zranitelností chytrých kontraktů

Research Projects

Organizational Units

Journal Issue

Abstract

S rozvojem kryptoměn v poslední dekádě získal blockchain pozornost akademické obce, průmyslu i veřejnosti. Některé blockchainy podporují Turingovsky úplné programy známé jako chytré kontrakty, které umožňují vývojářům vytvářet komplexní decentralizované aplikace pomocí vyšších programovacích jazyků. Tato práce se zabývá studiem zranitelností chytrých kontraktů, jejich prevencí a mitigací. Jsou studovány a shrnuty časté zranitelnosti v jazyce Solidity a na Ethereum blockchainu. Je vytvořen podrobný přehled těchto zranitelností, včetně konkrétních příkladů, strategií prevence a metod detekce. Praktická část práce se zaměřuje na implementaci série praktických vzdělávacích cvičení pro studenty, umožňujících jim experimentovat s těmito zranitelnostmi v kontrolovaném prostředí. V rámci této práce byla implementována série devíti praktických cvičení, která dohromady obsahují 23 úloh, v nichž mohou studenti experimentovat s reentrancy útoky, s útoky s využitím flash loans, s manipulací cenových orákulů, se slabinami v řízení přístupu, s útoky typu odepření služby, s problémy náhodnosti, s aritmetickými chybami, s frontrunningem a sandwich útoky, s unit testy a fuzzingem a dalšími koncepty.

With the significant rise of cryptocurrencies in recent years, blockchain technologies have gained attention from academia, industry, and the public. Some blockchain platforms support Turing-complete programs known as smart contracts, which allow developers to create complex decentralized applications using high-level programming languages. This thesis addresses the study of smart contract vulnerabilities, their prevention, and their mitigation. The most common vulnerabilities in the Solidity language and the Ethereum platform are examined and summarized. This work provides a detailed overview of these vulnerabilities, including specific examples, prevention strategies, and detection methods. The practical component of the thesis focuses on implementing a series of hands-on educational exercises for students, allowing them to experiment with these vulnerabilities in a controlled environment. Within this work, a series of nine practical exercises was implemented, collectively containing 23 tasks and challenges in which students can experiment with reentrancy attacks, flash loan attacks, price oracle manipulation, access control weaknesses, denial-of-service attacks, insecure randomness problems, arithmetic errors, frontrunning, sandwich attacks, unit testing, fuzzing, and other concepts.

Description

Citation

Endorsement

Review

Supplemented By

Referenced By