Lucene search

K
zeroscienceGjoko KrsticZSL-2017-5429
HistoryAug 22, 2017 - 12:00 a.m.

Automated Logic WebCTRL 6.5 Insecure File Permissions Privilege Escalation

2017-08-2200:00:00
Gjoko Krstic
zeroscience.mk
172

6.9 Medium

CVSS2

Attack Vector

LOCAL

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:L/AC:M/Au:N/C:C/I:C/A:C

7 High

CVSS3

Attack Vector

LOCAL

Attack Complexity

HIGH

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

7.2 High

AI Score

Confidence

High

0.0005 Low

EPSS

Percentile

18.4%

Title: Automated Logic WebCTRL 6.5 Insecure File Permissions Privilege Escalation
Advisory ID: ZSL-2017-5429
Type: Local
Impact: Privilege Escalation
Risk: (3/5)
Release Date: 22.08.2017

Summary

WebCTRL®, Automated Logic’s web-based building automation system, is known for its intuitive user interface and powerful integration capabilities. It allows building operators to optimize and manage all of their building systems - including HVAC, lighting, fire, elevators, and security - all within a single HVAC controls platform. It’s everything they need to keep occupants comfortable, manage energy conservation measures, identify key operational problems, and validate the results.

Description

WebCTRL server/service suffers from an elevation of privileges vulnerability which can be used by a simple authenticated user that can change the executable file with a binary of choice. The vulnerability exist due to the improper permissions, with the ‘M’ flag (Modify) or ‘C’ flag (Change) for ‘Authenticated Users’ group. The application suffers from an unquoted search path issue as well impacting the service ‘WebCTRL Service’ for Windows deployed as part of WebCTRL server solution. This could potentially allow an authorized but non-privileged local user to execute arbitrary code with elevated privileges on the system. A successful attempt would require the local user to be able to insert their code in the system root path undetected by the OS or other security applications where it could potentially be executed during application startup or reboot. If successful, the local user’s code would execute with the elevated privileges of the application.

Vendor

Automated Logic Corporation - <http://www.automatedlogic.com>

Affected Version

ALC WebCTRL, i-Vu, SiteScan Web 6.5 and prior
ALC WebCTRL, SiteScan Web 6.1 and prior
ALC WebCTRL, i-Vu 6.0 and prior ALC WebCTRL, i-Vu, SiteScan Web 5.5 and prior
ALC WebCTRL, i-Vu, SiteScan Web 5.2 and prior
Note: Current supported versions are 6.5, 6.1 and 6.0

Tested On

Microsoft Windows 7 Professional SP1 (EN)

Vendor Status

[30.01.2017] Vulnerability discovered.
[27.03.2017] Vendor contacted.
[13.04.2017] No response from the vendor.
[14.04.2017] ICS-CERT contacted.
[17.04.2017] ICS-CERT asks details to coordinate with the vendor.
[20.04.2017] Sent details to ICS-CERT.
[21.04.2017] ICS-CERT assigned ticket ID: ICS-VU-696479 to this issue.
[19.05.2017] ICS-CERT informs that the vendor has validated the issues and begun working on patch.
[07.06.2017] Asked ICS-CERT for status update.
[26.06.2017] ICS-CERT responded with vendor info: Vendor has created patch for 6.5 and currently working on patch for 6.1 and 6.0. Patch is available through their tech support organization as an individual patch.
[04.07.2017] Replied to ICS-CERT.
[31.07.2017] ICS-CERT informs that vendor is testing all patches and will shortly communicate to its dealers and installers. Developing an advisory for review and waiting for vendor on specific version details.
[31.07.2017] Replied to ICS-CERT.
[31.07.2017] ICS-CERT provides ZSL a draft advisory for review.
[01.08.2017] Replied to ICS-CERT.
[04.08.2017] Vendor has contacted ZSL with a request for more time.
[04.08.2017] Replied to the vendor and to ICS-CERT with new advisory release date proposal.
[04.08.2017] Vendor contacts ZSL for further discussions and planning.
[04.08.2017] Working with the vendor.
[11.08.2017] Vendor provides update, scheduling official release date to be 22nd of August.
[18.08.2017] Vendor provides mitigation details:

ALC applications should always be installed and maintained in accordance with the guidelines found here: <http://www.automatedlogic.com/Pages/Security.aspx&gt;.
In addition ALC has released the following patches:
WebCTRL 6.0, Cumulative Patch #13
WebCTRL 6.1, Cumulative Patch #7
WebCTRL 6.5, Cumulative Patch #7 + WS65_Security_Update2.update
These patch releases may be obtained on the Automated Logic accounts website or calling Technical Support at 770-429-3002
i-Vu 6.0, Cumulative Patch #13
i-Vu 6.5, Cumulative Patch #7 + WS65_Security_Update2.update
The patch release may be obtained by calling Technical Support at 800-277-9852
SiteScan Web Version 6.1, Cumulative Patch #7, and
SiteScan Web Version 6.5, Cumulative Patch #7 + WS65_Security_Update2.update.
These patches may be obtained by contacting Liebert Services at 1-800-543-2378.
End users should contact their Carrier Controls Expert for i-Vu patches for support on installing the patches.

