Pedrojok01 / Ethernaut-Solutions

Solutions for all the Ethernaut CTF levels using Foundry.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool



OpenZeppelin Ethernaut Solutions



Description

This repository contains the solutions for the Ethernaut CTF challenges from OpenZeppelin. The Ethernaut is a Web3/Solidity based wargame inspired by overthewire.org. Each level is a smart contract that needs to be hacked in order to advance to the next level. The challenges are designed to teach the basics of smart contract security and the vulnerabilities that can be found in Solidity code.

  • The challenges folder contains all the initial Ethernaut smart contracts.
  • The solutions folder contains the explanations to understand how to beat each level.
  • The src folder contains the solutions for each level (solidity and/or scripts in the browser console).
  • The script folder contains the scripts to deploy the solutions contained in the src folder.
  • The helpers folder contains some older OpenZeppelin contracts that are needed to compile the challenges.
  • The test folder contains tests for some levels.

Tutorial

await contract.password()
await contract.authenticate("ethernaut0")
FORK_URL=https://eth-sepolia.g.alchemy.com/v2/{API_KEY}
forge test -vvvv --fork-url $FORK_URL --match-path test/13_GateKeeperOne.test.sol

Solutions

About

Solutions for all the Ethernaut CTF levels using Foundry.


Languages

Language:Solidity 100.0%