eth-challenge-base
xinetd docker for building ethereum contract challenges in capture the flag (CTF).
Getting Started
Quick Demo
docker run -it -p 20000:20000 -e WEB3_PROVIDER_URI=https://ropsten.infura.io/v3/YOUR-PROJECT-ID chainflag/eth-challenge-base
nc 127.0.0.1 20000Usage
Create challenge project based on example
contractsis the challenge contract directory, you should code isSolved() function for the contract to check if it is solvedchallenge.ymlis the config for specifying challenge description, flag, contract name, constructor, gas limit etc. See comments in this file for more detail.envis used to set environment variables of docker container, including web3 provider, token secret and proof of work difficulty
Environment variable defaults
| Name | Default Value |
|---|---|
| TOKEN_SECRET | openssl rand |
| POW_DIFFICULTY | 0(no proof of work) |
You can build multi-contract challenges by deploying contracts in a setup contract's constructor
Start serving your contract challenge
docker run -d -p 20000:20000 --env-file .env -v `pwd`/contracts:/home/ctf/contracts -v `pwd`/challenge.yml:/home/ctf/challenge.yml chainflag/eth-challenge-base:0.9.3or
docker-compose up -dAdvance
Use private PoA Ethereum network as challenge environment
- Launch an anti-plagiarism PoA network by referring here
- Keep the web3 provider defaults in the
.envfile - Run the docker container using the following command
docker run -d -p 20000:20000 --network geth_default --env-file .env -v `pwd`/contracts:/home/ctf/contracts -v `pwd`/challenge.yml:/home/ctf/challenge.yml chainflag/eth-challenge-base:0.9.3Development
Prerequisites
- Python3
- Packages
pip install -r requirements.txtRun in dev mode
python develop.pyFormat python source
pip install -r requirements-dev.txt
make formatLicense
Distributed under the MIT License. See LICENSE for more information.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
