FCSC 2020 - Enter the dungeon (web)
Web - Enter the dungeon
After looking at the source code we can find the backend source code at : http://challenges2.france-cybersecurity-challenge.fr:5002/check_secret.txt
Following the code we need something as
This should be quite hard to find but not impossible I think. But will take so much time to find a string when md5 hashed give the same string.
However the php comparison operator used is ==
which is a loose comparison, meaning that it compare types before comparing value, for example.
Lot of stuff related to this here : https://owasp.org/www-pdf-archive/PHPMagicTricks-TypeJuggling.pdf
So I wanted to find a string like 0eX
where is X is whatever digit as long as needed and that the md5 of this string starts with 0e
.
And after few minute it found : 0e215962017
and we can verify it before sending it.
flag : FCSC{f67aaeb3b15152b216cb1addbf0236c66f9d81c4487c4db813c1de8603bb2b5b}**