module

AddressSanitizer (ASan) SUID Executable Privilege Escalation

Disclosed
2016-02-17
Created
2019-03-19

Description

This module attempts to gain root privileges on Linux systems using
setuid executables compiled with AddressSanitizer (ASan).

ASan configuration related environment variables are permitted when
executing setuid executables built with libasan. The `log_path` option
can be set using the `ASAN_OPTIONS` environment variable, allowing
clobbering of arbitrary files, with the privileges of the setuid user.

This module uploads a shared object and sprays symlinks to overwrite
`/etc/ld.so.preload` in order to create a setuid root shell.

Authors

Szabolcs Nagy
infodox
bcoles bcoles@gmail.com

Platform

Linux

Architectures

x86, x64, armle, aarch64, ppc, mipsle, mipsbe

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/asan_suid_executable_priv_esc
msf exploit(asan_suid_executable_priv_esc) > show targets
...targets...
msf exploit(asan_suid_executable_priv_esc) > set TARGET < target-id >
msf exploit(asan_suid_executable_priv_esc) > show options
...show and set options...
msf exploit(asan_suid_executable_priv_esc) > exploit

Title
NEW

Explore Exposure Command

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