Bottleneck

https://download.vulnhub.com/bottleneck/Bottleneck.ova

靶场IP:192.168.32.16

扫描对外端口服务

┌──(root㉿kali)-[~]
└─# nmap -sV -p1-65535 192.168.32.16 
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-11 11:33 EDT
Nmap scan report for 192.168.32.16
Host is up (0.00011s latency).
Not shown: 65533 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.9p1 Ubuntu 10 (Ubuntu Linux; protocol 2.0)
80/tcp open  http    nginx
MAC Address: 08:00:27:E2:53:18 (Oracle VirtualBox virtual NIC)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.14 seconds

浏览器访问80端口

image-20220911233507929

爆破php文件

访问:/image_gallery.php

image-20220912112430336

查看网络找到一个接口,是文件包含图片

QQ录屏20220912112818

写个python,读取image_gallery.php

读取image_gallery_load.php,看到了这些黑名单目录,这就是/etc/passwd不生效的原因。

上面的 python 命令将输出到/tmp/output.

image-20220912123219971

输入反弹shell

image-20220912123514120

查看sudo列表

查看clear_logs

由于我们有编辑权限clear_logs,让我们用命令更改其符号链接:

编辑/tmp/clear_logsc

设置执行权限/tmp/clear_logsc

运行命令,我们将获得bytevsbyte用户:

image-20220912124056313

我们现在bytevsbyte,让我们找到上面有 SUID 的文件:

image-20220912124126485

我们发现了一个有趣的文件:

本地编译

提权成功

image-20230208133922553

最后更新于

这有帮助吗?