当前位置: 首页 > news >正文

vulnhub靶场之FunBox-5

一.环境搭建

1.靶场描述

Lets separate the script-kids from script-teenies.Hint: The first impression is not always the right one!If you need hints, call me on twitter: @0815R2d2 Have fun...This works better with VirtualBox rather than VMwareThis works better with VirtualBox rather than VMware.

2.靶场下载

https://www.vulnhub.com/entry/funbox-next-level,547/

image-20240505210150176

3.靶场启动

image-20240505210220611

二.信息收集

1.探测IP地址

nmap -sP 192.168.2.0/24

image-20240505210631152

arp-scan -l

image-20240505210650840

我们探测出来IP地址为192.168.2.8

2.探测端口及服务

nmap -p- -sV 192.168.2.8

image-20240505211214614

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

通过端口我们可以知道,又是ssh登录

三.渗透测试

1.访问web服务

http://192.168.2.8

image-20240505211508157

可以看到是一个apache2页面

2.扫描web服务

1)nikto扫描网站结构

nikto -h http://192.168.2.8

image-20240505211735325

扫描到一个robots.txt敏感目录

2)dirsearch扫描

这里IP地址变为192.168.2.9
dirsearch -u http://192.168.2.9 -e * -x 403 --random-agent

image-20240505212342222

扫描出来一个http://192.168.2.9/drupal

3)dirb扫描

dirb http://192.168.2.9

image-20240505212903776

3.渗透测试

1)访问robots.txt

http://192.168.2.9/robots.txt

image-20240505213108046

http://192.168.2.9/Thinking

image-20240505213143759

没有任何有用的信息

2)访问drupal目录

http://192.168.2.9/drupal

image-20240505213436812

我们发现重定向了192.168.178.33,没有什么用,我们进行扫描drupal试试

image-20240505214734508

我们可以看到cms是wordpress,那么我们使用wpscan进行爆破,因为开启了22端口,我们可以进行ssh登录

3)wpscan爆破

wpscan –url http://192.168.2.9/drupal/index.php –wp-content-dir=http://192.168.2.8/drupal/wp-content/ -e

image-20240505215430043

我们可以看到爆破出来2个用户名,一个是admin,一个是ben

4)hydra爆破

hydra -l admin -P  /usr/share/wordlists/rockyou.txt  ssh://192.168.2.9

image-20240505215553186

我们可以看到爆破不出来,那么我们爆破另一个

hydra -l ben -P  /usr/share/wordlists/rockyou.txt  ssh://192.168.2.9

image-20240505215603591

爆破出来密码是pookie

5)ssh登录

ssh ben@192.168.2.9

image-20240505215848216

我们可以看到登录成功

我们在根目录下可以看到mail目录,但是里面的文件我们没有权限查看

image-20240505220022514

image-20240505221052245

提权也提权不了,我们换一个思路

6)邮件服务

发现 ben 用户在 mail 组中 会不会有邮件发服务呢 netstart -anpt

image-20240505220408960

我们可以看到110端口是开放的吗,我们使用110端口进行查看

现存在邮件服务 通过110端口 连接本地 telnet 127.0.0.1 110发现可以, 而且有三封信 发现账号密码:adam/qwedsayxc!

image-20240505220805479

image-20240505220859984

image-20240505220915396

我们使用adam进行登录

ssh adam@192.168.2.9

image-20240505221713112

我们可以看到登录成功

7)提权

切换用户查看权限 id发现在sudo组 查看sudo -l发现了dd,de,df都可以sudo提权 只有dd可以使用

image-20240505221921830

提权方法查询网站:GTFOBins

image-20240505221959108

该命令可以写入具有root权限的文件,执行命令进行写入文件/etc/sudoers,设置adam用户具有全部的特权命令

LFILE=/etc/sudoers
echo "adam    ALL=(ALL:ALL) ALL" | sudo dd of=$LFILE

image-20240505222138478

可以使用find命令进行提权,提权成功

image-20240505222232759

获取flag

image-20240505222354615

至此获取到了所有得flag,渗透测试结束。

http://www.lryc.cn/news/346528.html

相关文章:

  • 1分钟搞定Pandas DataFrame创建与索引
  • 【贪心算法】哈夫曼编码Python实现
  • 【RAG 博客】RAG 应用中的 Routing
  • 鸿蒙ArkUI:【编程范式:命令式->声明式】
  • 【练习2】
  • oracle 新_多种块大小的支持9i
  • Collections工具类
  • java-函数式编程-jdk
  • qiankun实现微前端,vue3为主应用,分别引入vue2和vue3微应用
  • 写了 1000 条 Prompt 之后,我总结出了这 9 个框架【建议收藏】
  • 事件代理 浅谈
  • 一对多在线教育系统,疫情后,在线教育有哪些变革?
  • RabbitMQ(安装配置以及与SpringBoot整合)
  • JUC下的BlockingQueue详解
  • ChatGPT理论分析
  • 算法提高之魔板
  • 服务器内存占用不足会怎么样,解决方案
  • elasticsearch文档读写原理大致分析一下
  • 1 开发环境
  • 云视频,也称为视频云服务,是一种基于云计算技术理念的视频流媒体服务
  • [Vision Board创客营]--使用openmv识别阿尼亚
  • 【Linux:lesson1】的基本指令
  • 20240511日记
  • 蓝桥杯成绩已出
  • .kat6.l6st6r勒索病毒数据怎么处理|数据解密恢复
  • Spring Batch 是什么?主要用于什么场景?
  • SQL-慢查询的定位及优化
  • 练习题(2024/5/11)
  • linux系统服务器中常见故障及排查方法
  • 产品人生(5):从“敏捷开发”到“四化时间管理法”