Last week, when feed my brain with CTF, i face a web challenge. Luckily, with the help from my friend, i solve it. This challenge may be easy, but with me, it is interesting and i study something. So, tonight, i spend my gaming time to explain about this.
My English is terrible, however, i will try with my best.
This challenge give us the url to the web page which have written by php. For personal reason, i can’t show it here.
Here we go, after viewing source, i discover the piece of backend code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
As you see, to solve this challenge, we have to find a value
, which is not ecTmZcC
but its crc32 is equal to ecTmZcC
’s crc32 :|
Seem like crazy, right ?
Or you can think more positive: is something wrong with ==
in php (php is famous for that) ?
The key is Magic Hash
ecTmZcC
’s crc32 is 0e730435
. So, we must calculate a value which has crc32 hash similar ‘0eXXXXXX’ (X is numeric).
I write a Python script to find it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Finally, we have the answer: 6586 and got flag :D