Healthcare 1

https://download.vulnhub.com/healthcare/Healthcare.ova

靶场IP:192.168.32.221

扫描对外端口服务

┌──(root💀kali)-[/tmp]
└─# nmap -p 1-65535 -sV  192.168.32.221                                                                                                                                                                                                
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-10 09:56 EDT
Nmap scan report for 192.168.32.221
Host is up (0.00078s latency).
Not shown: 65533 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
21/tcp open  ftp     ProFTPD 1.3.3d
80/tcp open  http    Apache httpd 2.2.17 ((PCLinuxOS 2011/PREFORK-1pclos2011))
MAC Address: 00:0C:29:0F:7D:F1 (VMware)
Service Info: OS: Unix

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

ftp登录失败

┌──(root💀kali)-[/tmp]
└─# ftp 192.168.32.221
Connected to 192.168.32.221.
220 ProFTPD 1.3.3d Server (ProFTPD Default Installation) [192.168.32.221]
Name (192.168.32.221:root): anonymous
331 Password required for anonymous
Password:
530 Login incorrect.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.

浏览器访问80端口

image-20220910215719818

爆破目录

访问:/openemr/

image-20220910220211578

其中该版本有SQL注入漏洞

image-20220910220602361

使用admin登录

image-20220910221015106

在files那里添加shell

image-20220910221458811

访问config

image-20220910222421606

现在,我们有了一个 revere shell,让我们在 python-onliner 的帮助下将它升级为一个完全交互式的 TTY shell,并进一步进行 post enumeration 以提升 root 权限。因此,首先我们以medical:medica l(通过 SQLi 枚举)身份登录,然后尝试使用 find 命令识别 SUID 启用二进制文件。

我们发现为 /usr/bin/healthcheck 启用了 SUID 位,我们使用 strings 命令进一步探索"healthcheck",我们发现它通过运行"ifconfig"和"fdisk"等命令来扫描系统:

我们可以使用使用 PATH 变量的权限提升技术来利用系统,从**这里** 阅读以了解更多信息:

image-20230208150005962

最后更新于

这有帮助吗?