monyer黑客游戏通关

梦之光芒http://monyer.com/game/game1

查看源码,发现有个链接链接到first.php,进入第1关

1-http://monyer.com/game/game1/first.php

<script type="text/javascript">
    function check(){
        if(document.getElementById('txt').value=="  "){
            window.location.href="hello.php";
        }else{
            alert("密码错误");
        }
    }
</script>

发现密码是两个空格,意思就是说我们在id=txt那一栏填入两个空格,就可以跳转到hello.php;或者直接改URL到hello.php

2-http://monyer.com/game/game1/hello.php

<script type="text/javascript">
    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;
        }
    }
</script>

Math.floor()向下取整,JavaScript的**/**运算符算到小数5/2=2.5

把那一串代码改改随便拿去哪个语言环境跑跑得出结果。

3-http://monyer.com/game/game1/424178.php

<script type="text/javascript">   
  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));
</script>

fromCharCode()将Unicode编码转为一个字符,静态 String.fromCharCode() 方法返回由指定的 UTF-16 代码单元序列创建的字符串。将里面的代码找个在线JavaScript一转,摇身一变代码:

console.log(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));
---------------------------------------------------
function check(){
	var a = 'd4g';
	if(document.getElementById('txt').value==a){
		window.location.href=a+".php";
	}else{
		alert("密码错误");
	}
}

4-http://monyer.com/game/game1/d4g.php

输入d4g时,看到URL转到d4g.php又很快回到了第3关的URL,那只能抓包来看看它返回了什么东西。

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex,nofollow">
<meta http-equiv="refresh" content="0;url=424178.php">
<title>梦之光芒/Monyer——Monyer's Game(第4关)</title>
<script type="text/javascript">
    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,{}))
</script>
</head>
<body>
<div align="center">
    <p>欢迎您来到第4关</p>
    <p>请输入密码进入第5关:
        <input type="text" id="txt" value="">
        <input type="button" onClick="check()" value="提交">
    </p>
</div>
</body>
<script type="text/javascript">
    eval("\141\75\141\56\164\157\125\160\160\145\162\103\141\163\145\50\51\53\61\73");
</script>
</html>

可以看到有两段script,分别将两段script解密:

<script type="text/javascript">
    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,{}))
</script>
----------------------------------------------------
console.log(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,{}));
-----------------------------------------------------
a="3bhe";function check(){if(document.getElementById('txt').value==a){window.location.href=a+".php"}else{alert("密码错误")}}

在URL上跟上3bhe.php不行,再来看下第二段JS:

<script type="text/javascript">
  eval("\141\75\141\56\164\157\125\160\160\145\162\103\141\163\145\50\51\53\61\73");
</script>
-----------------------------------------------------
console.log("\141\75\141\56\164\157\125\160\160\145\162\103\141\163\145\50\51\53\61\73");
-----------------------------------------------------
a=a.toUpperCase()+1;

toUpperCase() 方法用于把字符串转换为大写。

var a="3bhe"
console.log(a.toUpperCase()+1)
-----------------------------------------------------
3BHE1

URL跟上3BHE1.php成功跳转到第5关

5-http://monyer.com/game/game1/3BHE1.php

<script type="text/javascript">
    function check(){
        window.location.href = document.getElementById("txt").value + ".php";
    }
</script>

页面提示说藏在了页面里,就按F12到处找,看到消息头的响应头里这样一句话:monyer: the password for the next level is asdf;或者抓包在响应报文里也可以看到。

6-http://monyer.com/game/game1/asdf.php

<script type="text/javascript">
  function check(){
	  	window.location.href=document.getElementById('txt').value + "7.php";
	}
</script>

在图片里找线索,主要是考信息搜索,从图片看出有magazine,用引号将从图片知道的内容包起来搜索,容易找到一家seventeen杂志。

7-http://monyer.com/game/game1/seventeen7.php

<script type="text/javascript">
  function check(){
	  	window.location.href=document.getElementById('txt').value + ".php";
	}
</script>

它给了几个提示,是关于社工的(感觉我什么都不能信了怎么办)

提示1:这关需要简单的社会工程学,请联想本关特点进入下一关。

提示2:不要被你的所见、经验及习惯蒙蔽了你的双眼,看不到的正是你想要的。

提示3:与社会工程学相仿的是暴力破解,所以Monyer给你MD5:5e023995fb3f5e840ee684784f8f0799(小于10的数字+字母)

它说联想本关,我就顺其自然地想到eighteen8但出现了Not Found,去解密了MD5发现也是eighteen8,我只能看看抓包能有什么效果,还是eighteen8,看它会不会有啥302跳转啥的,结果一抓发现Not Found是假的!我再回头看发现它的title就写着第8关,我因为看到Not Found就没注意到title。

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex,nofollow">
<title>第8关</title>
</head>
<body>
    <h1>Not Found</h1>
    <p>The requested URL /eighteen8.php was not found on this server.</p>
    <p>Additionally, a 404 Not Found
        error was encountered while trying to use an ErrorDocument to handle the request.</p>
    <p style="display:none">
    第8关

    朋友您好,第8关欢迎您!
    我对您的聪明才智感到惊讶!
    相信我,现在世界上85%以上的人都在你之下,
    所以你可以大步向前,义无反顾地进行你的事业了。
    因为只要你肯努力,不畏惧挫折,这个世界上没有难倒你的事。


    那么继续我们的约定,我将告诉你第9关的入口:

    10000以内所有质数和.php
    </p>
</body>
</html>

8-http://monyer.com/game/game1/eighteen8.php

# -*- coding: utf-8 -*-
#求10000以内的质数和,借大佬的代码一用
def zhishu(num=None):
    if num is None or num == 1 or num < 0:
        return 0

    i = 2
    while True:
        if i == num:
            return num
        elif num % i != 0:
            i += 1
        elif num % i == 0 and num != i:
            break

    return 0

def sum_zhishu():
    sum = 0
    for i in range(10001):
        sum += zhishu(i)
    return sum

print(sum_zhishu())
#5736396

直接在URL上改5736396.php

9-http://monyer.com/game/game1/5736396.php

认认真真看了美女许久一无所获,图片下载下来用notepad++打开发现最后有信息。

那句广告词叫什么来着?
对,“在这里,在这里,在这里…”
恭喜你!
第十关密码为:MonyerLikeYou_the10level
从现在开始涉及到少许的动态东西,但你都可以按提示线索完成的!
相信自己,没错的!

10-https://www.monyer.com/game/game1/MonyerLikeYou_the10level.php

当前用户身份为simpleuser 不是admin,无法显示下一关密码

抓包,改cookie中的username为admin,GET地址就是第10关的地址。

页面跳转https://www.monyer.com/game/game1/admin.php

好聪明哦!下一关密码为:doyouknow

11-https://www.monyer.com/game/game1/doyouknow.php?action=show_login_false

你的session不是passer,不能查看下一关密码

session在哪找不到,我把URL的false改为true就可以通过了。

您的session为passer,所以您可以查看下一关密码:smartboy

12-https://www.monyer.com/game/game1/smartboy.php

JTRBJTU0JTYzJTdBJTRBJTU0JTVBJTQ3JTRBJTU0JTU5JTc5JTRBJTU0JTU5JTMxJTRBJTU0JTU5JTc4JTRBJTU0JTYzJTMxJTRBJTU0JTYzJTMwJTRBJTU0JTU5JTM1JTRBJTU0JTU5JTMyJTRBJTU0JTYzJTMxJTRBJTU0JTVBJTQ0JTRBJTU0JTRBJTQ2JTRBJTU0JTYzJTc3JTRBJTU0JTU5JTM0JTRBJTU0JTYzJTc3

有大小写、数字,猜测base64解码:

%4A%54%63%7A%4A%54%5A%47%4A%54%59%79%4A%54%59%31%4A%54%59%78%4A%54%63%31%4A%54%63%30%4A%54%59%35%4A%54%59%32%4A%54%63%31%4A%54%5A%44%4A%54%4A%46%4A%54%63%77%4A%54%59%34%4A%54%63%77

URL解码:

JTczJTZGJTYyJTY1JTYxJTc1JTc0JTY5JTY2JTc1JTZDJTJFJTcwJTY4JTcw

base64解码:

%73%6F%62%65%61%75%74%69%66%75%6C%2E%70%68%70

URL解码:

sobeautiful.php

<form action="?" method="post">
        <input type="text" name="pwd" value="">
        <input type="submit" value="提交">
    </form>

在以上源码中改为action="sobeautiful.php",再次点提交,进到13关。

13-https://www.monyer.com/game/game1/sobeautiful.php

本页禁止盗链!

顺便一说,如果直接在URL上改sobeautiful.php就会出现上面提示,进了第13关又没全进,反正就是做不了题。

查看源码:

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

可知我们填入的"pwd"放进select语句查询,可以试试SQL注入。

' or 1=1就试出来了密码:whatyouneverknow

14-https://www.monyer.com/game/game1/whatyouneverknow.php

下载下来是一个exe文件,打开要我们输入16位注册码。先把它放进IDA看看,只有一个函数,用ID5反编译不了,有可能是被加壳了。用查壳软件exeinfope看看,被加了upx壳。

upx -d crackme.exe //脱壳

脱壳后再放进IDA,好大的文件。。。试一下动态调试用OD,载入文件后右键->中文搜索引擎->智能搜索,在文本字符串中可以看到ipasscrackme.asp文件。

<script type="text/javascript">
    function check(){
        window.location.href = document.getElementById("txt").value + ".php";
    }
</script>

由于它后面规定了是以.php结尾,所以改为ipasscrackme.php

15-http://monyer.com/game/game1/ipasscrackme.php

你最终没能把cookies设为admin

最后抓包将cookies设为admin就可以了。

Cookie: username=admin; PHPSESSID=967sro4f61krddtkgkihm6jj68
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值