2005-11-10 21:59:58 by: h4x0r

CMailServer邮件系统附件下载模块下载邮件系统安装盘任意文件漏洞

Font Size: Large | Medium | Small
Our Team: http://www.ph4nt0m.org
Author: 云舒(wustyunshu@hotmail.com)
Date: 2005-11-06

严重程度:中等
错误类型:参数检查不严
影响系统:本漏洞在CMailServer最新版本5.3版本中发现,低于此版本的没有测试。

描述:

晚上帮朋友看CmailServer邮件系统下载模块的问题的时候,用admin登陆,发现下载附件地
址如下:http://127.0.0.1/mail/download.asp?urlOfAttach=%2Fmaildata%2Fadmin%2F53985947007996%2F3%2Fprogram%2Etar1%2Egz将URL编码还原之后,地址为http://127.0.0.1/mail/download.asp?urlOfAttach=/maildata/admin/53985947007996/3/program.tar1.gz,参数中admin为帐户名,每个帐户都会有一个单独的文件夹储存文件,3表示这是第三封邮件,program.tar1.gz为附件名称。

在download.asp文件中,下载文件主要代码如下:

If Session("LoginSuccess")=1 Then
If Left(Request("urlOfAttach"), 10) = "/maildata/" Then
Dim download
Set download = Server.CreateObject("CMailCOM.POP3.1")
download.Download Request("urlOfAttach"), Response
Set download = Nothing
Response.End
End If
End If

在这里,程序仅仅判断了是否登陆成功和参数urlOfAttach开头的十个字符是否是/maildata/,而没有对后面的字符继续进行判断。当尝试提交URL为http://icy/mail/download.asp?urlOfAttach=/maildata/../config.ini时,成功下载到CMailServer的配置文件,同样的,通过../实现目录转跳,远程攻击者可以下载到CMailServer安装盘的任何文件。

此外,CMailServer在用户登陆时,帐户密码均明文保存在Cookie中。

汗一下,不知道有没有发现过,俺粗略的google下,好象没有吧。。。吧。。。
Comments Feed Comments Feed: http://www.4evil.org/feed.asp?q=comment&id=29

There is no comment on this article.

Post Comment
Smilies
[smile] [confused] [cool] [cry]
[eek] [angry] [wink] [sweat]
[lol] [stun] [razz] [redface]
[rolleyes] [sad] [yes] [no]
[heart] [star] [music] [idea]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code