Secureum A-MAZE-X Maison de la Chimie Paris

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 Summitarrow-up-right as part of Defi Security 101arrow-up-right

Built with love by eugenioclrcarrow-up-right, luksgrinarrow-up-right, PeterisPrieditisarrow-up-right, RomiRandarrow-up-right and misirovarrow-up-right Special thanks to patrickdarrow-up-right, StErMiarrow-up-right, tinchoabbatearrow-up-right and Rajeevarrow-up-right for reviewing, commenting and helping during the elaboration and design of this CTF Workshop


\

Contents

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 Gitpodarrow-up-right


\

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

\

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

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

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

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

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 troubleshootingarrow-up-right.

\

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

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

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

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:


Challenges ๐ŸŽฎ


Slides

Find the slides of the event's presentation herearrow-up-right.


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

Writeups will be available after the event

SOLUTIONSarrow-up-right

Last updated