Solutions to the Ethernaut CTF by OpenZeppelin — a hands-on platform for learning smart contract security through real vulnerabilities.
Ethernaut is a war game that teaches Ethereum smart contract security through practical challenges.
This repository documents:
- Solutions to each level using Foundry
- Exploit scripts with documented methodology
- Vulnerability breakdowns from first principles
- Real-world attack patterns and their implications
- Solidity
- Foundry (Forge)
- EVM (Opcodes, Storage, Memory)
- Git & GitHub
├── src/ # Challenge contracts
├── script/ # Exploit scripts (Foundry)
├── lib/ # Dependencies (forge-std, OpenZeppelin)
├── foundry.toml
└── README.md
forge build
forge script script/<LevelSolution>.s.sol \
--rpc-url <RPC_URL> \
--private-key <PRIVATE_KEY> \
--broadcast \
--tc <ContractName> -vvvvThis repository is for educational purposes only. All exploits are performed on CTF environments.
Open to conversations on Web3 security, smart contract auditing, and CTFs.
If you find this useful, consider starring the repository.