/c1b3rwall-2021

Taller titulado "Criptomonedas y Smart Contracts: ¿seguros al 100%?"

Primary LanguageJavaScriptMIT LicenseMIT

Cryptocurrencies and Smart Contracts: 100% secure? - C1b3rwall 2021

This repository contains some examples of vulnerabilities that can be found in Smart Contracts written in Solidity.

This code has been used for the talk "Cryptocurrencies and Smart Contracts: 100% secure?" at the 2021 C1b3rwall Academy.

More information on vulnerabilities can be found in the Smart Contracts directory.

Authors

Dependencies

  • Node v12.22.1
  • Docker

Installation

You can install all the dependencies running npm install.

Scripts

You can run the following script by typing npm run-script <script>.

  • remix-ide: This command starts a Remix IDE instance but locally at http://localhost:8080/.
  • remixd-local: Remixd allows you to conect your localhost with Remix IDE online (https://remix.ethereum.org/).
  • remixd-web: Allows you to conect your localhost with Remix IDE local instance.
  • start_ganache: This command starts a local personal blockchain with Ganache on port 8545.
  • stop_ganache: This command stops Ganache.
  • deploy: This command deploys all the contracts developed in this project.

How to

In order to test these vulnerabilities, perform the following steps.

  1. Install Docker and the project dependencies with npm install.
  2. Build your own personal blockchain with npm run-script start_ganache.
  3. Start your local Remix IDE with npm run-script remix-ide.
  4. Link your localhost with Remix IDE with npm run-script remixd-local.
  5. Deploy the Smart Contracts with npm run-script deploy. This will generate several json files (addresses_<vulnerability>) with the addresses of the different contracts.
  6. Go to http://localhost:8080/, connect to your localhost and ganache, and then instantiate the Contracts at the addresses mentioned above. For more information about Remix IDE, please check this link.
  7. Play with this vulnerabilities and learn 😃.