[22.08.2017] Coordinated public security advisory released.

PoC

webctrl_perm.txt

Credits

Vulnerability discovered by Gjoko Krstic - <[email protected]>

References

[1] <http://www.automatedlogic.com/Pages/Security_commitment.aspx&gt;
[2] Security_Best_Practices_Checklists_for_Building_Automation_Systems_(BAS)pdf.pdf
[3] <https://ics-cert.us-cert.gov/advisories/ICSA-17-234-01&gt;
[4] <https://nvd.nist.gov/vuln/detail/CVE-2017-9644&gt;
[5] <https://vulners.com/cve/CVE-2017-9644&gt;
[6] <https://packetstormsecurity.com/files/143895&gt;
[7] <https://cxsecurity.com/issue/WLB-2017080167&gt;
[8] <https://www.exploit-db.com/exploits/42542/&gt;
[9] <http://www.securityweek.com/automated-logic-patches-flaws-building-automation-system&gt;
[10] <https://exchange.xforce.ibmcloud.com/vulnerabilities/130760&gt;
[11] <http://www.securityfocus.com/bid/100454&gt;

Changelog

[22.08.2017] - Initial release
[23.08.2017] - Added reference [6], [7], [8] and [9]
[25.08.2017] - Added reference [10] and [11]

Contact

Zero Science Lab

Web: <http://www.zeroscience.mk>
e-mail: [email protected]

<html><body><p>Automated Logic WebCTRL 6.5 Insecure File Permissions Privilege Escalation


Vendor: Automated Logic Corporation
Product web page: http://www.automatedlogic.com
Affected version: ALC WebCTRL, i-Vu, SiteScan Web 6.5 and prior
                  ALC WebCTRL, SiteScan Web 6.1 and prior
                  ALC WebCTRL, i-Vu 6.0 and prior
                  ALC WebCTRL, i-Vu, SiteScan Web 5.5 and prior
                  ALC WebCTRL, i-Vu, SiteScan Web 5.2 and prior

Summary: WebCTRL®, Automated Logic's web-based building automation
system, is known for its intuitive user interface and powerful integration
capabilities. It allows building operators to optimize and manage
all of their building systems - including HVAC, lighting, fire, elevators,
and security - all within a single HVAC controls platform. It's everything
they need to keep occupants comfortable, manage energy conservation measures,
identify key operational problems, and validate the results.

Desc: WebCTRL server/service suffers from an elevation of privileges vulnerability
which can be used by a simple authenticated user that can change the executable
file with a binary of choice. The vulnerability exist due to the improper permissions,
with the 'M' flag (Modify) or 'C' flag (Change) for 'Authenticated Users' group.
The application suffers from an unquoted search path issue as well impacting the service
'WebCTRL Service' for Windows deployed as part of WebCTRL server solution. This could
potentially allow an authorized but non-privileged local user to execute arbitrary
code with elevated privileges on the system. A successful attempt would require the
local user to be able to insert their code in the system root path undetected by the
OS or other security applications where it could potentially be executed during
application startup or reboot. If successful, the local user’s code would execute
with the elevated privileges of the application.

Tested on: Microsoft Windows 7 Professional SP1 (EN)


Vulnerability discovered by Gjoko 'LiquidWorm' Krstic
                            @zeroscience


Advisory ID: ZSL-2017-5429
Advisory URL: https://www.zeroscience.mk/en/vulnerabilities/ZSL-2017-5429.php

CVE ID: CVE-2017-9644
CVE URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9644


30.01.2017

---


sc qc "WebCTRL Service"

[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: Webctrl Service
TYPE : 20 WIN32_SHARE_PROCESS 
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\WebCTRL6.0\WebCTRL Service.exe -run
LOAD_ORDER_GROUP : 
TAG : 0
DISPLAY_NAME : WebCTRL Service 6.0
DEPENDENCIES : 
SERVICE_START_NAME : LocalSystem


cacls "C:\WebCTRL6.0\WebCTRL Service.exe"

C:\WebCTRL6.0\WebCTRL Service.exe
  BUILTIN\Administrators:(ID)F 
  NT AUTHORITY\SYSTEM:(ID)F 
  BUILTIN\Users:(ID)R 
  NT AUTHORITY\Authenticated Users:(ID)C


cacls "C:\WebCTRL6.0\WebCTRL Server.exe"

C:\WebCTRL6.0\WebCTRL Server.exe
  BUILTIN\Administrators:(ID)F 
  NT AUTHORITY\SYSTEM:(ID)F 
  BUILTIN\Users:(ID)R 
  NT AUTHORITY\Authenticated Users:(ID)C

</p></body></html>

6.9 Medium

CVSS2

Attack Vector

LOCAL

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:L/AC:M/Au:N/C:C/I:C/A:C

7 High

CVSS3

Attack Vector

LOCAL

Attack Complexity

HIGH

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

7.2 High

AI Score

Confidence

High

0.0005 Low

EPSS

Percentile

18.4%