This repository provides a template for building Capture The Flag (CTF) challenges focused on blockchain technology. It leverages Flask for the backend and Web3.py to interact with Ethereum-based smart contracts.
-
Clone the repository:
git clone https://github.com/KindKillerwhale/Blockchain-CTF-Template.git
-
Set the
Example.sol
in thecontacts
folder. -
Set the
docker-compose.yml
andDockerfile
. -
Set RPC_URL in
app.py
. -
Set the ex.py.
-
Docker RUN and TEST~!
※ Transaction must conform to the legacy format (including gasPrice
option)
- Currently, an account is created through ganache in
docker-compose.yml
and files containing account information are shared in docker volume, but there is a limitation in that the number of accounts is finite. This is inefficient both in terms of performance and capacity. Therefore, when you are asked for the/info
method atapp.py
, you should change it to create an account immediately. - The code of
app.py
needs to be neatly overhauled. - When requested, it is necessary to adopt a method of setting a time limit so that the request cannot be made indefinitely. It is necessary to implement a PoW or a method of hanging timeout.