본문 바로가기

워게임/NATAS-overthewire.org

[워게임 Natas] 레벨 6 문제 풀이

Natas Level 5 → Level 6

Username: natas6

URL:      http://natas6.natas.labs.overthewire.org


6단계 비밀번호는 이 글을 참고하세요.



메인 화면이다.

시크릿을 입력하라한다.

소스 코드를 보자.


<?

include "includes/secret.inc";

    if(array_key_exists("submit", $_POST)) {
        if($secret == $_POST['secret']) {
        print "Access granted. The password for natas7 is <censored>";
    } else {
        print "Wrong secret";
    }
    }
?>

<form method=post>
Input secret: <input name=secret><br>
<input type=submit name=submit>
</form>


대충 이렇게 생겼다.

POST로 넘어온 값이 뭐 시크릿과 일치하는지 보고 나타스7 비밀번호를 알려준다.

쉽다.

위에 include된 파일을 확인하면 된다..



시크릿 키를 얻었다.

그대로 input에 붙인다.




하품이 나올뻔한 문제다.


natas7     :    7z3hEENjQtflzgnT29q7wAvMNfZdh0i9