Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

module

AddressSanitizer (ASan) SUID Executable Privilege Escalation

Disclosed
Feb 17, 2016
Created
Mar 19, 2019

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 [email protected]

Platform

Linux

Architectures

x86, x64, armle, aarch64, riscv64le, riscv32le, 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
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.