Giter Club home page Giter Club logo

amazex-dss-paris's Introduction

Secureum A-MAZE-X Maison de la Chimie, DeFi Security Summit

A Smart Contract Security Capture the Flag Workshop

A-MAZE-X-Stanford-LOGO *Hosted by Defi Security Summit as part of Defi Security 101*
Built with love by eugenioclrc, luksgrin, PeterisPrieditis, RomiRand and misirov
Special thanks to patrickd, StErMi, tinchoabbate and Rajeev for reviewing, commenting and helping during the elaboration and design of this CTF Workshop



Contents

  1. Instructions ๐Ÿ•น๏ธ
  2. Challenges ๐ŸŽฎ
  3. CTF Writeup ๐Ÿ—’๏ธ๐Ÿ—’๏ธ๐Ÿ—’๏ธ

Instructions ๐Ÿ•น๏ธ

This Workshop consists in a series of challenges, of increasing difficulty, targeting different concepts and common vulnerabilities found in DeFi. The CTF consists of a series of challenges suitable for different levels of expertise.



Flavors

This workshop provides different flavors. Feel free to use the one you feel more comfortable with:

  • Option 1: Locally with Foundry
  • Option 2: Online through Gitpod, using Foundry Open in Gitpod


Important note

This set of challenges aren't set for competitive purposes. Their main objective is to showcase scenarios involving DeFi, Solidity concepts and common vulnerabilities.

Focus on learning and having fun! ๐Ÿ˜Š


How to play โ™˜

This challenge is thought for users who are very familiar with Solidity and do not want to use additional languages. The following setup tutorial will guide you through the installation of Foundry and its setup.


Clone this repository

Run the command below to clone this repository into your local machine

git clone https://github.com/secureum/AMAZEX-DSS-PARIS.git
cd AMAZEX-DSS-PARIS

Install Foundry (if you don't have Foundry already installed)

Run the command below to get foundryup the Foundry toolchain installer:

curl -L https://foundry.paradigm.xyz | bash

Then, in a new terminal session (or after reloading your PATH environmental variable), run foundryup to get the latest forge and cast binaries:

foundryup

And finally, install the repository's dependencies by entering it and running:

forge install

Note that you might have to restart your terminal for the forge command to become available.

At this point you should be all set. If not, check Foundry's installation troubleshooting.


Solving a challenge

Challenge contracts are located in the subdirectories of the src/ directory. Do not modify them, as it may lead to unexpected behaviors within the challenges.

To solve a challenge, you must open the corresponding test/ChallengeX.t.sol (where X is a number) and add your exploit code in the signalized areas within said file.

Then, to check if the challenge has been solved, execute the following command

forge test --match-path test/ChallengeX.t.sol

If the solution criteria have been reached, it shall display the following message

Running 1 test for test/ChallengeX.t.sol:ChallengeXTest
[PASS] testChallenge() (gas: XXXX)
Test result: ok. 1 passed; 0 failed; finished in XXXms

Alternatively, to check if all challenges have been solved, execute the following command:

bash isSolved.sh

which will return the test results for all challenges in order.

If one wishes to have a more detailed prompt (i.e. to see the logged messages), it is necessary to increase the verbosity with -vvvv, for example:

forge test --match-path test/ChallengeX.t.sol -vvvv

Challenges ๐ŸŽฎ


Slides

Find the slides of the event's presentation here.


CTF Writeup ๐Ÿ—’๏ธ๐Ÿ—’๏ธ๐Ÿ—’๏ธ

Writeups will be available after the event

SOLUTIONS

amazex-dss-paris's People

Contributors

luksgrin avatar jaybuidl avatar

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.