题目

点进题目

调整一下

进行代码审计,先看第一段
if(isset($_GET['gg'])&&isset($_GET['id'])) {
    $id=$_GET['id'];
    $gg=$_GET['gg'];
    if (md5($id) === md5($gg) && $id !== $gg) {
        echo 'You got the first step';get参数传参,后判断md5后的值是否相等,这里为===强等于,可以将参数设置为数组进行绕过,若是双等号弱等于,可以找两个md5加密后开头都是0e的参数进行绕过(会被认为是科学计数法)
构造payload
?gg[]=1&id[]=2

 if(isset($_POST['passwd'])) {
            $passwd=$_POST['passwd'];
            if (!is_numeric($passwd))
            {
                 if($passwd==1234567)
                 {
                     echo 'Good Job!';
                     highlight_file('flag.php');
                     die('By Retr_0');
                 }
                 else
                 {
                     echo "can you think twice??";
                 }
            }
            else{
                echo 'You can not get it !';
            }
        }
        else{
            die('only one way to get the flag');
        }
}
    else {
        echo "You are not a real hacker!";
    }
}
else{
    die('Please input first');
}用post传参password,使用了is_numeric判断是否是数字,若判断不是数字,就判断是否为1234567,这里需要绕过is_numeric
构造payload
passwd=1234567%00
得到flag




















