Vulnerability & Exploit Database

Back to search

Xorg X11 Server SUID privilege escalation

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, and CentOS 7 (1708). CentOS default install will require console auth for the users session. 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 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.

Free Metasploit Download

Get your copy of the world's leading penetration testing tool

 Download Now

Module Name

exploit/multi/local/xorg_x11_suid_server

Authors

  • Narendra Shinde
  • Raptor - 0xdea
  • Aaron Ringo
  • Brendan Coles <bcoles [at] gmail.com>

References

Targets

  • OpenBSD
  • Linux x64
  • Linux x86

Platforms

  • openbsd
  • linux
  • unix

Architectures

  • cmd
  • x86
  • x64
  • cmd
  • x64
  • x86

Reliability

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/local/xorg_x11_suid_server msf exploit(xorg_x11_suid_server) > show targets ...targets... msf exploit(xorg_x11_suid_server) > set TARGET <target-id> msf exploit(xorg_x11_suid_server) > show options ...show and set options... msf exploit(xorg_x11_suid_server) > exploit

Related Vulnerabilities