SquirrelMail SquirrelSpell 远程命令可执行漏洞发布时间:2002-01-28 更新时间:2002-01-28 严重程度:高 威胁程度:普通用户访问权限 错误类型:输入验证错误 利用方式:服务器模式 BUGTRAQ ID:3952 受影响系统 SquirrelMail SquirrelSpell 0.3.5详细描述 SquirrelMail是一款PHP4编写的WEB MAIL程序,支持多种系统平台。 SquirrelSpell 是一款SquirrelMail的插件,如果直接调用,就传递用户的输入 给一SHELL命令,如果输入包含SHELL元字符,可导致任意命令可执行能够。远程 用户可以以'nobody'的身份获得对系统的访问。问题存在于check_me.mod.php 中: $sqspell_command = $SQSPELL_APP[$sqspell_use_app]; ... $floc = "$attachment_dir/$username_sqspell_data.txt"); ... exec ("cat $floc | $sqspell_command", $sqspell_output 这里没有定义$attachment_dir,通过设置$sqspell_command 和 $floc导致任意 命令可执行。 测试代码 host/plugins/squirrelspell/modules/check_me.mod.php?SQSPELL_APP[blah]=wall% 20hello&sqspell_use_app=blah&attachment_dir=/tmp&username_sqspell_data=plik 解决方案 下载并使用如下补丁程序: SquirrelMail SquirrelSpell 0.3.5: Konstantin Riabitsev Patch security_fix.sh http://www.dulug.duke.edu/~icon/misc/security_fix.sh.txt 相关信息 |