이번에는 그냥 "KEY Finding"이라는 문자열만 써있다.

 

<!DOCTYPE html>

<html>
<head>
    <title>Game 13</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="shortcut icon" href="/static/img/game.ico" />
</head>
<!--	Hint : 프로그래머의 잘못된 소스백업 습관 -->
<!--	Hint : The programmer's bad habit of backup source codes -->
<body>
    <table width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td align="center">
                <table width="1000" cellpadding="0" cellspacing="0">
                    <tr height="20">
                        <td width="100%" bgcolor="000000" align="right">
                            <input type="button" name="main_btn" value="main" class="btn_check" style="width: 60" onclick="location.href = '/'">&nbsp<input type="button" name="main_btn" value="Back" class="btn_check" style="width: 60" onclick="history.back()"></td>
                    </tr>
                    <tr height="500">
                        <td bgcolor="000000" style="line-height: 15" align="center"><font color="white" size="10"><b>KEY Finding</b></font></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>

 

소스코드를 보니까 프로그래머의 잘못된 소스백업 습관이라는 힌트도 알려준다.

 

꽤.. 오래 걸렸다.. 바로 전 문제는 바로 admin 디렉토리 얻어 걸렸는데 이번에는 온갖 백업 관련 확장자나 디렉토리로 다 시도해보고 혹시 몰라서 github까지 뒤져본 다음에야 zip으로 백업한 것을 알아냈다..!

 

"https://suninatas.com/challenge/web13/web13.zip"로 접속하면 web13.zip파일이 다운된다.

 

이미지 네개와 텍스트 파일 하나가 있는데 이 폴더 전체가 암호로 잠겨있다ㅠㅠ

 

import zipfile
import threading

def extractFile(zFile, pwdStr):
    try:
        zFile.extractall(pwd = pwdStr.encode())
        print(pwdStr)
    except:
        pass

def main():
    zFile = zipfile.ZipFile(r"C:\Users\User\Desktop\web13.zip")
    for i in range(10000):
        pwd = "%04d" % (i)
        th = threading.Thread(target = extractFile, args = (zFile, pwd))
        th.start()

if __name__ == '__main__':
    main()

 

간단하게 파이썬으로 브루트포싱해주면 패스워드 "7642"를 구할 수 있다.

 

 

끝이 아니라 이제 폴더 안에 있던 이미지를 합해서 key를 구하라고 한다..ㅎ

 

 

각 이미지를 hxd로 열어보면 키가 적혀있다!

 

 

이거 더하는것도 어떻게 더하라는건지.. 고민하다가 그냥 이어붙였더니 그게 AuthKey 였다..!ㅎㅎ 살짝 딴 길로 새는게 많았던 문제였다

+ Recent posts