As we’ve finished the previous web challenge, let’s jump into the next one called md5.
From the start we’re getting the source code of the challenge.
What can we get from it? First condition that will make us closer to the flag is that both fields should be filled.
After that, we have to make sure that our values are different from each other.
And we the hashes should be the same in order to get the flag.
If all condtions are met, then we will be able to get the flag. But how should be able to do it with two different characters producing the same hash? Type juggling is not an option here, as it’s using the strict comparision while comparing hashes so we have to look for something else. Remebering the Spot The Bug challenge, where the vulnerability was in supplying the array, we can have this in mind.
First condition will be met, as the both arrays will be inputted. After that we have to place different inputs in the arrays as only then the second condition will be met. But what will happen when we concatenate string with an array just as here $salt . $_GET["str1"].
As you can see, we get the same results. And that’s how we’re going to exploit this challenge.
Look at the url, and look at the flag.
If you have any suggestions regarding this post or just want to chat together check out these ways to reach out to me.