Recopilation of Ethernaut DAO's weekly challenges.
- Clone this repo.
- Complete the challenges on
./test/
. - Verify the result running
yarn test
.
Goal: Take ownership of the contract.
Challenge File here
Run it with yarn private-data
You can access all the contract storage even though some slots are marked as private there is no private data onchain actually.
Using ethers.js and calling ethers.provider.getStorageAt(target.address, 8)
we can get the secretKey value and use it by calling takeOwnership
and taking ownership of it.
Goal: Add ourselves to the list of owners.
Challenge File here
Run it with yarn wallet
Goal: Be able to mint and own two cars.
Challenge File here
Run it with yarn car-market
There are two different balances. On the flashLoan function the balance sent to the caller is market balance (through delegatecall) but the validation is being made using the factory balance. So, you can get all market balance for free and purchase a second car using it.
Goal: To drain all the balance from the contract.
Challenge File here
Run it with yarn vending-machine
Challenge File here
Run it with yarn ethernaut-dao-token
Challenge File here
Run it with yarn hackable
Challenge File here
Run it with yarn switch
Challenge File here
Run it with yarn vulnerable-nft