Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Druva inSync Windows Client Local Privilege Escalation (CVE-2019-3999 Patch Bypass)

High

Synopsis

The Windows Druva inSync Client Service (inSyncCPHwnet64.exe) contains a path traversal vulnerability that can be exploited by a local, unauthenticated attacker to execute OS commands with SYSTEM privileges. When processing RPC type 5 requests over TCP port 6064, inSyncCPHwnet64.exe does not properly validate request data prior to passing it to the CreateProcessW() function. By sending a crafted RPC request, an attacker can elevate privileges to SYSTEM.

Specifically, this vulnerability exists due to an incomplete patch for CVE-2019-3999. Input validation was implemented to ensure only executables existing in the C:\ProgramData\Druva\inSync4\ directory can be executed, but this logic can be bypassed by using ..\ to traverse the directory tree structure. Validation is passed because the executable path leads with C:\ProgramData\Druva\inSync4\.

Proof of Concept (PoC)

See GitHub

druva_win_cphwnet64.py has been provided to demonstrate proof of concept. The PoC will execute a command of your choosing. Below is an example invocation of the script.

python druva_win_cphwnet64.py "C:\ProgramData\Druva\inSync4\..\..\..\Windows\system32\net.exe user /add druvatest"

Below is a log entry in inSyncCPH.log showing a successful exploitation attempt. Notice that the command 'net user /add druvatest' was executed.

25/02/2020 06:37:36	:Got a request to create a process for sysstate. converted: 82, cmd: C:\ProgramData\Druva\inSync4\..\..\..\Windows\system32\net.exe user /add druvatest
25/02/2020 06:37:36	:The binary C:\ProgramData\Druva\inSync4\..\..\..\Windows\system32\net.exe user /add druvatest is from insync path - C:\ProgramData\Druva\inSync4\. Will execute it 
25/02/2020 06:37:36	:Exit code for sysstate process is 0 and return value is 1

Solution

Upgrade to Druva inSync client version 6.6.4 or higher.

Disclosure Timeline

02/25/2020 - Disclosed to vendor. 90-day date is May 25, 2020.
02/25/2020 - Druva confirms receipt of the report.
03/19/2020 - Tenable asks for an update.
03/20/2020 - Druva acknowledges. They will discuss internally and get back to us on a fix timeline.
03/20/2020 - Tenable thanks Druva.
04/13/2020 - Tenable asks for an update.
04/14/2020 - Druva says they are working on an exact fix. Will update us by the end of this week.
04/14/2020 - Tenable thanks Druva.
04/27/2020 - Tenable asks for an update.
04/27/2020 - Druva is targeting a May 1st release of an intermediate build.
04/28/2020 - Tenable acknowledges. Reiterates our policy and willingness to test the build.
05/05/2020 - Matteo Malvica informs us that he submitted this same bug to Druva. Druva told him that Tenable found it first, and it is a duplicate.
05/06/2020 - M. Malvica asks to be mentioned in our public disclosure.
05/06/2020 - Tenable contacts Druva to verify if M. Malvica has, indeed, submitted a duplicate finding.
05/06/2020 - Druva confirms this was a duplicate. Druva forwards us the communications.
05/07/2020 - Tenable tells M. Malvica that we will credit him for independent discovery. Asks how he would like to be acknowledged.
05/07/2020 - M. Malvica asks to be acknowledged as such: “Matteo Malvica from mnemonic”.
05/07/2020 - Tenable sends M. Malvica our disclosure policy and anticipated disclosure date (which Druva has already communicated as well).
05/07/2020 - M. Malvica says he will publish a blog post once the fix is disclosed. Asks for CVE ID.
05/07/2020 - Tenable shares CVE ID.
05/11/2020 - Tenable thanks Druva for sharing the information.
05/11/2020 - M. Malvica shares a URL for his blog post. Asks for an update on patch availability.
05/11/2020 - Tenable has not heard anything from Druva. Will let Malvica know if we get any updates.
05/18/2020 - Tenable asks if Druva will be able to make the disclosure date, 5/25.
05/18/2020 - Druva will release a patch May 21.
05/18/2020 - Tenable acknowledges. We will assign CVE-2020-5752 for this, and issue an advisory.
05/19/2020 - Tenable let's M. Malvica know of the planned release date. But also says we will hold off if the patch is not released on the 21st.
05/20/2020 - M. Malvica asks if we have a pre-allocated link for our research advisory. Also says his blog post will be on a company website.
05/20/2020 - Tenable communicates planned research advisory URL.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

CVE ID: CVE-2020-5752
Tenable Advisory ID: TRA-2020-34
Credit:
Independently discovered by Chris Lyne of Tenable, Inc. and Matteo Malvica from mnemonic
CVSSv2 Base / Temporal Score:
7.2
CVSSv2 Vector:
AV:L/AC:L/Au:N/C:C/I:C/A:C
Affected Products:
Druva inSync Windows Client 6.6.3
Risk Factor:
High

Advisory Timeline

05/21/2020 Advisory published.