This Metasploit module attempts to gain root privileges on Linux systems by abusing a vulnerability in GNU C Library (glibc) version 2.26 and prior. This Metasploit module uses halfdog's RationalLove exploit to exploit a buffer underflow in glibc realpath() and create a SUID root shell. The exploit has offsets for glibc versions 2.23-0ubuntu9 and 2.24-11+deb9u1. The target system must have unprivileged user namespaces enabled. This Metasploit module has been tested successfully on Ubuntu Linux 16.04.3 (x86_64) with glibc version 2.23-0ubuntu9; and Debian 9.0 (x86_64) with glibc version 2.24-11+deb9u1.
80545f11c3dbaf619131e029fba6bb2504458083b7b4795f41fd9210ad2c35da
Red Hat Security Advisory 2018-0805-01 - The glibc packages provide the standard C libraries, POSIX thread libraries, standard math libraries, and the name service cache daemon used by multiple programs on the system. Without these libraries, the Linux system cannot function correctly. Issues addressed include buffer overflow and denial of service vulnerabilities.
fd7f8148aea75acb4ed2c718744914f5b55f61f292d25f5d78b84eed10980698
glibc suffers from a getcwd() local privilege escalation vulnerability.
b441728a6b8ed19a7661442e1bc22c727e93a78e559d6c68e57e3d8ca1f50f52
Ubuntu Security Notice 3536-1 - It was discovered that the GNU C library did not properly handle all of the possible return values from the kernel getcwd syscall. A local attacker could potentially exploit this to execute arbitrary code in setuid programs and gain administrative privileges.
b8e54aa839f1953cae81c827296bd6d411bf14b4a0889c2311ae75dee2b376e7
Ubuntu Security Notice 3534-1 - It was discovered that the GNU C library did not properly handle all of the possible return values from the kernel getcwd syscall. A local attacker could potentially exploit this to execute arbitrary code in setuid programs and gain administrative privileges. A memory leak was discovered in the _dl_init_paths function in the GNU C library dynamic loader. A local attacker could potentially exploit this with a specially crafted value in the LD_HWCAP_MASK environment variable, in combination with CVE-2017-1000409 and another vulnerability on a system with hardlink protections disabled, in order to gain administrative privileges. Various other issues were also addressed.
b93b27e39dcc8e45fb3868d7d816bfc00ea67297dafc2734a0cec988cd371f26
Gentoo Linux Security Advisory 201804-2 - Multiple vulnerabilities have been found in glibc, the worst of which could allow remote attackers to execute arbitrary code. Versions less than 2.25-r11 are affected.
20bcb176dc8f678b8fcebb3c25e5481340c2a49599d9b052bbd05cff312da576