Oracle DB SQL Injection via SYS.DBMS_METADATA.GET_GRANTED_XML - Metasploit


This page contains detailed information about how to use the auxiliary/sqli/oracle/dbms_metadata_get_granted_xml metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Oracle DB SQL Injection via SYS.DBMS_METADATA.GET_GRANTED_XML
Module: auxiliary/sqli/oracle/dbms_metadata_get_granted_xml
Source code: modules/auxiliary/sqli/oracle/dbms_metadata_get_granted_xml.rb
Disclosure date: 2008-01-05
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: -

This module will escalate an Oracle DB user to DBA by exploiting a sql injection bug in the SYS.DBMS_METADATA.GET_GRANTED_XML package/function.

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/dbms_metadata_get_granted_xml
msf auxiliary(dbms_metadata_get_granted_xml) > show targets
    ... a list of targets ...
msf auxiliary(dbms_metadata_get_granted_xml) > set TARGET target-id
msf auxiliary(dbms_metadata_get_granted_xml) > show options
    ... show and set options ...
msf auxiliary(dbms_metadata_get_granted_xml) > exploit

Go back to menu.

Msfconsole Usage


Here is how the sqli/oracle/dbms_metadata_get_granted_xml auxiliary module looks in the msfconsole:

msf6 > use auxiliary/sqli/oracle/dbms_metadata_get_granted_xml

msf6 auxiliary(sqli/oracle/dbms_metadata_get_granted_xml) > show info

       Name: Oracle DB SQL Injection via SYS.DBMS_METADATA.GET_GRANTED_XML
     Module: auxiliary/sqli/oracle/dbms_metadata_get_granted_xml
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2008-01-05

Provided by:
  MC <[email protected]>

Check supported:
  No

Basic options:
  Name    Current Setting     Required  Description
  ----    ---------------     --------  -----------
  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.
  SQL     GRANT DBA to SCOTT  no        SQL to execute.

Description:
  This module will escalate an Oracle DB user to DBA by exploiting a 
  sql injection bug in the SYS.DBMS_METADATA.GET_GRANTED_XML 
  package/function.

References:
  http://www.metasploit.com

Module Options


This is a complete list of options available in the sqli/oracle/dbms_metadata_get_granted_xml auxiliary module:

msf6 auxiliary(sqli/oracle/dbms_metadata_get_granted_xml) > show options

Module options (auxiliary/sqli/oracle/dbms_metadata_get_granted_xml):

   Name    Current Setting     Required  Description
   ----    ---------------     --------  -----------
   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.
   SQL     GRANT DBA to SCOTT  no        SQL to execute.

Advanced Options


Here is a complete list of advanced options supported by the sqli/oracle/dbms_metadata_get_granted_xml auxiliary module:

msf6 auxiliary(sqli/oracle/dbms_metadata_get_granted_xml) > show advanced

Module advanced options (auxiliary/sqli/oracle/dbms_metadata_get_granted_xml):

   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/dbms_metadata_get_granted_xml module can do:

msf6 auxiliary(sqli/oracle/dbms_metadata_get_granted_xml) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the sqli/oracle/dbms_metadata_get_granted_xml auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(sqli/oracle/dbms_metadata_get_granted_xml) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • MC

Version


This page has been produced using Metasploit Framework version 6.1.27-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.