I came across a CTF that i'm trying to solve, the goal is fairly simple: Bypass the authentication form and access the admin-restricted area. You can find the code snippet below.
Things to consider:
- The CTF is a simulation and a demonstration for a very old PHP bug (before year 2007), meaning the code running in the server is slighlty different from the one given.
- A hint (not verified) one of the functions is vulnerable in PHP 5.1
How can I bypass the authentication form?
I read all the changelogs for PHP 4.x and PHP 5.x, and I could not spot any bug that may help me bypass the authentication form. I'm not asking for a working exploit or anything just point me to the right direction as it is an outdated bug and I can't find any resources online at this point.
$x = md5($in); unset($x); // somehow $x must not be unset and $in could be only a string nothing else. And Yes i looked into the CVE and I could not find an entry for that matter. FYI this CTF is classed extremly hard, and is my last one and I did all of the rest.ifstatement to evaluate tofalse, so that it doesn't executeunset($pwd);?