W4RG4M3/W3B
[Suninatas] 써니나타스 6번 문제 풀이
HackChang
2020. 7. 31. 12:37
이번 문제도 웹이다. 써니나타스는 웹이 초반에 몰려있는 느낌이다.
문제를 눌렀더니 게시판이 나왔다.
살펴보도록 하겠다.
힌트라는 글의 내용이다. 힌트라고 하니 메모장에 적어두도록 하겠다.
글을 하나 씩 눌러보다가 README파일에서 아래와 같은 창이 출력됐다.
간단하게 sql 인젝션을 해보려고 했지만,
'or 1=1'을 입력했고, 문자에 대한 필터를 하고있는 것 같았다.
1을 필터하는 느낌에 2>1로 참을 만들어서 sql인젝션을 시도해봤다.
'or 2>1 --'
이런 메세지가 출력됐다.
이렇게 README 글에 들어갈 수 있었다.
우리가 얻은 것은 auth_key인데 인증을 했지만, 인증되지 않았다.
해당 페이지의 소스를 보도록 하자.
<!DOCTYPE html>
<html>
<head>
<title>Game 06</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="shortcut icon" href="/static/img/game.ico" />
</head>
<body>
<table width="100%" cellpadding="0" cellspacing="0">
<form method="post" name="KEY_HINT" action="Rome's First Emperor">
<tr>
<td align="center">
<table cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<table cellpadding="0" cellspacing="0" style="padding-bottom: 10">
<tr>
<td>
<input type="button" name="main_btn" value="main" class="btn_check" style="width: 60px" onclick="location.href = '/';"> <input type="button" name="main_btn" value="Back" class="btn_check" style="width: 60" onclick="location.href = 'web06.asp';">
</td>
</tr>
</table>
</td>
</tr>
<tr height="760" valign="top">
<td width="100%">
<table width="760" cellpadding="0" cellspacing="0">
<form method="post" name="board_view">
<tr height="100">
<td align="center" style="line-height: 100px"><b><font size="10" color="#009900">KeyFinding</font></b></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="5">
<img src="./img/board_top1.gif" width="760" height="10" border="0"></td>
</tr>
<tr>
<td style="font-size: 12" colspan="5" align="center"><b>README</b></td>
</tr>
<tr>
<td colspan="5">
<hr width="100%" color="#D5F1FB" style="border-style: dotted">
</td>
</tr>
<tr>
<td width="200" align="left">[3]</td>
<td width="550" align="center">Writer : suninatas</td>
<td width="220" align="center">WriteDate : 2012-03-01</td>
</tr>
<tr>
<td colspan="5" style="padding-top: 5">
<img src="./img/board_top2.gif" width="760" height="2" border="0"></td>
</tr>
<tr height="250">
<td style="font-size: 11px; padding-left: 10; padding-top: 20" valign="top" colspan="5">KeyFinding^^</td>
</tr>
<tr>
<td colspan="5">
<hr width="100%" color="2f98d1">
</td>
</tr>
</table>
</td>
</tr>
</form>
<tr>
<td colspan="5">
<iframe id="data_submit" name="data_submit" frameborder="0" width="300" height="300"></iframe>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
위의 소스를 보면 body바로 아래 form에서 KEY_HINT를 제공하는 것을 볼 수 있다.
Rome's First Emperor 구글에 검색해보도록 하겠다.
아우구스투스가 나왔고, 위의 값을 인증해서 클리어를 했다.