vulnhub靶场之FunBox-1

一.环境搭建

1.靶场描述

Boot2Root ! This is a reallife szenario, but easy going. You have to  enumerate and understand the szenario to get the root-flag in round  about 20min.
This VM is created/tested with Virtualbox. Maybe it works with vmware.
If you need hints, call me on twitter: @0815R2d2
Have fun...
This works better with VirtualBox rather than VMware

  

2.靶场下载

https://www.vulnhub.com/entry/funbox-1,518/

  

3.靶场启动

image-20240328150739358

虚拟机开启之后界面如上,我们不知道ip,需要自己探活,网段知道:192.168.2.0/24

二.信息收集

1.寻找靶场真实ip地址

nmap -sP 192.168.2.0/24

  

image-20240328151344464

arp-scan -l

  

image-20240328151522751

靶场真实ip地址为192.168.2.10

  

2.探测端口及服务

nmap -p- -sV 192.168.2.10

  

image-20240328151917950

发现开启了21端口,服务为ProFTPD
发现开启了22端口,服务为OpenSSH 8.2p1 Ubuntu 4ubuntu0.11 (Ubuntu Linux; protocol 2.0)
发现开启了80,服务为Apache httpd 2.4.41 ((Ubuntu))
发现开启了33060,服务为mysqlx?

  

三.渗透测试

1.访问web服务

http://192.168.2.10

  

image-20240328152350721

image-20240328152447314

我们可以想到是IP地址和域名没有进行绑定,我们进行绑定即可

vim /etc/hosts

192.168.2.10   funbox.fritz.box

  

image-20240328152706689

我们再次进行访问,可以看到页面正常

image-20240328152803352

ftp://192.168.2.10

  

需要进行验证

image-20240328152922612

2.扫描web服务

1)棱洞3.0指纹识别

./EHole_linux_amd64 finger -u http://192.168.2.10

  

image-20240328153130793

扫描到cms框架是wordpress,我们可以猜测是需要爆破用户名和密码

2)nikto扫描网站结构

nikto -h http://192.168.2.10

  

image-20240328153540575

扫描到一个有用的信息,是wordpress的登录页面

3)disearch目录扫描

dirsearch -u 192.168.2.10 -e * -x 403 --random-agent

  

image-20240328153821539

没有什么新的发现,最后有用的信息只有一个登录页面

3.渗透测试

1)爆破用户名

http://funbox.fritz.box/wp-login.php

  

image-20240328154004623

我们使用wpscan进行爆破用户名

wpscan --url http://192.168.2.10 -e u

  

image-20240328154310815

爆破出来2个用户名,一个是admin,一个是joe

  

2)爆破密码

wpscan --url http://funbox.fritz.box/ -U user.txt --passwords  /usr/share/wordlists/rockyou.txt   

  

image-20240328155050450

爆破出来2个用户名和密码,我们进行登录查看

Username: joe, Password: 12345
Username: admin, Password: iubire

  

3)登录

首先我们使用joe进行登录,但是没有发现有用的信息

image-20240328155347377

我们使用第二个用户名进行登录

4)404页面登录

我们可以发现一个404.php,我们进行利用即可

image-20240328155629183

我们写入相关的代码即可

image-20240328155815715

但是我们发现不能使用,那么我们就换一个思路,进行解决,我们知道22端口是开启的,我们使用ssh进行登录

5)ssh登录

ssh joe@192.168.2.10

  

我们可以看到登录成功

image-20240328160842753

我们查看id,发现不是root权限,我们进行提权

image-20240328160933568

我们切换到根目录下,但是 发现被限制了 使用命令: python -c ‘import os; os.system(“/bin/bash”); 然后就突破了限制

image-20240328161236935

6)提权

我们查看根目录

image-20240328161423752

我们可以看到/home目录,我们进行查看

image-20240328161602293

然后 在 funny下 发现了 .backup.sh 可执行脚本 而.reminder.sh 说明backup会定时执行

image-20240328161757816

设置本地ip nc进行监听 ,每过几分钟就会运行一次 .bash.sh 脚本 然后就会回弹shell

image-20240328162404746

获取flag

image-20240328165005202

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

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-05-02 00:18:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-05-02 00:18:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-05-02 00:18:03       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-05-02 00:18:03       20 阅读

热门阅读

  1. NDK 编译(一)—— Linux 知识汇总

    2024-05-02 00:18:03       18 阅读
  2. 负二进制转换

    2024-05-02 00:18:03       17 阅读
  3. 椋鸟C++笔记#1:C++初识

    2024-05-02 00:18:03       13 阅读
  4. Pytoch实现姿势识别模型

    2024-05-02 00:18:03       9 阅读
  5. leetcode394. 字符串解码

    2024-05-02 00:18:03       9 阅读
  6. 【MATLAB】MATLAB App Designer中的回调函数

    2024-05-02 00:18:03       13 阅读
  7. 李沐69_BERT训练集——自学笔记

    2024-05-02 00:18:03       12 阅读