CTFGym Save

List of CTF related to Ethereum world (solidity smart contracts)

Project README

List of CTF in Ethereum world

I'd like to maintain a list of ctf related to solidity smart contracts. (both testnet and mainnet) You have to install Metamask plug-in in your browser.

CTF in Ropsten

CTF in Mainnet

LOCAL CTF

CTF-BOT Resistant

I developed a simple utility contract, OneTimeToken (OTT), for mitigate the issue regard CTF and every contracts where a malicious user or bot could listen on blockchain and wait to find useful info, for instante to discover the input parameters needed to call functions for winning a CTF and create the same transaction with higher gas fees.

The contract OneTimeToken.sol is similar to Ownable.sol developed by OpenZeppelin, but it includes the way to request a token access for a fixed time (15 minutes by default), it also can be changed by contract owner. In this way only the owner of token access can do some sensitive function calls until the token access expired and someone else request it.

Implementation

pragma solidity ^0.5.0;
import 'https://github.com/PumpkingWok/CTFGym/contracts/OneTimeToken.sol';
contract CTF is OneTimeToken {
  function resolveCTF(solution) onlyTokenOwner {
  }
}

Every ctf creator, for instance, could use it in easy way only including ´onlyTokenOwner´ in sensitive functions.

The user that find the solution to the challenge, can call resolveCTF(solution) in safe mode having token access (requestTokenOwner() in OTT).

Resources

Contribute

You feel free to collaborate in any way, it would be much appreciated.

Open Source Agenda is not affiliated with "CTFGym" Project. README Source: PumpkingWok/CTFGym
Stars
107
Open Issues
0
Last Commit
2 years ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating