Photon OS 2.0: Polkit PHSA-2021-2.0-0350 - Nessus

High   Plugin ID: 150288

This page contains detailed information about the Photon OS 2.0: Polkit PHSA-2021-2.0-0350 Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 150288
Name: Photon OS 2.0: Polkit PHSA-2021-2.0-0350
Filename: PhotonOS_PHSA-2021-2_0-0350_polkit.nasl
Vulnerability Published: 2021-06-03
This Plugin Published: 2021-06-04
Last Modification Time: 2022-03-01
Plugin Version: 1.5
Plugin Type: local
Plugin Family: PhotonOS Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/local_checks_enabled, Host/PhotonOS/release, Host/PhotonOS/rpm-list

Vulnerability Information


Severity: High
Vulnerability Published: 2021-06-03
Patch Published: 2021-06-04
CVE [?]: CVE-2021-3560
CPE [?]: cpe:/o:vmware:photonos:2.0, p-cpe:/a:vmware:photonos:polkit

Synopsis

The remote PhotonOS host is missing multiple security updates.

Description

An update of the polkit package has been released.

Solution

Update the affected Linux packages.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Photon OS 2.0: Polkit PHSA-2021-2.0-0350 vulnerability:

  1. Metasploit: exploit/linux/local/polkit_dbus_auth_bypass
    [Polkit D-Bus Authentication Bypass]
  2. Exploit-DB: exploits/linux/local/50011.sh
    [EDB-50011: Polkit 0.105-26 0.117-2 - Local Privilege Escalation]
  3. GitHub: https://github.com/0Day-dev/CVE-2021-3560
    [CVE-2021-3560: Polkit D-Bus Authentication Bypass Exploit]
  4. GitHub: https://github.com/0dayNinja/CVE-2021-3560
    [CVE-2021-3560]
  5. GitHub: https://github.com/0xsyr0/OSCP
    [CVE-2021-3560]
  6. GitHub: https://github.com/595cyi/CVE-2021-3560
    [CVE-2021-3560: a reliable C based exploit for CVE-2021-3560.]
  7. GitHub: https://github.com/AssassinUKG/Polkit-CVE-2021-3560
    [CVE-2021-3560]
  8. GitHub: https://github.com/EGI-Federation/SVG-advisories
    [CVE-2021-3560]
  9. GitHub: https://github.com/GatoGamer1155/CVE-2021-3560
    [CVE-2021-3560: Script en python sobre la vulnerabilidad CVE-2021-3560]
  10. GitHub: https://github.com/Ignitetechnologies/Linux-Privilege-Escalation
    [CVE-2021-3560]
  11. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-3560]
  12. GitHub: https://github.com/STEALTH-Z/CVE-2021-3560
    [CVE-2021-3560]
  13. GitHub: https://github.com/aasphixie/aasphixie.github.io
    [CVE-2021-3560]
  14. GitHub: https://github.com/binganao/vulns-2022
    [CVE-2021-3560]
  15. GitHub: https://github.com/chenaotian/CVE-2021-3560
    [CVE-2021-3560: CVE-2021-3560 analysis]
  16. GitHub: https://github.com/innxrmxst/CVE-2021-3560
    [CVE-2021-3560]
  17. GitHub: https://github.com/liamg/traitor
    [CVE-2021-3560]
  18. GitHub: https://github.com/mr-nO0b/CVE-2021-3560
    [CVE-2021-3560]
  19. GitHub: https://github.com/mr-nobody20/CVE-2021-3560
    [CVE-2021-3560]
  20. GitHub: https://github.com/oxagast/oxasploits
    [CVE-2021-3560]
  21. GitHub: https://github.com/puckiestyle/CVE-2021-4034
    [CVE-2021-3560]
  22. GitHub: https://github.com/secnigma/CVE-2021-3560-Polkit-Privilege-Esclation
    [CVE-2021-3560]
  23. GitHub: https://github.com/tyleraharrison/CVE-2021-3560_PoC
    [CVE-2021-3560: polkit exploit script v1.0]
  24. GitHub: https://github.com/tyyu3/mitre_example
    [CVE-2021-3560]
  25. GitHub: https://github.com/aancw/polkit-auto-exploit
    [CVE-2021-3560: Automatic Explotation PoC for Polkit CVE-2021-3560]
  26. GitHub: https://github.com/Almorabea/Polkit-exploit
    [CVE-2021-3560: Privilege escalation with polkit - CVE-2021-3560]
  27. GitHub: https://github.com/BizarreLove/CVE-2021-3560
    [CVE-2021-3560: NYCY_homework_&_meeting]
  28. GitHub: https://github.com/curtishoughton/CVE-2021-3560
    [CVE-2021-3560: Polkit - Local Privilege Escalation (CVE-2021-3560)]
  29. GitHub: https://github.com/deathflash1411/CVE-2021-3560
    [CVE-2021-3560: CVE-2021-3560 (Polkit - Local Privilege Escalation)]
  30. GitHub: https://github.com/f4T1H21/CVE-2021-3560-Polkit-DBus
    [CVE-2021-3560: F4T1H's PoC script for CVE-2021-3560 Polkit D-Bus Privilege Escalation]
  31. GitHub: https://github.com/iSTARLabs/CVE-2021-3560_PoC
    [CVE-2021-3560: Polkit exploit script v1.0]
  32. GitHub: https://github.com/n3onhacks/CVE-2021-3560
    [CVE-2021-3560: Polkit Exploit (CVE-2021-3560), no download capabilty? Copy and paste it!]
  33. GitHub: https://github.com/Nosferatuvjr/Vivald0x6f
    [CVE-2021-3560: CVE-2021-3560 Polkit v0.105-26 Linux Privilege Escalation PoC by Vivald0x6f]
  34. GitHub: https://github.com/swapravo/polkadots
    [CVE-2021-3560: CVE-2021-3560 Local PrivEsc Exploit]
  35. GitHub: https://github.com/hakivvi/CVE-2021-3560
    [CVE-2021-3560: A reliable C based exploit and writeup for CVE-2021-3560.]

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-2021-3560
CVSS V2 Vector: AV:L/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:7.2 (High)
Impact Subscore:10.0
Exploitability Subscore:3.9
CVSS Temporal Score:6.0 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.0 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:7.8 (High)
Impact Subscore:5.9
Exploitability Subscore:1.8
CVSS Temporal Score:7.2 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.2 (High)

Go back to menu.

Plugin Source


This is the PhotonOS_PHSA-2021-2_0-0350_polkit.nasl nessus plugin source code. This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
##
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from VMware Security Advisory PHSA-2021-2.0-0350. The text
# itself is copyright (C) VMware, Inc.
##

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

if (description)
{
  script_id(150288);
  script_version("1.5");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/03/01");

  script_cve_id("CVE-2021-3560");

  script_name(english:"Photon OS 2.0: Polkit PHSA-2021-2.0-0350");

  script_set_attribute(attribute:"synopsis", value:
"The remote PhotonOS host is missing multiple security updates.");
  script_set_attribute(attribute:"description", value:
"An update of the polkit package has been released.");
  script_set_attribute(attribute:"see_also", value:"https://github.com/vmware/photon/wiki/Security-Updates-2-350.md");
  script_set_attribute(attribute:"solution", value:
"Update the affected Linux packages.");
  script_set_cvss_base_vector("CVSS2#AV:L/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:L/AC:L/PR:L/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:"cvss_score_source", value:"CVE-2021-3560");

  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:'Polkit D-Bus Authentication Bypass');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2021/06/03");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/06/04");
  script_set_attribute(attribute:"plugin_publication_date", value:"2021/06/04");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:polkit");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:vmware:photonos:2.0");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"PhotonOS Local Security Checks");

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/PhotonOS/release", "Host/PhotonOS/rpm-list");

  exit(0);
}

