VMware vSphere Data Protection Private SSH Key Authentication Bypass (VMSA-2016-0024) - Nessus

Critical   Plugin ID: 96338

This page contains detailed information about the VMware vSphere Data Protection Private SSH Key Authentication Bypass (VMSA-2016-0024) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 96338
Name: VMware vSphere Data Protection Private SSH Key Authentication Bypass (VMSA-2016-0024)
Filename: vmware_VMSA-2016-0024.nasl
Vulnerability Published: 2016-12-20
This Plugin Published: 2017-01-09
Last Modification Time: 2021-01-15
Plugin Version: 1.15
Plugin Type: local
Plugin Family: Misc.
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/vSphere Data Protection/Version

Vulnerability Information


Severity: Critical
Vulnerability Published: 2016-12-20
Patch Published: 2016-12-20
CVE [?]: CVE-2016-7456
CPE [?]: cpe:/a:vmware:vsphere_data_protection

Synopsis

A virtualization appliance installed on the remote host is affected by an authentication bypass vulnerability.

Description

The version of VMware vSphere Data Protection installed on the remote host is 5.5.x / 5.8.x / 6.0.x / 6.1.x. It is, therefore, affected by an authentication bypass vulnerability due to the use of an SSH private key that has a known password and which is configured to allow key-based authentication. A remote attacker can exploit this to gain root login access via an SSH session.

Solution

Apply the appropriate patch according to the vendor advisory.

Public Exploits


Target Network Port(s): 22
Target Asset(s): Services/ssh
Exploit Available: True (Metasploit Framework)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the VMware vSphere Data Protection Private SSH Key Authentication Bypass (VMSA-2016-0024) vulnerability:

  1. Metasploit: exploit/linux/ssh/vmware_vdp_known_privkey
    [VMware VDP Known SSH Key]

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.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)

Go back to menu.

Plugin Source


This is the vmware_VMSA-2016-0024.nasl nessus plugin source code. This script is Copyright (C) 2017-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#TRUSTED 3fc4e42954e852db66e42c5b0324dec2ab9e31ee7f506340d1bf66c2d9ce23222f322d53e3c7e7a82bab3cfdcd34eb8ea2fdd069f39f2776801745abd2f9c25223a0bb2b693ec71511371fff26e89f5300a443b64d89402ad561588ed5683a946d82a714f8f8ded559094694a8eea4a8566afb0fa4044f673dd01295efd3c539c800da80d3eeaa81d530338a73f5ca4ca59a4e9ef3c3b370adbd9ea44289bffb8a54ebde0d875d400abe2ea6eec2c6d517bdb8cf85fe28a38159d6e4bf475d96ced880d35e17c0cc37291d708bd969c0d3fa806e4891025de9cda0f56862d5fd55f5a828a3072b1494145f7d5f9c671aa83bb0779146b052cb4c99acf82d000b9e9e314813fdd0e40d29cc1c2e9f6aea2bcdfef0f90b7255e0f40d21031a0d6a5f965595feac4e43a3a7c9967525bfd6896506e16efc95924ce287f6a6429706f50822b2f87985bfe3e095f0d6ca503da43cd9b102e30a070b3d8766f7e0f2d74b29e4e3f9492d19fc1b1a6e4799cf137f662d5288a4b151087eff1d7e011c31d31c0ee89854d2e6cf1e61ac24e491f3a47b5bb4780773479ec387f11d9c1c066fc087ae6225e8dc8a898d21774c70f75194d4940af6e51e3eda8d95a2c29f887a84c2a86d02987e145177a95c262ab5a8665e208edf6e2c3eb31daa643070d7598cb9d6c8ced83d6b4d3f56023a703244d596f06a820c595c68e0b7f05a8d4f
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

if (description)
{
  script_id(96338);
  script_version("1.15");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/15");

  script_cve_id("CVE-2016-7456");
  script_bugtraq_id(94990);
  script_xref(name:"VMSA", value:"2015-0024");

  script_name(english:"VMware vSphere Data Protection Private SSH Key Authentication Bypass (VMSA-2016-0024)");
  script_summary(english:"Checks the version of VMware vSphere Data Protection.");

  script_set_attribute(attribute:"synopsis", value:
"A virtualization appliance installed on the remote host is affected by
an authentication bypass vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of VMware vSphere Data Protection installed on the remote
host is 5.5.x / 5.8.x / 6.0.x / 6.1.x. It is, therefore, affected by
an authentication bypass vulnerability due to the use of an SSH
private key that has a known password and which is configured to allow
key-based authentication. A remote attacker can exploit this to gain
root login access via an SSH session.");
  script_set_attribute(attribute:"see_also", value:"http://www.vmware.com/security/advisories/VMSA-2016-0024.html");
  # https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2147069
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?e458ec43");
  script_set_attribute(attribute:"solution", value:
"Apply the appropriate patch according to the vendor advisory.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");

  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:'VMware VDP Known SSH Key');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2016/12/20");
  script_set_attribute(attribute:"patch_publication_date", value:"2016/12/20");
  script_set_attribute(attribute:"plugin_publication_date", value:"2017/01/09");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:vmware:vsphere_data_protection");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/vSphere Data Protection/Version");
  script_require_ports("Services/ssh", 22);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("ssh_func.inc");


