WebHacking/Load Of Sql Injection
LOS giant
HSr00t
2018. 2. 15. 04:16
1 2 3 4 5 6 7 8 9 10 11 12 | <?php include "./config.php"; login_chk(); dbconnect(); if(strlen($_GET[shit])>1) exit("No Hack ~_~"); if(preg_match('/ |\n|\r|\t/i', $_GET[shit])) exit("HeHe"); $query = "select 1234 from{$_GET[shit]}prob_giant where 1"; echo "<hr>query : <strong>{$query}</strong><hr><br>"; $result = @mysql_fetch_array(mysql_query($query)); if($result[1234]) solve("giant"); highlight_file(__FILE__); ?> | cs |
from옆에 shit변수로 값을 입력받는다.
보자마자 띄어쓰기를 해야되는 문제구나생각이 들었다.
띄어쓰기로는 %09,%0a,%0b,%0c,%0d,%a0,/**/,() 들이있다.
몇개 필터링이 되어있으니 이 중 저 필터링에 걸리지 않는 것을 넣어주면 문제를 풀수있다.