-
LOS wolfmanWebHacking/Load Of Sql Injection 2018. 2. 13. 19:291234567891011121314<?phpinclude "./config.php";login_chk();dbconnect();if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~");if(preg_match('/ /i', $_GET[pw])) exit("No whitespace ~_~");$query = "select id from prob_wolfman where id='guest' and pw='{$_GET[pw]}'";echo "<hr>query : <strong>{$query}</strong><hr><br>";$result = @mysql_fetch_array(mysql_query($query));if($result['id']) echo "<h2>Hello {$result[id]}</h2>";if($result['id'] == 'admin') solve("wolfman");highlight_file(__FILE__);?>
cs쿼리문으로 id가 admin일때와 and연산자를 이용하여서 패스워드를 알아낼수있다.
파이썬 코드는 전 단계 코드에서 조금만 수정하면 된다.
'WebHacking > Load Of Sql Injection' 카테고리의 다른 글
LOS orge (0) 2018.02.13 LOS darkelf (0) 2018.02.13 LOS orc (0) 2018.02.13 LOS goblin (0) 2018.02.13 LOS cobolt (0) 2018.02.13