CentOS 7 : xorg-x11-server (CESA-2018:3410) - Nessus

Medium   Plugin ID: 119006

This page contains detailed information about the CentOS 7 : xorg-x11-server (CESA-2018:3410) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 119006
Name: CentOS 7 : xorg-x11-server (CESA-2018:3410)
Filename: centos_RHSA-2018-3410.nasl
Vulnerability Published: 2018-10-25
This Plugin Published: 2018-11-16
Last Modification Time: 2021-04-08
Plugin Version: 1.8
Plugin Type: local
Plugin Family: CentOS Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/CentOS/release, Host/CentOS/rpm-list, Host/local_checks_enabled

Vulnerability Information


Severity: Medium
Vulnerability Published: 2018-10-25
Patch Published: 2018-12-13
CVE [?]: CVE-2018-14665
CPE [?]: cpe:/o:centos:centos:7, p-cpe:/a:centos:centos:xorg-x11-server-Xdmx, p-cpe:/a:centos:centos:xorg-x11-server-Xephyr, p-cpe:/a:centos:centos:xorg-x11-server-Xnest, p-cpe:/a:centos:centos:xorg-x11-server-Xorg, p-cpe:/a:centos:centos:xorg-x11-server-Xvfb, p-cpe:/a:centos:centos:xorg-x11-server-Xwayland, p-cpe:/a:centos:centos:xorg-x11-server-common, p-cpe:/a:centos:centos:xorg-x11-server-devel, p-cpe:/a:centos:centos:xorg-x11-server-source
In the News: True

Synopsis

The remote CentOS host is missing one or more security updates.

Description

An update for xorg-x11-server is now available for Red Hat Enterprise Linux 7.

Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.

X.Org is an open source implementation of the X Window System. It provides the basic low-level functionality that full-fledged graphical user interfaces are designed upon.

Security Fix(es) :

* xorg-x11-server: Incorrect permission check in Xorg X server allows for privilege escalation (CVE-2018-14665)

For more details about the security issue(s), including the impact, a CVSS score, and other related information, refer to the CVE page(s) listed in the References section.

Red Hat would like to thank Narendra Shinde for reporting this issue.

Solution

