All Projects → chainflag → ctf-eth-env

chainflag / ctf-eth-env

Licence: MIT license
Moved to https://github.com/chainflag/eth-challenge-base/tree/main/geth

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ctf-eth-env

ctf-gameserver
FAUST Gameserver for attack-defense CTFs
Stars: ✭ 38 (+26.67%)
Mutual labels:  ctf
cheezyverse
Cheeze Wizards is the world's first battle royale on the blockchain (with cheese!)
Stars: ✭ 38 (+26.67%)
Mutual labels:  smart-contracts
awesome-smart-contracts
Awesome Ethereum Projects List
Stars: ✭ 35 (+16.67%)
Mutual labels:  smart-contracts
lamden
A Performant Blockchain that Isn't Confusing
Stars: ✭ 116 (+286.67%)
Mutual labels:  smart-contracts
contracts
Neufund and platform smart contracts
Stars: ✭ 23 (-23.33%)
Mutual labels:  smart-contracts
solidstate-solidity
💠 Upgradeable-first Solidity smart contract development library 💠
Stars: ✭ 264 (+780%)
Mutual labels:  smart-contracts
CTF-CryptoTool
CTF-CryptoTool is a tool written in python, for breaking crypto text of CTF challenges. It tries to decode the cipher by bruteforcing it with all known cipher decoding methods easily. Also works for the cipher which does not have a key.
Stars: ✭ 38 (+26.67%)
Mutual labels:  ctf
eth-decoder
Simple library to decode ethereum transaction and logs
Stars: ✭ 32 (+6.67%)
Mutual labels:  smart-contracts
learning-solidity-2018
Basic examples of Solidity smart contracts
Stars: ✭ 92 (+206.67%)
Mutual labels:  smart-contracts
juice-shop
OWASP Juice Shop: Probably the most modern and sophisticated insecure web application
Stars: ✭ 7,533 (+25010%)
Mutual labels:  ctf
erc721-extensions
A set of composable extension contracts for the OpenZeppelin ERC721 base contracts.
Stars: ✭ 157 (+423.33%)
Mutual labels:  smart-contracts
decrypt-qq1790749886-javanet
解密 qq1790749886/javanet 文件
Stars: ✭ 19 (-36.67%)
Mutual labels:  ctf
write-up
😼 CTF write-ups
Stars: ✭ 131 (+336.67%)
Mutual labels:  ctf
avast-ctf-cambridge-2018
🎖 A complete write-up of the Avast challenge given at Hack Cambridge 2018
Stars: ✭ 16 (-46.67%)
Mutual labels:  ctf
ctf-writeups
📚 Yet another CTF writeups repository. PWN and RE tasks
Stars: ✭ 29 (-3.33%)
Mutual labels:  ctf
solidity-unfolder
A Python package to flatten Solidity code with imports into a single file
Stars: ✭ 19 (-36.67%)
Mutual labels:  smart-contracts
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (+273.33%)
Mutual labels:  smart-contracts
penelope
Penelope Shell Handler
Stars: ✭ 291 (+870%)
Mutual labels:  ctf
tmpleak
Leak other players' temporary workspaces for ctf and wargames.
Stars: ✭ 76 (+153.33%)
Mutual labels:  ctf
ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (-50%)
Mutual labels:  smart-contracts

ctf-eth-env

Private PoA Ethereum Network for CTF Challenges.

The solution is to use Nginx as a reverse proxy and set up the whitelist of Ethereum RPC methods by using njs for access control to the upstream private Proof-of-Authority Ethereum network, and thus implement an anti-plagiarism server-side environment.

Background

It is unfair that some CTF blockchain challenge players can cheat by searching back the blockchain history, where all the transactions of those who have solved the challenges are recorded. These dishonest players can solve the challenges simply by replaying the transactions. The root cause of this problem is that all data in the permissionless blockchain is public and everyone can fetch it by querying the specified RPC methods.

So the idea of this project is to disable several RPC methods (e.g. eth_getBlockByHash, eth_getBlockByNumber) of an Ethereum node and then use it as the challenge server-side environment. In this way, players on the client side have no longer any access to the transaction IDs of others.

Usage

  1. Clone the repository and navigate to current directory
git clone https://github.com/chainflag/ctf-eth-env.git
cd ctf-eth-env
  1. Create a sealer account
docker run -it --rm  -v `pwd`/config:/root/.ethereum ethereum/client-go account new
echo "your keystore password" > `pwd`/config/password.txt
  1. Generate genesis config
$ go install github.com/ethereum/go-ethereum/cmd/puppeth@latest # or download Geth & Tools from https://geth.ethereum.org/downloads/
$ puppeth
Please specify a network name to administer (no spaces, hyphens or capital letters please)
> genesis
What would you like to do? (default = stats)
 1. Show network stats
 2. Configure new genesis
 3. Track new remote server
 4. Deploy network components
> 2
What would you like to do? (default = create)
 1. Create new genesis from scratch
 2. Import already existing genesis
> 1
Which consensus engine to use? (default = clique)
 1. Ethash - proof-of-work
 2. Clique - proof-of-authority
> 2
How many seconds should blocks take? (default = 15)
>
Which accounts are allowed to seal? (mandatory at least one)
> 0x # Enter the account address created in the previous step
Which accounts should be pre-funded? (advisable at least one)
> 0x # Enter the account address created in the previous step
Should the precompile-addresses (0x1 .. 0xff) be pre-funded with 1 wei? (advisable yes)
> no
Specify your chain/network ID if you want an explicit one (default = random)
>
What would you like to do? (default = stats)
 1. Show network stats
 2. Manage existing genesis
 3. Track new remote server
 4. Deploy network components
> 2
 1. Modify existing configurations
 2. Export genesis configurations
 3. Remove genesis configuration
> 2
Which folder to save the genesis specs into? (default = current)
  Will create genesis.json, genesis-aleth.json, genesis-harmony.json, genesis-parity.json
> config
  1. Run docker container
docker-compose up -d

Open Ports

Service Port
json-rpc with whitelist 8545
ether faucet 8080

Related Project

License

The MIT License (MIT)

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].