首页 -> 安全研究

安全研究

安全漏洞
SquirrelMail SquirrelSpell远程执行任意命令漏洞

发布日期:2002-01-24
更新日期:2002-01-24

受影响系统:
SquirrelMail SquirrelSpell 0.3.5
    - Unix系统
描述:
BUGTRAQ  ID: 3952
CVE(CAN) ID: CVE-2002-1650

SquirrelMail是一个用php4写的功能丰富的webmail程序。可以运行于Linux/Unix系统。SquirrelMail允许通过插件来扩展功能。

SquirrelMail的插件SquirrelSpell直接调用用户输入的shell命令,用户输入字串包含的shell命令将以'nobody'的权限任意的运行。

SquirrelSpell的较早版本可能也有此漏洞。

<*来源:appelast (appelast@bsquad.sm.pl
  
  链接:http://archives.neohapsis.com/archives/bugtraq/2002-01/0296.html
        http://archives.neohapsis.com/archives/bugtraq/2002-01/0306.html
        http://www.securityfocus.com/archive/1/252243
*>

测试方法:

警 告

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

appelast (appelast@bsquad.sm.pl)提供了如下测试方法:

host/plugins/squirrelspell/modules/check_me.mod.php?SQSPELL_APP[blah]=wall%
20hello&sqspell_use_app=blah&attachment_dir=/tmp&username_sqspell_data=plik

建议:
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* 暂时禁止使用check_me.mod.php程序。

厂商补丁:

SquirrelMail
------------
程序作者提供了一个补丁程序,将下列shell脚本保存到squirrelmail/plugins/squirrelspell目录下,然后执行就可以修复此安全漏洞。

--- begin sqspell_security_fix.sh ---
#!/bin/sh
sed "s/.mod.php/.mod/g" sqspell_interface.php > tmp.1
sed "s/.mod.php/.mod/g" sqspell_options.php > tmp.2
mv -f tmp.1 sqspell_interface.php
mv -f tmp.2 sqspell_options.php
cd modules
for FILE in *.mod.php; do
        NEWFILE=`echo $FILE | sed 's/.php//'`
        mv $FILE $NEWFILE
done
--- end sqspell_security_fix.sh ---

您也可以从下列地址下载:
http://www.dulug.duke.edu/~icon/misc/security_fix.sh.txt

squirrelmail-1.2.4 将会包含上述补丁,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.squirrelmail.org

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