Ethical Hacking for Smart Contracts: Preventing Attacks and Securing Blockchain Code
1h 3mIntermediate2023-07-27
Authors

Michael Fawole
Course details
Just like any software, smart contracts—code written into a blockchain that executes the terms of an agreement or contract from outside the chain—are susceptible to attacks, bugs, and coding errors. In this course, Michael Fawole, a blockchain developer and coach, shows you how to avoid serious problems with smart contracts—like financial losses and theft of assets—by employing ethical hacking. Michael shows you complexities of the most predominant attack in Web3—the reentrancy attack—and demonstrates how to prevent and guard against it as an ethical hacker. He shows you how to write vulnerability-free smart contracts, re-enter both simple and complex smart contracts, manipulate the arithmetical flow of contracts, and use ethical hacking techniques to test contract security—and prevent attacks from happening in the first place.
Skills covered
CryptocurrencySecurity TestingFinance and AccountingCybersecurityLearningData Science
Concepts
Introduction
- Hacking the blockchain - Smart contracts
- What you need to know
Smart Contract Ethical Hacking Overview
- What is smart contract ethical hacking
- Types of smart contract attacks
- Why do you need smart contract ethical hackers
- How can you become a smart contract ethical hacker
Background Knowledge
- What is reentrancy attack
- Working with Remix
Vulnerable Smart Contracts
- Creating a vulnerable contract
- Deploying contracts in Remix
- Challenge - Create your own vulnerable contract and rename it
- Solution - Create your own vulnerable contract and rename it
Creation and Deployment of Attack Contract
- Creation of attack contract - Part 1
- Creation of attack contract - Part 2
- Deploying the attack contract
Preventing Reentrancy Attacks
- Methods for preventing reentrancy
- Preventing reentrancy - Practical application
- Challenge - Protect a contract using reentrancy guard
- Solution - Protect a contract using reentrancy guard
Conclusion
- Conclusion