๐พ my foundry framework and detailed solutions for each ethernaut level
Last updated May 13, 2025
20
Stars
4
Forks
17
Issues
0
Stars/day
Attention Score
10
Topics
Language breakdown
No language data available.
โธ Files
click to expand
README
๐ง๐ปโ๐ my foundry framework to solve ethernaut: write-ups + solutions
๐ this project contains solutions for openzeppelin's ethernaut wargames. leveraging foundry, each level has a test set (test/.t.sol), a script set (script/.s.sol), and a write-up. some levels also have an exploit at src/*.sol.
๐ to read the full notes about this work, check out my mirror publication: on hacking systematically with foundry. you are welcome to submit solutions and pull requests.
๐ by the way, do you remember overthewire? here is my WeChall profile from playing it in 2014.
levels
โ
01. Fallback - exploiting fallback():
โ
02. Fallout - exploiting constructor():
โ 03. Coin Flip - exploiting pseudo-randomness:
โ
04. Telephone - exploiting tx.origin:
โ 05. Token - exploiting integer overflows:
โ
06. Delegation - exploiting delegatecall:
โ 07. Force - exploiting payable contracts:
โ 08. Vault - exploiting private functions:
โ
09. King - exploiting transfer(msg.value):
โ 10. Reentrancy - exploiting reentrancy:
โ 11. Elevator - exploiting interfaces:
๐ 12. Privacy:
๐ 13. Gatekeeper One:
๐ 14. Gatekeeper Two:
๐ 15. Naught Coin:
๐ 16. Preservation:
๐ 17. Recovery:
๐ 18. Magic Number:
๐ 19. Alien Code:
๐ 20. Denial:
โ 21. Shop - exploiting interfaces II:
๐ 22. Dex:
๐ 23. Dex Two:
๐ 24. Puzzle Wallet:
๐ 25. Motorbike:
๐ 26. Doubly Entry Point:
๐ 27. Good Samaritan:
๐ 28. Gatekeeper Three:
๐ 29. Switch:
installing
- install foundry
- create a
.env(copying from.env.example) and add keys and the addresses of each instance.
foundry.toml (e.g.*, from alchemy or infura)
running each level
- you will find detailed instructions in each write-up, but as a general rule:
- run tests with, for example,
forge test -vvvv, or, for example,
- forge test -vvvv --match-path ./test/01/Fallback.t.sol
- submit scripts with, for example,
forge script ./script/01/Fallback.s.sol --broadcast -vvvv --rpc-url sepolia
(like solving these types of problems? perhaps you are autistic cypherpunk, then?)
๐ More in this category