if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS)
  enable_ssh_wrappers();
else disable_ssh_wrappers();

app_name = "vSphere Data Protection";
version = get_kb_item_or_exit("Host/vSphere Data Protection/Version");
port = get_service(svc:'ssh', default:22, exit_on_fail:TRUE);
vuln = FALSE;
admin = FALSE;
root = FALSE;

dpnid = "-----BEGIN DSA PRIVATE KEY-----
MIIBuwIBAAKBgQCWUMSv1kpW6ekyej2CaRNn4uX0YJ1xbzp7s0xXgevU+x5GueQS
mS+Y+DCvN7ea2MOupF9n77I2qVaLuCTZo1bUDWgHFAzc8BIRuxSa0/U9cVUxGA+u
+BkpuepaWGW4Vz5eHIbtCuffZXlRNcTDNrqDrJfKSgZW2EjBNB7vCgb1UwIVANlk
FYwGnfrXgyXiehj0V8p9Mut3AoGANktxdMoUnER7lVH1heIMq6lACWOfdbltEdwa
/Q7OeuZEY434C00AUsP2q6f9bYRCdOQUeSC5hEeqb7vgOe/3HN02GRH7sPZjfWHR
/snADZsWvz0TZQuybs8dEdGh/ezGhiItCINFkVg7NvSXx85dMVsB5N9Ju0gDsZxW
/d41VXYCgYBH0zIlb3lvioedyZj2mKF6fycnCZIeeDnL8wZtZPStRht6i4PFTCX1
Y/Ogw0L0bhuthOx+VTgICB87r0TmXElNUDLSncsxuw7pmHa669idUkv43CjeDkH0
kGFEHt4QA6/xw1Xq9oNpRJTo62ZsFmv0Pwp3uE7up8s0LW1O6fr+OwIVAKCJZ8nm
UwIdhEc9aU7sBDTFijP+
-----END DSA PRIVATE KEY-----";

dpn_pub = "ssh-dss AAAAB3NzaC1kc3MAAACBAJZQxK/WSlbp6TJ6PYJpE2fi5fRgnXFvOnuzTFeB69T7Hka55BKZL5j4MK83t5rYw66kX2fvsjapVou4JNmjVtQNaAcUDNzwEhG7FJrT9T1xVTEYD674GSm56lpYZbhXPl4chu0K599leVE1xMM2uoOsl8pKBlbYSME0Hu8KBvVTAAAAFQDZZBWMBp3614Ml4noY9FfKfTLrdwAAAIA2S3F0yhScRHuVUfWF4gyrqUAJY591uW0R3Br9Ds565kRjjfgLTQBSw/arp/1thEJ05BR5ILmER6pvu+A57/cc3TYZEfuw9mN9YdH+ycANmxa/PRNlC7Juzx0R0aH97MaGIi0Ig0WRWDs29JfHzl0xWwHk30m7SAOxnFb93jVVdgAAAIBH0zIlb3lvioedyZj2mKF6fycnCZIeeDnL8wZtZPStRht6i4PFTCX1Y/Ogw0L0bhuthOx+VTgICB87r0TmXElNUDLSncsxuw7pmHa669idUkv43CjeDkH0kGFEHt4QA6/xw1Xq9oNpRJTo62ZsFmv0Pwp3uE7up8s0LW1O6fr+Ow== dpn@dpn41s";

if (
    version =~ "^(5\.[58]|6\.[01])([^0-9]|$)"
    )
{
  sock_g = ssh_open_connection();
  if (! sock_g) audit(AUDIT_SOCK_FAIL, port);

  admin_authkeys = ssh_cmd(cmd:"cat /home/admin/.ssh/authorized_keys*");
  root_authkeys = ssh_cmd(cmd:"cat /root/.ssh/authorized_keys*");

  if(dpn_pub >< admin_authkeys) admin = TRUE;
  if(dpn_pub >< root_authkeys) root = TRUE;

  ssh_close_connection();
}

else
  audit(AUDIT_NOT_INST, app_name +" 5.5.x / 5.8.x / 6.0.x / 6.1.x ");

