Docker Desktop < 2.1.0.1 Privilege Escalation - Nessus

High   Plugin ID: 155350

This page contains detailed information about the Docker Desktop < 2.1.0.1 Privilege Escalation Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 155350
Name: Docker Desktop < 2.1.0.1 Privilege Escalation
Filename: docker_for_windows_CVE-2019-15752.nasl
Vulnerability Published: 2019-08-23
This Plugin Published: 2021-11-15
Last Modification Time: 2022-01-20
Plugin Version: 1.4
Plugin Type: local
Plugin Family: Windows
Dependencies: docker_for_windows_installed.nbin
Required KB Items [?]: installed_sw/Docker for Windows, SMB/Registry/Enumerated

Vulnerability Information


Severity: High
Vulnerability Published: 2019-08-23
Patch Published: 2019-08-08
CVE [?]: CVE-2019-15752
CPE [?]: cpe:/a:docker:docker

Synopsis

The remote host has an application installed that is affected by a privilege escalation vulnerability.

Description

The version of Docker Desktop for Windows is prior to 2.1.0.1. Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-credential-wincred.exe file in %PROGRAMDATA%\DockerDesktop\version-bin\ as a low-privilege user, and then waiting for an admin or service user to authenticate with Docker, restart Docker, or run 'docker login' to force the command.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Docker Desktop version 2.1.0.1 or later

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Docker Desktop < 2.1.0.1 Privilege Escalation vulnerability:

  1. Metasploit: exploit/windows/local/docker_credential_wincred
    [Docker-Credential-Wincred.exe Privilege Escalation]
  2. Exploit-DB: exploits/windows/local/48388.rb
    [EDB-48388: Docker-Credential-Wincred.exe - Privilege Escalation (Metasploit)]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2019-15752
CVSS V2 Vector: AV:N/AC:M/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:8.1 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.1 (High)
CVSS V3 Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:7.8 (High)
Impact Subscore:5.9
Exploitability Subscore:1.8
CVSS Temporal Score:7.5 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.5 (High)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the docker_for_windows_CVE-2019-15752.nasl nessus plugin source code. This script is Copyright (C) 2018-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
##
# (C) Tenable Network Security, Inc.
##

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(155350);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/01/20");

  script_cve_id("CVE-2019-15752");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"Docker Desktop < 2.1.0.1 Privilege Escalation");

  script_set_attribute(attribute:"synopsis", value:
"The remote host has an application installed that is affected by a privilege escalation vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of Docker Desktop for Windows is prior to 2.1.0.1. Docker Desktop Community Edition before 2.1.0.1 allows
local users to gain privileges by placing a Trojan horse docker-credential-wincred.exe file in
%PROGRAMDATA%\DockerDesktop\version-bin\ as a low-privilege user, and then waiting for an admin or service user to
authenticate with Docker, restart Docker, or run 'docker login' to force the command.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
number.");
  # https://medium.com/@morgan.henry.roman/elevation-of-privilege-in-docker-for-windows-2fd8450b478e
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?3c485c1e");
  # https://docs.docker.com/desktop/windows/release-notes/2.x/#docker-desktop-community-2101
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?dbafae3b");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Docker Desktop version 2.1.0.1 or later");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-15752");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Docker-Credential-Wincred.exe Privilege Escalation');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/08/23");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/08/08");
  script_set_attribute(attribute:"plugin_publication_date", value:"2021/11/15");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:docker:docker");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows");

  script_copyright(english:"This script is Copyright (C) 2018-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("docker_for_windows_installed.nbin");
  script_require_keys("installed_sw/Docker for Windows", "SMB/Registry/Enumerated");

  exit(0);
}

include('vcf.inc');

get_kb_item_or_exit('SMB/Registry/Enumerated');
var app_info = vcf::get_app_info(app:'Docker for Windows', win_local:TRUE);

var constraints = [{'fixed_version':'2.1.0.1'}];

vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_HOLE);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/docker_for_windows_CVE-2019-15752.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\docker_for_windows_CVE-2019-15752.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/docker_for_windows_CVE-2019-15752.nasl

Go back to menu.

How to Run


Here is how to run the Docker Desktop < 2.1.0.1 Privilege Escalation as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Windows plugin family.
  6. On the right side table select Docker Desktop < 2.1.0.1 Privilege Escalation plugin ID 155350.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl docker_for_windows_CVE-2019-15752.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a docker_for_windows_CVE-2019-15752.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - docker_for_windows_CVE-2019-15752.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state docker_for_windows_CVE-2019-15752.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 34963 - Altiris Deployment Solution Agent < 6.9.355 Local Privilege Escalation (SYM08-019)
  • 86302 - Cisco AnyConnect Secure Mobility Client 3.x < 3.1.11004.0 / 4.x < 4.1.6020.0 Privilege Escalation
  • 95951 - Cisco AnyConnect Secure Mobility Client 3.1.x < 4.3.4019.0 / 4.4.x < 4.4.225.0 Privilege Escalation
  • 97226 - Cisco AnyConnect Secure Mobility Client 4.0.x < 4.3.05017 / 4.4.x < 4.4.00243 SBL Module Privilege Escalation
  • 136927 - Druva inSync Windows Client < 6.6.4 Privilege Escalation
  • 152164 - HP, Samsung, and Xerox Printer Driver Privilege Escalation (CVE-2021-3438)
  • 81247 - McAfee DLPe Agent Privilege Escalation Vulnerability on Windows XP (SB10097)
  • 29898 - Novell Client nicm.sys Local Privilege Escalation
  • 33481 - Novell Client nwfs.sys Local Privilege Escalation
  • 156380 - Plex Media Server < 1.25.0.5282 Privilege Escalation
  • 137857 - Pulse Secure Desktop Client TOCTOU Privilege Escalation Vulnerability (SA44503)
  • 144327 - Pulse Secure Installer Service TOCTOU Privilege Escalation Vulnerability (SA44503)
  • 135708 - TeamViewer Insecure Directory Permissions Privilege Escalation
  • 33819 - Sun xVM VirtualBox < 1.6.4 Local Privilege Escalation
  • 58793 - VMware Player Local Privilege Escalation (VMSA-2012-0007)
  • 64920 - VMware View 4.x < 4.6.2 / 5.x < 5.1.2 VMCI Privilege Escalation (VMSA-2013-0002)
  • 105789 - VMware vRealize Operations for Horizon Desktop Agent 6.x < 6.5.1 Privilege Escalation Vulnerability (VMSA-2018-0003)
  • 105790 - VMware vRealize Operations for Published Applications Desktop Agent 6.x < 6.5.1 Privilege Escalation Vulnerability (VMSA-2018-0003)
  • 58794 - VMware Products Local Privilege Escalation (VMSA-2012-0007)
  • 64921 - VMware Workstation 8.x < 8.0.5 / 9.x < 9.0.1 VMCI Privilege Escalation (VMSA-2013-0002)
  • 25684 - WinPcap NPF.SYS Local Privilege Escalation

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file docker_for_windows_CVE-2019-15752.nasl version 1.4. For more plugins, visit the Nessus Plugin Library.

Go back to menu.