728x90
http://natas22.natas.labs.overthewire.org/index.php
natas22/chG9fbe1Tq2eWVMgjYYD1MsfIvN461kJ로 로그인
화면에 아무것도 없다.
일단 소스코드를 살펴보았다.
<?
session_start();
if(array_key_exists("revelio", $_GET)) {
// only admins can reveal the password
if(!($_SESSION and array_key_exists("admin", $_SESSION) and $_SESSION["admin"] == 1)) {
header("Location: /");
}
}
?>
<html>
<head>
<!-- This stuff in the header has nothing to do with the level -->
<link rel="stylesheet" type="text/css" href="http://natas.labs.overthewire.org/css/level.css">
<link rel="stylesheet" href="http://natas.labs.overthewire.org/css/jquery-ui.css" />
<link rel="stylesheet" href="http://natas.labs.overthewire.org/css/wechall.css" />
<script src="http://natas.labs.overthewire.org/js/jquery-1.9.1.js"></script>
<script src="http://natas.labs.overthewire.org/js/jquery-ui.js"></script>
<script src=http://natas.labs.overthewire.org/js/wechall-data.js></script><script src="http://natas.labs.overthewire.org/js/wechall.js"></script>
<script>var wechallinfo = { "level": "natas22", "pass": "<censored>" };</script></head>
<body>
<h1>natas22</h1>
<div id="content">
<?
if(array_key_exists("revelio", $_GET)) {
print "You are an admin. The credentials for the next level are:<br>";
print "<pre>Username: natas23\n";
print "Password: <censored></pre>";
}
?>
<div id="viewsource"><a href="index-source.html">View sourcecode</a></div>
</div>
</body>
</html>
admin이 세션 key에 존재하는지, 그 값이 1인지 체크하고 있다.
GET 방식으로 "revelio"를 보내보았다.
url창에 /?revelio를 추가하고 burp suite로 가져왔다.
HTTP history의 Response에서 패스워드를 확인할 수 있었다.
Password: D0vlad33nQF0Hz2EP255TP5wSW9ZsRSE
728x90
'WEB > Natas' 카테고리의 다른 글
[Natas] Level 23 → Level 24 (0) | 2021.08.04 |
---|---|
[Natas] Level 22 → Level 23 (0) | 2021.07.27 |
[Natas] Level 20 → Level 21 (0) | 2021.07.08 |
[Natas] Level 19 → Level 20 (0) | 2021.07.08 |
[Natas] Level 18 → Level 19 (0) | 2021.06.25 |