net2ftp validateGeneriInput()函数跨站脚本漏洞
发布日期:2009-04-08
更新日期:2009-04-10
受影响系统:net2ftp net2ftp <= 0.97
描述:
BUGTRAQ ID:
34440
net2ftp是一款基于Web的FTP客户端。
net2ftp的validateGeneriInput()函数存在笔误,导致负责获取“<”和“>”字符的正则表达式失效:
+++includes/registerglobals.inc.php @@ 1088:1102
1088 function validateGenericInput($input) {
1089
1090 // --------------
1091 // Remove the following characters <>
1092 // --------------
1093
1094 // Remove XSS code
1095 // $input = RemoveXSS($input);
1096
1097 // Remove < >
XXX 1098 $input = preg_replace("/\\<\\>]/", "", $input);
1099
1100 return $input;
1101
1102 } // end validateGenericInput
---includes/registerglobals.inc.php
This can be easily fixed adding a "[" character to the pattern:
+++
$input = preg_replace("/[\\<\\>]/", "", $input);
在1098行缺少一个“[”字符,正确的模式应为“$input = preg_replace("/[\\<\\>]/", "", $input);”。由于这个笔误,远程攻击者可以执行跨站脚本攻击。
<*来源:cicatriz (
c1c4tr1z@voodoo-labs.org)
链接:
http://marc.info/?l=bugtraq&m=123929158008538&w=2
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
http://www.example.com/?state=login_small&errormessage=<iframe onload="alert(/voodoo/.source);">
建议:
厂商补丁:
net2ftp
-------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.net2ftp.com/浏览次数:3413
严重程度:0(网友投票)