### 简要描述:
无视gpc。
### 详细说明:
在plus/count/count.php中
```
if($c_come=='') $c_come="网址输入或收藏夹打开";
$c_page=$_SERVER["HTTP_REFERER"];
$c_year=date('Y');$c_month=date('m');$c_day=date('d');$c_hour=date('H');
$c_time=date('Y-m-d H:i:s');$c_week=date('w');
$c_where=trim(getip_from($c_ip));
$date=date("Y-m-d");
$rss = $db->get_one("SELECT c_ip FROM {$cfg['tb_pre']}count WHERE DATE(c_time)='$date' AND c_ip='$c_ip' ORDER BY c_id DESC LIMIT 1");
$sql="INSERT INTO {$cfg['tb_pre']}count(c_ip,c_where,c_come,c_page,c_brower,c_os,c_year,c_month,c_day,c_hour,c_time,c_week) VALUES('$c_ip','$c_where','$c_come','$c_page','$c_brower','$c_os','$c_year','$c_month','$c_day','$c_hour','$c_time','$c_week')";
$db->get_one($sql);
$c_id=$db ->insert_id();
```
$c_page=$_SERVER["HTTP_REFERER"];
这里直接获取server中的referer 然后直接带入到了insert当中进行查询。
因为全局中的SERVER变量 未过滤
造成了注入。
[<img src="https://images.seebug.org/upload/201408/21014346b2dd6a8e31279534f3ad50244fbfe668.jpg" alt="6.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/21014346b2dd6a8e31279534f3ad50244fbfe668.jpg)
报错了 此时执行的语句为
INSERT INTO job_count(c_ip,c_where,c_come,c_page,c_brower,c_os,c_year,c_month,c_day,c_hour,c_time,c_week) VALUES('127.0.0.1','本机地址','网址输入或收藏夹打开','a'','others','Windows 2000','2014','08','18','20','2014-08-18 20:31:20','1')
构造一下语句。
[<img src="https://images.seebug.org/upload/201408/21014653c31cb353cffdfdaa28b175e980edea03.jpg" alt="7.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/21014653c31cb353cffdfdaa28b175e980edea03.jpg)
即可盲注。
### 漏洞证明:
[<img src="https://images.seebug.org/upload/201408/21014346b2dd6a8e31279534f3ad50244fbfe668.jpg" alt="6.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/21014346b2dd6a8e31279534f3ad50244fbfe668.jpg)
暂无评论