梦之光芒
游戏链接:http://monyer.com/game/game1/

F12查看页面源代码,点击first.php,跳转至第一关

同样查看第一关源代码,密码为两个空格,提交进入第二关
function check(){
if(document.getElementById('txt').value==" "){
window.location.href="hello.php";
}else{
alert("密码错误");
}
}

document.oncontextmenu=function(){return false};
var a,b,c,d,e,f,g;
a = 3.14;
b = a * 2;
c = a + b;
d = c / b + a;
e = c - d * b + a;
f = e + d /c -b * a;
g = f * e - d + c * b + a;
a = g * g;
a = Math.floor(a);
function check(){
if(document.getElementById("txt").value==a){
window.location.href=a + ".php";
}else{
alert("密码错误");
return false;
}
}
使用js计算变量a的值,可以在浏览器控制台上进行计算得到结果424178,提交进入第3关.
eval(String.fromCharCode(102,117,110,99,116,105,111,110,32,99,104,101,99,107,40,41,123,13,10,09,118,97,114,32,97,32,61,32,39,100,52,103,39,59,13,10,09,105,102,40,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,110,116,66,121,73,100,40,39,116,120,116,39,41,46,118,97,108,117,101,61,61,97,41,123,13,10,09,09,119,105,110,100,111,119,46,108,111,99,97,116,105,111,110,46,104,114,101,102,61,97,43,34,46,112,104,112,34,59,13,10,09,125,101,108,115,101,123,13,10,09,09,97,108,101,114,116,40,34,23494,30721,38169,35823,34,41,59,13,10,09,125,13,10,125));
第三关中js脚本被编码,使用扩展台解码得到d4g,提交进入第四关.
密码提交后会跳回第三关,需要在提交后按下Esc键

第4关的js代码有两处,第一处js在扩展台进行得到sbhe,再运行第二的js后得到密码3BHE1,提交进入第5关;
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--)d[c.toString(a)]=k[c]||c.toString(a);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('a="e";d c(){b(9.8(\'7\').6==a){5.4.3=a+".2"}1{0("密码错误")}}',15,15,'alert|else|php|href|location|window|value|txt|getElementById|document||if|check|function|3bhe'.split('|'),0,{}))
eval("\141\75\141\56\164\157\125\160\160\145\162\103\141\163\145\50\51\53\61\73");

第五关提示密码在页面里,但在请求与响应中找到密码asdf,提交进入第6关.


第六关的线索是一张搜索结果图片,被遮盖的就是密码,使用谷歌或bing搜索页面未被遮盖的内容,找到出处为杂志seventeen,提交进入第7关

第7关的线索为一个MD5值,解密得到密码eighteen8,提交进入第8关.
注意其他的提示,输入正确的密码后跳转的页面是一个404页面,但这个页面是正确的.正确的提示藏在页面源代码中.


查看第8关页面源代码,提示密码为10000以内所有质数之和,计算得到5736396,访问https://monyer.com/game/game1/5736396.php,进入第9关.

第9关提示密码在图片,使用notpad++打开图片在图片下方发现密码MonyerLikeYou_the10level,提交进入第10关.

第10关提示当前用户身份为simpleuser,需要改为admin,服务器识别用户身份是根据cookie进行的,在控制台,发现cookie中有username字段,修改为admin,刷新得到密码为doyouknow,提交进入第11关.


第11关提示需要修改session为passer,session在服务器端,我们无法通过修改本地文件进行篡改,但URL中新增了一个新的参数为show_login_false,修改为show_login_true,请求得到密码为smartboy,提交进入第12关.

第12关页面提示有加密后的密文,使用CyberChef工具进行解码,在进行两次base64和URL解码后得到sobeautiful.php,这是第13关的URL,直接访问会报错,我们需要从第12关跳转至第13关页面.
尝试提交密码,页面会将输入显示在网页上,考虑XSS生成第13的超链接后点击跳转.
payload为 <a href="sobeautiful.php">123</a>
JTRBJTU0JTYzJTdBJTRBJTU0JTVBJTQ3JTRBJTU0JTU5JTc5JTRBJTU0JTU5JTMxJTRBJTU0JTU5JTc4JTRBJTU0JTYzJTMxJTRBJTU0JTYzJTMwJTRBJTU0JTU5JTM1JTRBJTU0JTU5JTMyJTRBJTU0JTYzJTMxJTRBJTU0JTVBJTQ0JTRBJTU0JTRBJTQ2JTRBJTU0JTYzJTc3JTRBJTU0JTU5JTM0JTRBJTU0JTYzJTc3


进入第13关,查看页面源代码,在注释中发现SQL语句,使用万能密码1' or 1=1-- 登陆,得到下一关密码whatyouneverknow,提交进入第14关.
<!--
dim connect
Response.Expires=0 '系统数据库连接
Set connect=Server.CreateObject("ADODB.Connection")
connect.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath("/Database.mdb") & ";Mode=ReadWrite|Share Deny None;Persist Security Info=False"
set rss=server.createobject("adodb.recordset")
sqlstr="select password,pwd from [user] where pwd='"&request("pwd")&"'"
rss.open sqlstr,connect,1,1
if rss.bof and rss.eof then
response.write("密码错误")
else
response.write(rss("password"))
end if
rss.close
set rss=nothing
connect.close
set connect=nothing
-->
第14关提示一个注册码程序,使用PEiD工具查壳发现UPX壳,在kali上使用upx -d crackme.exe 进行脱壳.使用OllyDbg打开脱壳后的程序,查找特殊字符串找到注册码,得到密码ipasscrackme,提交成功进入关底



|