Code Monkey home page Code Monkey logo

fumblechain's Introduction

FumbleChain: A Purposefully Vulnerable Blockchain

Python 3.7+ License: GPL v3

FumbleChain is a deliberately insecure blockchain designed to raise awareness about blockchain security. The FumbleStore is a CTF in the form of a fake e-commerce web application that offers products you can buy using FumbleCoins, the ecosystem's cryptocurrency. Purchasing new products requires players to exploit flaws and steal coins from crypto-wallets.

FumbleChain runs on any Unix-based operating system that has Docker installed.

Why use FumbleChain?

FumbleChain comes with a simple Python3 codebase implementing a Proof-of-work blockchain similar to Bitcoin. It is bundled with 20+ lessons/tutorials to learn about blockchain security, vulnerabilities and exploitation. It is fully dockerized and easy to use. Test your skills by solving the challenges in the FumbleStore. Leverage the embedded blockchain explorer and web or CLI wallet to learn about common blockchain pitfalls.

For more information, visit the FumbleChain microsite at http://fumblechain.io

Requirements

To run the FumbleStore, you will need:

  • Linux or macOS
  • git
  • docker
  • docker-compose

Installing docker

See https://docs.docker.com/install/linux/docker-ce/ubuntu

Installing docker-compose

See https://docs.docker.com/compose/install/

Usage

First, clone the fumblechain repository.

It is important to clone the repository with git because the following steps depend on the git history.

Downloading a zip archive of the master branch will not work.

Then checkout the fumblestore branch.

git clone https://github.com/kudelskisecurity/fumblechain.git
cd fumblechain
git checkout fumblestore

Finally start the CTF with:

cd src/fumblechain
./init_ctf.sh

Startup should take about 3 minutes.

When completed, you can access the CTF interface on http://localhost:20801/

Deploy the FumbleStore publicly (e.g. on mydomain.com)

Follow the same instructions as above.

Except, configure the .env file in the fumblestore branch so that the variable FC_HOST contains the public domain name/ip address of the environment where you deploy the CTF (for example "mydomain.com").

Also make sure to set IS_DOCKER_LOCAL to 0 and HOST_BIND_ADDRESS to 0.0.0.0 or your machine's IP address when deploying the CTF publicly so that it works for clients who connect from another machine. Configure the application as desired by editing the .env file (e.g. enable CAPTCHA for registration).

When done, run ./init_ctf.sh just as above.

Debug mode

To run the FumbleStore in debug mode for development, follow these instructions:

Edit .env so that

DEBUG=1

Edit docker-compose.yml so that he local bind mount for the fumblestore service is active (uncomment the line below the comment that says "# for development")

Disable the captcha (see next section).

CAPTCHA for user registration

When running the FumbleStore as a public instance, you may want to enable CAPTCHA for user registration to avoid spam.

To do so, edit .env so that:

RECAPTCHA_ENABLED=1
RECAPTCHA_SITE_KEY=your_site_key
RECAPTCHA_SECRET_KEY=your_secret_key

Obtain a site key and secret key for reCAPTCHA v2 here:

https://www.google.com/recaptcha/admin/create

Replace your_site_key and your_secret_key in the .env file as shown above with your own site key and secret key that you obtained from the link above.

Contributing

Feel free to open a pull request or report bugs.

Ideas for new challenges or lessons are welcome!

The FumbleStore contains lessons about creating new challenges and new lessons.

Disclaimer

When running this software on your own machine, you may expose yourself to attacks. We cannot guarantee that the software is bug-free. Upon starting the FumbleStore, various background services are started. These services will listen for incoming connections on multiple TCP ports. Proceed with caution and make sure your firewall rules are properly set.

License and Copyright

Copyright(c) 2019 Nagravision SA.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

fumblechain's People

Contributors

amietn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fumblechain's Issues

Recommend changing settings needed when deploying publicly

Previous:
Also make sure to set IS_DOCKER_LOCAL to 0 when deploying the CTF publicly so that it works for clients who connect from another machine.

Change to:
Also make sure to set IS_DOCKER_LOCAL to 0 and HOST_BIND_ADDRESS to 0.0.0.0 or your machine's IP address when deploying the CTF publicly so that it works for clients who connect from another machine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.