include('audit.inc');
include('global_settings.inc');
include('rpm.inc');

if (!get_kb_item('Host/local_checks_enabled')) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

release = get_kb_item('Host/PhotonOS/release');
if (isnull(release) || release !~ "^VMware Photon") audit(AUDIT_OS_NOT, 'PhotonOS');
if (release !~ "^VMware Photon (?:Linux|OS) 2\.0(\D|$)") audit(AUDIT_OS_NOT, 'PhotonOS 2.0');

if (!get_kb_item('Host/PhotonOS/rpm-list')) audit(AUDIT_PACKAGE_LIST_MISSING);

cpu = get_kb_item('Host/cpu');
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ('x86_64' >!< cpu && cpu !~ "^i[3-6]86$" && 'aarch64' >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, 'PhotonOS', cpu);

flag = 0;

if (rpm_check(release:'PhotonOS-2.0', cpu:'x86_64', reference:'polkit-0.113-6.ph2')) flag++;
if (rpm_check(release:'PhotonOS-2.0', cpu:'x86_64', reference:'polkit-devel-0.113-6.ph2')) flag++;

if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : rpm_report_get()
  );
  exit(0);
}
else
{
  tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, 'polkit');
}

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

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/PhotonOS_PHSA-2021-2_0-0350_polkit.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\PhotonOS_PHSA-2021-2_0-0350_polkit.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/PhotonOS_PHSA-2021-2_0-0350_polkit.nasl