if (admin || root)
{
  report =
    '\nThe following users have a compromised ssh key in their authorized_keys file : \n\n';
  report +=   'Users : ';
  if(admin)
    report += '\n  - admin';
  if(root)
    report += '\n  - root';
    report +=
    '\n\nPrivate Key  : \n\n' + dpnid +
    '\n\nPublic Key   : \n' + dpn_pub + '\n';
  security_report_v4(severity:SECURITY_HOLE, port:0, extra:report);
}
else audit(AUDIT_INST_VER_NOT_VULN, app_name, version);

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

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/vmware_VMSA-2016-0024.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\vmware_VMSA-2016-0024.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/vmware_VMSA-2016-0024.nasl

Go back to menu.

How to Run


Here is how to run the VMware vSphere Data Protection Private SSH Key Authentication Bypass (VMSA-2016-0024) 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 Misc. plugin family.
  6. On the right side table select VMware vSphere Data Protection Private SSH Key Authentication Bypass (VMSA-2016-0024) plugin ID 96338.
  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 vmware_VMSA-2016-0024.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a vmware_VMSA-2016-0024.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - vmware_VMSA-2016-0024.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 vmware_VMSA-2016-0024.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: VMSA | VMware Security Advisory: See also: Similar and related Nessus plugins:
  • 89661 - VMware ESX / ESXi Authentication Service and Third-Party Libraries Multiple Vulnerabilities (VMSA-2013-0001) (remote check)
  • 89662 - VMware ESX / ESXi VMCI Privilege Escalation (VMSA-2013-0002) (remote check)
  • 89663 - VMware ESX / ESXi NFC and Third-Party Libraries Multiple Vulnerabilities (VMSA-2013-0003) (remote check)
  • 89666 - VMware ESX / ESXi Third-Party Libraries Multiple Vulnerabilities (VMSA-2013-0009) (remote check)
  • 89668 - VMware ESX / ESXi Multiple Vulnerabilities (VMSA-2013-0012) (remote check)
  • 89673 - VMware ESX Third-Party Libraries Multiple Vulnerabilities (VMSA-2011-0001) (remote check)
  • 89674 - VMware ESX / ESXi Third-Party Libraries Multiple Vulnerabilities (VMSA-2011-0003) (remote check)
  • 89676 - VMware ESX / ESXi Multiple Vulnerabilities (VMSA-2011-0007) (remote check)
  • 89678 - VMware ESX / ESXi Multiple Vulnerabilities (VMSA-2011-0009) (remote check)
  • 89679 - VMware ESX Third-Party Libraries Multiple Vulnerabilities (VMSA-2011-0010) (remote check)
  • 89680 - VMware ESX / ESXi Third-Party Libraries Multiple Vulnerabilities (VMSA-2011-0012) (remote check)
  • 89681 - VMware ESX / ESXi Third-Party Libraries Multiple Vulnerabilities (VMSA-2011-0013) (remote check)
  • 91322 - VMware vCenter Server 5.0.x < 5.0u3e / 5.1.x < 5.1u3b / 5.5.x < 5.5u3 (Linux) / 5.5.x < 5.5u3b (Windows) / 6.0.x < 6.0.0b JMX Deserialization RCE (VMSA-2016-0005)
  • 91339 - VMware VRealize Operations Manager 6.x Oracle JRE JMX Deserialization RCE (VMSA-2016-0005)
  • 91457 - VMware vSphere Replication Oracle JRE JMX Deserialization RCE (VMSA-2016-0005)
  • 91828 - VMware vCloud Director 5.5.x < 5.5.6.1 / 5.6.x < 5.6.5.1 / 8.0.x < 8.0.1.1 JMX Deserialization RCE (VMSA-2016-0005)
  • 92949 - ESXi 5.0 / 5.1 / 5.5 / 6.0 Multiple Vulnerabilities (VMSA-2016-0010) (remote check)
  • 99129 - ESXi 5.5 < Build 5230635 Multiple Vulnerabilities (VMSA-2017-0006) (remote check)
  • 99130 - ESXi 6.0 U1 < Build 5251621 / 6.0 U2 < Build 5251623 / 6.0 U3 < Build 5224934 Multiple Vulnerabilities (VMSA-2017-0006) (remote check)
  • 99131 - ESXi 6.5 < Build 5224529 Multiple Vulnerabilities (VMSA-2017-0006) (remote check)
  • 99474 - VMware vCenter Server Appliance BlazeDS AMF3 RCE (VMSA-2017-0007)
  • 99475 - VMware vCenter Server 6.0.x < 6.0u3b / 6.5.x < 6.5c BlazeDS AMF3 RCE (VMSA-2017-0007)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file vmware_VMSA-2016-0024.nasl version 1.15. For more plugins, visit the Nessus Plugin Library.

Go back to menu.