Update the affected xorg-x11-server 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 CentOS 7 : xorg-x11-server (CESA-2018:3410) vulnerability:

  1. Metasploit: exploit/multi/local/xorg_x11_suid_server_modulepath
    [Xorg X11 Server SUID modulepath Privilege Escalation]
  2. Metasploit: exploit/aix/local/xorg_x11_server
    [Xorg X11 Server Local Privilege Escalation]
  3. Metasploit: exploit/multi/local/xorg_x11_suid_server
    [Xorg X11 Server SUID logfile Privilege Escalation]
  4. Exploit-DB: exploits/multiple/local/45697.txt
    [EDB-45697: xorg-x11-server < 1.20.3 - Local Privilege Escalation]
  5. Exploit-DB: exploits/openbsd/local/45742.sh
    [EDB-45742: xorg-x11-server 1.20.3 - Privilege Escalation]
  6. Exploit-DB: exploits/linux/local/45832.py
    [EDB-45832: xorg-x11-server < 1.20.1 - Local Privilege Escalation]
  7. Exploit-DB: exploits/multiple/local/45908.rb
    [EDB-45908: Xorg X11 Server - SUID privilege escalation (Metasploit)]
  8. Exploit-DB: exploits/multiple/local/45922.sh
    [EDB-45922: xorg-x11-server < 1.20.3 - 'modulepath' Local Privilege Escalation]
  9. Exploit-DB: exploits/aix/local/45938.pl
    [EDB-45938: Xorg X11 Server (AIX) - Local Privilege Escalation]
  10. Exploit-DB: exploits/solaris/local/46142.sh
    [EDB-46142: xorg-x11-server < 1.20.3 (Solaris 11) - 'inittab Local Privilege Escalation]
  11. Exploit-DB: exploits/unix/local/47701.rb
    [EDB-47701: Xorg X11 Server - Local Privilege Escalation (Metasploit)]
  12. GitHub: https://github.com/0xdea/exploits
    [CVE-2018-14665]
  13. GitHub: https://github.com/Apri1y/Red-Team-links
    [CVE-2018-14665]
  14. GitHub: https://github.com/Echocipher/Resource-list
    [CVE-2018-14665]
  15. GitHub: https://github.com/anoaghost/Localroot_Compile
    [CVE-2018-14665]
  16. GitHub: https://github.com/bolonobolo/CVE-2018-14665
    [CVE-2018-14665]
  17. GitHub: https://github.com/hackerhouse-opensource/exploits
    [CVE-2018-14665]
  18. GitHub: https://github.com/hudunkey/Red-Team-links
    [CVE-2018-14665]
  19. GitHub: https://github.com/john-80/-007
    [CVE-2018-14665]
  20. GitHub: https://github.com/jondonas/linux-exploit-suggester-2
    [CVE-2018-14665]
  21. GitHub: https://github.com/lp008/Hack-readme
    [CVE-2018-14665]
  22. GitHub: https://github.com/samueldustin/cve-2018-14665
    [CVE-2018-14665]
  23. GitHub: https://github.com/slimdaddy/RedTeam
    [CVE-2018-14665]
  24. GitHub: https://github.com/xiaoZ-hc/redtool
    [CVE-2018-14665]
  25. GitHub: https://twitter.com/hackerfantastic/status/1055517801224396800
    [CVE-2018-14665]
  26. GitHub: https://github.com/jas502n/CVE-2018-14665
    [CVE-2018-14665: OpenBsd_CVE-2018-14665]

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-2018-14665
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:P/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:6.6 (Medium)
Impact Subscore:5.9
Exploitability Subscore:0.7
CVSS Temporal Score:6.1 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.1 (Medium)

Go back to menu.

Plugin Source


This is the centos_RHSA-2018-3410.nasl nessus plugin source code. This script is Copyright (C) 2018-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were  
# extracted from Red Hat Security Advisory RHSA-2018:3410 and 
# CentOS Errata and Security Advisory 2018:3410 respectively.
#

include("compat.inc");

if (description)
{
  script_id(119006);
  script_version("1.8");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/04/08");

  script_cve_id("CVE-2018-14665");
  script_xref(name:"RHSA", value:"2018:3410");

  script_name(english:"CentOS 7 : xorg-x11-server (CESA-2018:3410)");
  script_summary(english:"Checks rpm output for the updated packages");

  script_set_attribute(
    attribute:"synopsis",
    value:"The remote CentOS host is missing one or more security updates."
  );
  script_set_attribute(
    attribute:"description",
    value:
"An update for xorg-x11-server is now available for Red Hat Enterprise
Linux 7.

Red Hat Product Security has rated this update as having a security
impact of Important. A Common Vulnerability Scoring System (CVSS) base
score, which gives a detailed severity rating, is available for each
vulnerability from the CVE link(s) in the References section.

X.Org is an open source implementation of the X Window System. It
provides the basic low-level functionality that full-fledged graphical
user interfaces are designed upon.

Security Fix(es) :

* xorg-x11-server: Incorrect permission check in Xorg X server allows
for privilege escalation (CVE-2018-14665)

For more details about the security issue(s), including the impact, a
CVSS score, and other related information, refer to the CVE page(s)
listed in the References section.

Red Hat would like to thank Narendra Shinde for reporting this issue."
  );
  # https://lists.centos.org/pipermail/centos-announce/2018-December/023131.html
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.nessus.org/u?e0914ccc"
  );
  # https://lists.centos.org/pipermail/centos-cr-announce/2018-November/005745.html
  script_set_attribute(
    attribute:"see_also",
    value:"http://www.nessus.org/u?482da59a"
  );
  script_set_attribute(
    attribute:"solution",
    value:"Update the affected xorg-x11-server 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:P/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-2018-14665");
  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:'Xorg X11 Server SUID modulepath Privilege Escalation');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-Xdmx");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-Xephyr");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-Xnest");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-Xorg");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-Xvfb");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-Xwayland");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:xorg-x11-server-source");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:7");

  script_set_attribute(attribute:"vuln_publication_date", value:"2018/10/25");
  script_set_attribute(attribute:"patch_publication_date", value:"2018/12/13");
  script_set_attribute(attribute:"plugin_publication_date", value:"2018/11/16");
  script_set_attribute(attribute:"in_the_news", value:"true");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2018-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"CentOS Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/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/CentOS/release");
