Oracle DB 11g R1/R2 DBMS_JVM_EXP_PERMS OS Code Execution - Metasploit
This page contains detailed information about how to use the auxiliary/sqli/oracle/jvm_os_code_11g metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Oracle DB 11g R1/R2 DBMS_JVM_EXP_PERMS OS Code Execution
Module: auxiliary/sqli/oracle/jvm_os_code_11g
Source code: modules/auxiliary/sqli/oracle/jvm_os_code_11g.rb
Disclosure date: 2010-02-01
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 1521
List of CVEs: CVE-2010-0866
This module exploits a flaw (0 day) in DBMS_JVM_EXP_PERMS package that allows any user with create session privilege to grant themselves java IO privileges. Identified by David Litchfield. Works on 11g R1 and R2 (Windows only).
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
msf > use auxiliary/sqli/oracle/jvm_os_code_11g
msf auxiliary(jvm_os_code_11g) > show targets
... a list of targets ...
msf auxiliary(jvm_os_code_11g) > set TARGET target-id
msf auxiliary(jvm_os_code_11g) > show options
... show and set options ...
msf auxiliary(jvm_os_code_11g) > exploit
Go back to menu.
Msfconsole Usage
Here is how the sqli/oracle/jvm_os_code_11g auxiliary module looks in the msfconsole:
msf6 > use auxiliary/sqli/oracle/jvm_os_code_11g
msf6 auxiliary(sqli/oracle/jvm_os_code_11g) > show info
Name: Oracle DB 11g R1/R2 DBMS_JVM_EXP_PERMS OS Code Execution
Module: auxiliary/sqli/oracle/jvm_os_code_11g
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2010-02-01
Provided by:
sid <[email protected]>
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
CMD echo metasploit >> %SYSTEMDRIVE%\\unbreakable.txt no CMD to execute.
DBPASS TIGER yes The password to authenticate with.
DBUSER SCOTT yes The username to authenticate with.
RHOST yes The Oracle host.
RPORT 1521 yes The TNS port.
SID ORCL yes The sid to authenticate with.
Description:
This module exploits a flaw (0 day) in DBMS_JVM_EXP_PERMS package
that allows any user with create session privilege to grant
themselves java IO privileges. Identified by David Litchfield. Works
on 11g R1 and R2 (Windows only).
References:
https://nvd.nist.gov/vuln/detail/CVE-2010-0866
OSVDB (62184)
http://blackhat.com/html/bh-dc-10/bh-dc-10-archives.html#Litchfield
http://www.notsosecure.com/folder2/2010/02/04/hacking-oracle-11g/
Module Options
This is a complete list of options available in the sqli/oracle/jvm_os_code_11g auxiliary module:
msf6 auxiliary(sqli/oracle/jvm_os_code_11g) > show options
Module options (auxiliary/sqli/oracle/jvm_os_code_11g):
Name Current Setting Required Description
---- --------------- -------- -----------
CMD echo metasploit >> %SYSTEMDRIVE%\\unbreakable.txt no CMD to execute.
DBPASS TIGER yes The password to authenticate with.
DBUSER SCOTT yes The username to authenticate with.
RHOST yes The Oracle host.
RPORT 1521 yes The TNS port.
SID ORCL yes The sid to authenticate with.
Advanced Options
Here is a complete list of advanced options supported by the sqli/oracle/jvm_os_code_11g auxiliary module:
msf6 auxiliary(sqli/oracle/jvm_os_code_11g) > show advanced
Module advanced options (auxiliary/sqli/oracle/jvm_os_code_11g):
Name Current Setting Required Description
---- --------------- -------- -----------
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Auxiliary Actions
This is a list of all auxiliary actions that the sqli/oracle/jvm_os_code_11g module can do:
msf6 auxiliary(sqli/oracle/jvm_os_code_11g) > show actions
Auxiliary actions:
Name Description
---- -----------
Evasion Options
Here is the full list of possible evasion options supported by the sqli/oracle/jvm_os_code_11g auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 auxiliary(sqli/oracle/jvm_os_code_11g) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Error: <E.CLASS> <E>
Here is a relevant code snippet related to the "Error: <E.CLASS> <E>" error message:
43:
44: begin
45: print_status("Attempting to grant JAVA IO Privileges")
46: prepare_exec(package)
47: print_status("Attempting to execute OS Code")
48: prepare_exec(os_code)
49: rescue => e
50: print_error("Error: #{e.class} #{e}")
51: end
52: end
53: end
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6812 Merged Pull Request: Resolve #6807, remove all OSVDB references.
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #2525 Merged Pull Request: Change module boilerplate
- #1228 Merged Pull Request: MSFTIDY cleanup #1 - auxiliary
References
- CVE-2010-0866
- OSVDB (62184)
- http://blackhat.com/html/bh-dc-10/bh-dc-10-archives.html#Litchfield
- http://www.notsosecure.com/folder2/2010/02/04/hacking-oracle-11g/
See Also
Check also the following modules related to this module:
- auxiliary/sqli/oracle/jvm_os_code_10g
- auxiliary/sqli/oracle/dbms_cdc_ipublish
- auxiliary/sqli/oracle/dbms_cdc_publish
- auxiliary/sqli/oracle/dbms_cdc_publish2
- auxiliary/sqli/oracle/dbms_cdc_publish3
- auxiliary/sqli/oracle/dbms_cdc_subscribe_activate_subscription
- auxiliary/sqli/oracle/dbms_export_extension
- auxiliary/sqli/oracle/dbms_metadata_get_granted_xml
- auxiliary/sqli/oracle/dbms_metadata_get_xml
- auxiliary/sqli/oracle/dbms_metadata_open
- auxiliary/sqli/oracle/droptable_trigger
- auxiliary/sqli/oracle/lt_compressworkspace
- auxiliary/sqli/oracle/lt_findricset_cursor
- auxiliary/sqli/oracle/lt_mergeworkspace
- auxiliary/sqli/oracle/lt_removeworkspace
- auxiliary/sqli/oracle/lt_rollbackworkspace
- exploit/windows/browser/java_ws_arginject_altjvm
- auxiliary/scanner/http/accellion_fta_statecode_file_read
- auxiliary/scanner/http/dir_webdav_unicode_bypass
- auxiliary/scanner/http/ms09_020_webdav_unicode_bypass
- auxiliary/scanner/http/rfcode_reader_enum
- auxiliary/admin/oracle/oracle_index_privesc
- auxiliary/admin/oracle/oracle_login
- auxiliary/admin/oracle/oracle_sql
- auxiliary/admin/oracle/oraenum
- auxiliary/admin/oracle/ora_ntlm_stealer
- auxiliary/admin/oracle/osb_execqr
- auxiliary/admin/oracle/osb_execqr2
- auxiliary/admin/oracle/osb_execqr3
- auxiliary/admin/oracle/post_exploitation/win32exec
- auxiliary/admin/oracle/post_exploitation/win32upload
- auxiliary/admin/oracle/sid_brute
- auxiliary/admin/oracle/tnscmd
- auxiliary/scanner/oracle/emc_sid
- auxiliary/scanner/oracle/isqlplus_login
- auxiliary/scanner/oracle/isqlplus_sidbrute
- auxiliary/scanner/oracle/oracle_hashdump
- auxiliary/scanner/oracle/oracle_login
- auxiliary/scanner/oracle/sid_brute
- auxiliary/scanner/oracle/sid_enum
- auxiliary/scanner/oracle/spy_sid
- auxiliary/scanner/oracle/tnslsnr_version
- auxiliary/scanner/oracle/tnspoison_checker
- auxiliary/scanner/oracle/xdb_sid
- auxiliary/scanner/oracle/xdb_sid_brute
- exploit/windows/oracle/client_system_analyzer_upload
- exploit/windows/oracle/extjob
- exploit/windows/oracle/osb_ndmp_auth
- exploit/windows/oracle/tns_arguments
- exploit/windows/oracle/tns_auth_sesskey
- exploit/windows/oracle/tns_service_name
Authors
- sid[at]notsosecure.com
Version
This page has been produced using Metasploit Framework version 6.1.24-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.