vulnhub靶场之FunBox-6

发布于:2024-05-17 ⋅ 阅读:(138) ⋅ 点赞:(0)

一.环境搭建

1.靶场描述

Not a reallife box !
It's a very easy box, that makes you crazy.
## HINTS:
Don't forget to add: funbox6.box in your /etc/hosts !
This works better with VirtualBox rather than VMware

这里注意提示:

funbox6.box in your /etc/hosts !

我们猜测是域名和IP地址的绑定,这个靶场特别讨厌,它是一个定时任务

2.靶场下载

https://www.vulnhub.com/entry/funbox-gamble-hall,551/

image-20240511212117832

3.靶场启动

image-20240511212136707

ip地址我们不知道,但是我们知道网段的192.168.2.0/24

二.信息收集

1.寻找靶场真实IP地址

nmap -sP 192.168.2.0/24

image-20240511212433435

arp-scan -l 

image-20240511212536370

根据上面两个命令我们知道IP地址为

192.168.2.13

2.探测端口及服务

nmap -p- -sV 192.168.2.13

image-20240511212706956

开启了22端口,服务为ssh
开启了80端口,服务为Apache2

三.渗透测试

1.访问web服务

http://192.168.2.13

image-20240511212910243

我们可以看到无法连接,想到题目的提示,我们需要绑定IP地址和域名

image-20240511213006459

image-20240511213013475

我们再次访问可以看到正常了

image-20240511213251335

我们检测到cms是wordpress.我们可以想到爆破用户名和密码

2.扫描web服务

1)nikto扫描网站结构

nikto -h http://192.168.2.13

image-20240511213625827

我们扫描到一个登录页面

image-20240511213513093

2)dirsearch扫描

dirsearch -u http://192.168.2.13 -e * -x 403 --random-agent

image-20240511213732986

image-20240511213818631

没有什么用,还是一个登录页面

3)drib扫描

drib http://192.168.2.13

image-20240511214134769

image-20240511214040395

没有什么用,我们目前掌握的信息只有一个登录页面

3.渗透测试

1)wpscan爆破

爆破用户名

wpscan --url http://funbox6.box/ -e u

image-20240511215500155

爆破出来用户名是admin.

爆破密码

image-20240511220031884

我们可以看到报错了

2)定时任务

如果我们不断刷新页面的话,可以看到这是一个定时任务,查看网站标题Gamble hall翻译过来就是赌博大厅,副标题是CLOSED,过了一段时间副标题会变化,CLOSED 和 OPENED是不停变化,猜测有一个定时任务

image-20240511214352464

image-20240511214403199

我们一个标题都进行信息收集,发现在副标题为OPENED的时候,发现http://funbox6.box/index.php/2020/09/08/hello-world/页面存在flag:flag{MFSG22LOHJTWC3LCNRSWQYLMNQ3TONY=},使用base32解密得到一组用户名密码:admin:gamblehall777

image-20240511220408703

image-20240511220418753

image-20240511220430617

admin:gamblehall777

3)登录

使用用户名密码登录网站,发现登录失败,返回主页面查看,发现网站副标题状态为CLOSED,再等到该标题为OPENED的时候登录试试,登录成功

image-20240511220546811

image-20240511220556077

4)文件上传

http://funbox6.box/wp-admin/plugin-install.php

image-20240511221137973

image-20240511221308831

image-20240511222157978

image-20240511222216170

主机监听,点击webshell,反弹shell成功

image-20240511222939037

使用python获取交互式shell

python3 -c 'import pty; pty.spawn("/bin/bash")'

5)提权

查看网站有什么特权命令sudo -l,发现该权限能执行所有的特权命令

image-20240511223111739

直接使用find命令进行提权

sudo find /home -exec /bin/bash \;

image-20240511223150145

获取flag

image-20240511223213209

 


网站公告

今日签到

点亮在社区的每一天
去签到