Exploit database

Vulnerability

CVE-2018-14665

Vulnerability details

Score
6.6
Severity
medium

CVSS 3.0 · NVD

Vector string

CVSS:3.0/AV:P/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Description

A flaw was found in xorg-x11-server before 1.20.3. An incorrect permission check for -modulepath and -logfile options when starting Xorg. X server allows unprivileged users with the ability to log in to the system via physical console to escalate their privileges and run arbitrary code under root privileges.

CVE Program

Exploit source choices

13 sources
Xorg X11 Server Local Privilege Escalation
MSF-aix--local--xorg_x11_serverMetasploitUnix / remote

WARNING: Successful execution of this module results in /etc/passwd being overwritten. This module is a port of the OpenBSD X11 Xorg exploit to run on AIX. A permission check flaw exists for -modulepath and -logfile options when starting Xorg. This allows unprivileged users that can start the server the ability to elevate privileges and run arbitrary code under root privileges. This module has been tested with AIX 7.1 and 7.2, and should also work with 6.1. Due to permission restrictions of the crontab in AIX, this module does not use cron, and instead overwrites /etc/passwd in order to create a new user with root privileges. All currently logged in users need to be included when /etc/passwd is overwritten, else AIX will throw 'Cannot get "LOGNAME" variable' when attempting to change user. The Xorg '-fp' parameter used in the OpenBSD exploit does not work on AIX, and is replaced by '-config', in conjuction with ANSI-C quotes to inject newlines when overwriting /etc/passwd.

2018-10-25xorg_x11_server.rb
Xorg X11 Server SUID logfile Privilege Escalation
MSF-multi--local--xorg_x11_suid_serverMetasploitLinux,Unix / remote

This module attempts to gain root privileges with SUID Xorg X11 server versions 1.19.0 < 1.20.3. A permission check flaw exists for -modulepath and -logfile options when starting Xorg. This allows unprivileged users that can start the server the ability to elevate privileges and run arbitrary code under root privileges. This module has been tested with OpenBSD 6.3, 6.4, CentOS 7.4.1708, and CentOS 7.5.1804, and RHEL 7.5. The default PAM configuration for CentOS and RHEL systems requires console auth for the user's session to start the Xorg server. Cron launches the payload, so if SELinux is enforcing, exploitation may still be possible, but the module will bail. Xorg must have SUID permissions and may not start if already running. On exploitation a crontab.old backup file will be created by Xorg. This module will remove the .old file and restore crontab after successful exploitation. Failed exploitation may result in a corrupted crontab. On successful exploitation artifacts will be created consistant with starting Xorg and running a cron.

2018-10-25xorg_x11_suid_server.rb
Xorg X11 Server SUID modulepath Privilege Escalation
MSF-multi--local--xorg_x11_suid_server_modulepathMetasploitLinux,Solaris,Unix / remote

This module attempts to gain root privileges with SUID Xorg X11 server versions 1.19.0 < 1.20.3. A permission check flaw exists for -modulepath and -logfile options when starting Xorg. This allows unprivileged users that can start the server the ability to elevate privileges and run arbitrary code under root privileges. This module has been tested with CentOS 7 (1708). CentOS default install will require console auth for the users session. Xorg must have SUID permissions and may not start if running. On successful exploitation artifacts will be created consistant with starting Xorg.

2018-10-25xorg_x11_suid_server_modulepath.rb
0xdea/exploits
GH-f95e1b4b4c94c6e91e756b9b515b41e6GitHubUnofficial GitHub source

A handy collection of my public exploits, all in one place.

2017-07-1261 files · 677 stars
jas502n/cve-2018-14665
GH-ceee5779cb1842a0b356d8fb62bae069GitHubUnofficial GitHub source

OpenBsd_CVE-2018-14665

2018-10-274 files · 17 stars