Go back to menu.

How to Run


Here is how to run the Photon OS 2.0: Polkit PHSA-2021-2.0-0350 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 PhotonOS Local Security Checks plugin family.
  6. On the right side table select Photon OS 2.0: Polkit PHSA-2021-2.0-0350 plugin ID 150288.
  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 PhotonOS_PHSA-2021-2_0-0350_polkit.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a PhotonOS_PHSA-2021-2_0-0350_polkit.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - PhotonOS_PHSA-2021-2_0-0350_polkit.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 PhotonOS_PHSA-2021-2_0-0350_polkit.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 157562 - AlmaLinux 8 : polkit (ALSA-2021:2238)
  • 150384 - CentOS 8 : polkit (CESA-2021:2238)
  • 152407 - EulerOS 2.0 SP8 : polkit (EulerOS-SA-2021-2311)
  • 153754 - EulerOS 2.0 SP9 : polkit (EulerOS-SA-2021-2537)
  • 153699 - EulerOS 2.0 SP9 : polkit (EulerOS-SA-2021-2561)
  • 155510 - EulerOS Virtualization 2.9.1 : polkit (EulerOS-SA-2021-2738)
  • 155507 - EulerOS Virtualization 2.9.0 : polkit (EulerOS-SA-2021-2765)
  • 158017 - EulerOS Virtualization 3.0.6.0 : polkit (EulerOS-SA-2022-1090)
  • 150314 - FreeBSD : polkit -- local privilege escalation using polkit_system_bus_name_get_creds_sync (36a35d83-c560-11eb-84ab-e0d55e2a8bf9)
  • 156969 - GLSA-202107-31 : polkit: Privilege escalation
  • 151717 - openSUSE 15 Security Update : polkit (openSUSE-SU-2021:1843-1)
  • 150319 - openSUSE Security Update : polkit (openSUSE-2021-838)
  • 150242 - Oracle Linux 8 : polkit (ELSA-2021-2238)
  • 150284 - Photon OS 1.0: Polkit PHSA-2021-1.0-0397
  • 150286 - Photon OS 3.0: Polkit PHSA-2021-3.0-0248
  • 150283 - Photon OS 4.0: Polkit PHSA-2021-4.0-0037
  • 150161 - RHEL 8 : polkit (RHSA-2021:2237)
  • 150293 - RHEL 8 : polkit (RHSA-2021:2238)
  • 150950 - RHEL 8 : Red Hat Virtualization Host security update [ovirt-4.4.6] (Important) (RHSA-2021:2522)
  • 151426 - RHEL 7 / 8 : OpenShift Container Platform 4.7.19 packages and (RHSA-2021:2555)
  • 157732 - Rocky Linux 8 : polkit (RLSA-2021:2238)
  • 150337 - Slackware 14.2 / current : polkit (SSA:2021-158-02)
  • 150266 - SUSE SLES12 Security Update : polkit (SUSE-SU-2021:1842-1)
  • 150257 - SUSE SLED15 / SLES15 Security Update : polkit (SUSE-SU-2021:1843-1)
  • 150270 - SUSE SLES15 Security Update : polkit (SUSE-SU-2021:1844-1)
  • 150164 - Ubuntu 20.04 LTS / 20.10 / 21.04 : polkit vulnerability (USN-4980-1)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file PhotonOS_PHSA-2021-2_0-0350_polkit.nasl version 1.5. For more plugins, visit the Nessus Plugin Library.

Go back to menu.