module

glibc 'realpath()' Privilege Escalation

Disclosed
01/16/2018
Created
06/14/2018

Description

This module attempts to gain root privileges on Linux systems by abusing
a vulnerability in GNU C Library (glibc) version 2.26 and prior.

This 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 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.

Authors

halfdogbcoles

Platform

Linux

Architectures

x86, x64

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/linux/local/glibc_realpath_priv_esc
    msf /(c) > show actions
        ...actions...
    msf /(c) > set ACTION < action-name >
    msf /(c) > show options
        ...show and set options...
    msf /(c) > run
  
Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.