All Projects → chainflag → eth-challenge-base

chainflag / eth-challenge-base

Licence: MIT license
xinetd docker for building ethereum contract challenges

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects
solidity
1140 projects
Makefile
30231 projects

Projects that are alternatives of or similar to eth-challenge-base

bamboofox-website
☕ Bamboofox CTF training platform
Stars: ✭ 21 (-71.62%)
Mutual labels:  ctf, ctf-framework, ctf-challenges
solveme
SolveMe - Jeopardy CTF Platform
Stars: ✭ 51 (-31.08%)
Mutual labels:  ctf, ctf-framework, ctf-challenges
jerseyctf-2021-challenges
JerseyCTF 2021
Stars: ✭ 22 (-70.27%)
Mutual labels:  ctf, ctf-challenges
2017-quals
Tasks from CTFZone 2017 quals
Stars: ✭ 13 (-82.43%)
Mutual labels:  ctf, ctf-challenges
obsidian
Writeups for CTF challenges.
Stars: ✭ 47 (-36.49%)
Mutual labels:  ctf, ctf-challenges
2020p
WeCTF 2020+ Source Code & Organizer's Writeup
Stars: ✭ 22 (-70.27%)
Mutual labels:  ctf, ctf-challenges
fhq-server
This is an open source platform for competitions of computer security.
Stars: ✭ 33 (-55.41%)
Mutual labels:  ctf, ctf-challenges
My-CTF-Challenges
🏴 🏴 🏴
Stars: ✭ 65 (-12.16%)
Mutual labels:  ctf, ctf-challenges
My-PWN-Life
This is a PWN challenges repo.###### 1f y0u l1ke, g1v3 m3 a star~
Stars: ✭ 23 (-68.92%)
Mutual labels:  ctf, ctf-challenges
CTF-Game
Capture the flag Game
Stars: ✭ 14 (-81.08%)
Mutual labels:  ctf, ctf-framework
Fbctf
Platform to host Capture the Flag competitions
Stars: ✭ 6,407 (+8558.11%)
Mutual labels:  ctf, ctf-framework
ctf4noobs
Resumão da massa sobre Capture the Flag.
Stars: ✭ 18 (-75.68%)
Mutual labels:  ctf, ctf-challenges
flare-on-challenges
Write-ups for FireEye's FLARE-On challenges
Stars: ✭ 24 (-67.57%)
Mutual labels:  ctf, ctf-challenges
CTF-Script-And-Template-Thrift-Shop
[180+ scripts] There are a few genuine gems in there. And a lot of spaghetti code. Most of these scripts were for solving CTF's. If you googles something for a CTF and landed here look at the scripts they're all fairly malleable. Sorry for the shitty naming conventions (not really). If you are a recruiter stop. I wont be able to rewrite half thi…
Stars: ✭ 38 (-48.65%)
Mutual labels:  ctf, ctf-challenges
Auto-AWD
🚩 CTF AWD framework
Stars: ✭ 24 (-67.57%)
Mutual labels:  ctf, ctf-framework
CTF-Challenges
Capture the flag challenges
Stars: ✭ 41 (-44.59%)
Mutual labels:  ctf, ctf-challenges
Privilege Escalation
This cheasheet is aimed at the CTF Players and Beginners to help them understand the fundamentals of Privilege Escalation with examples.
Stars: ✭ 2,117 (+2760.81%)
Mutual labels:  ctf, ctf-challenges
exploiting
Exploiting challenges in Linux and Windows
Stars: ✭ 122 (+64.86%)
Mutual labels:  ctf, ctf-challenges
factordb
RSA primes numbers /RSA/CTFs
Stars: ✭ 42 (-43.24%)
Mutual labels:  ctf, ctf-challenges
YuktiCTF
A Game platform to spread awareness among school and university students about various cyber attacks.
Stars: ✭ 11 (-85.14%)
Mutual labels:  ctf, ctf-framework

eth-challenge-base

Docker CI Docker size Latest tag License: MIT

xinetd docker for building ethereum contract challenges in capture the flag (CTF).

Getting Started

Quick Demo

Use the following command to run a quick demo:

docker run -it -p 20000:20000 -e WEB3_PROVIDER_URI=https://rpc.sepolia.org chainflag/eth-challenge-base
nc 127.0.0.1 20000

Usage

Create challenge project based on example

  • The contracts directory is where you should code the challenge contract, specifically, you need to implement isSolved() function to check if it is solved.
  • The challenge.yml file is the config for specifying challenge description, flag, contract name, constructor, gas limit etc. Refer to the comments in this file for more details.
  • The .env file is used to set environment variables of docker container, including web3 provider, token secret and proof of work difficulty.

You can build multi-contract challenges by deploying contracts in a setup contract's constructor

Start serving your contract challenge

Use the following command to start serving the 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.3

Alternatively, you can use docker-compose:

docker-compose up -d

Advance

Use private PoA Ethereum network as challenge environment

  1. Launch an anti-plagiarism PoA network by following the instructions here.
  2. Keep the web3 provider defaults in the .env file.
  3. 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.3

Development

Prerequisites

Before you start, make sure you have the following installed:

  • Docker
  • Python3
  • Required packages (pip install -r requirements.txt)

Run in development mode

  1. Generate protobuf code and run server
make protoc
export WEB3_PROVIDER_URI="your web3 provider"
make dev
  1. Open another terminal to run client
python run.py

Format python source

To format the Python source code, you will need to install additional packages (pip install -r requirements-dev.txt) and run the following command:

make format

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].