if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
os_ver = os_ver[1];
if (! preg(pattern:"^7([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 7.x", "CentOS " + os_ver);

if (!get_kb_item("Host/CentOS/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$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);


flag = 0;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-Xdmx-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-Xephyr-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-Xnest-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-Xorg-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-Xvfb-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-Xwayland-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-common-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-devel-1.20.1-5.1.el7")) flag++;
if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"xorg-x11-server-source-1.20.1-5.1.el7")) flag++;


if (flag)
{
  cr_plugin_caveat = '\n' +
    'NOTE: The security advisory associated with this vulnerability has a\n' +
    'fixed package version that may only be available in the continuous\n' +
    'release (CR) repository for CentOS, until it is present in the next\n' +
    'point release of CentOS.\n\n' +

    'If an equal or higher package level does not exist in the baseline\n' +
    'repository for your major version of CentOS, then updates from the CR\n' +
    'repository will need to be applied in order to address the\n' +
    'vulnerability.\n';
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : rpm_report_get() + cr_plugin_caveat
  );
  exit(0);
}
else
{
  tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "xorg-x11-server-Xdmx / xorg-x11-server-Xephyr / etc");
}

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

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/centos_RHSA-2018-3410.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\centos_RHSA-2018-3410.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/centos_RHSA-2018-3410.nasl

Go back to menu.

How to Run


Here is how to run the CentOS 7 : xorg-x11-server (CESA-2018:3410) 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 CentOS Local Security Checks plugin family.
  6. On the right side table select CentOS 7 : xorg-x11-server (CESA-2018:3410) plugin ID 119006.
  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 centos_RHSA-2018-3410.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a centos_RHSA-2018-3410.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - centos_RHSA-2018-3410.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 centos_RHSA-2018-3410.nasl -t <IP/HOST>

Go back to menu.

References


RHSA | Red Hat Security Advisory: See also: Similar and related Nessus plugins:
  • 119626 - AIX 6.1 TL 9 : xorg (IJ11000)
  • 119627 - AIX 7.1 TL 4 : xorg (IJ11544)
  • 119628 - AIX 7.1 TL 5 : xorg (IJ11545)
  • 119629 - AIX 7.2 TL 0 : xorg (IJ11546)
  • 119630 - AIX 7.2 TL 1 : xorg (IJ11547)
  • 119631 - AIX 7.2 TL 2 : xorg (IJ11549)
  • 119632 - AIX 7.2 TL 3 : xorg (IJ11550)
  • 119633 - AIX 5.3 TL 12 : xorg (IJ11551)
  • 118474 - Debian DSA-4328-1 : xorg-server - security update
  • 130832 - EulerOS 2.0 SP8 : xorg-x11-server (EulerOS-SA-2019-2123)
  • 131913 - EulerOS 2.0 SP2 : xorg-x11-server (EulerOS-SA-2019-2421)
  • 131827 - EulerOS 2.0 SP5 : xorg-x11-server (EulerOS-SA-2019-2553)
  • 132218 - EulerOS 2.0 SP3 : xorg-x11-server (EulerOS-SA-2019-2683)
  • 132816 - EulerOS Virtualization for ARM 64 3.0.5.0 : xorg-x11-server (EulerOS-SA-2020-1062)
  • 134525 - EulerOS Virtualization for ARM 64 3.0.2.0 : xorg-x11-server (EulerOS-SA-2020-1236)
  • 120398 - Fedora 29 : xorg-x11-server (2018-4ab08fedd6)
  • 120575 - Fedora 28 : xorg-x11-server (2018-839720583a)
  • 118509 - GLSA-201810-09 : X.Org X Server: Privilege escalation
  • 127225 - NewStart CGSL CORE 5.04 / MAIN 5.04 : xorg-x11-server Vulnerability (NS-SA-2019-0045)
  • 119025 - openSUSE Security Update : xorg-x11-server (openSUSE-2018-1420)
  • 123375 - openSUSE Security Update : xorg-x11-server (openSUSE-2019-915)
  • 118812 - Oracle Linux 7 : xorg-x11-server (ELSA-2018-3410)
  • 118557 - RHEL 7 : xorg-x11-server (RHSA-2018:3410)
  • 119207 - Scientific Linux Security Update : xorg-x11-server on SL7.x x86_64 (20181031)
  • 118457 - SUSE SLES11 Security Update : xorg-x11-server (SUSE-SU-2018:3456-1)
  • 120159 - SUSE SLED15 / SLES15 Security Update : xorg-x11-server (SUSE-SU-2018:3680-1)
  • 118492 - Ubuntu 16.04 LTS / 18.04 LTS / 18.10 : X.Org X server vulnerability (USN-3802-1)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file centos_RHSA-2018-3410.nasl version 1.8. For more plugins, visit the Nessus Plugin Library.

Go back to menu.