Rapid7 Vulnerability & Exploit Database

SystemTap MODPROBE_OPTIONS Privilege Escalation

Back to Search

SystemTap MODPROBE_OPTIONS Privilege Escalation

Disclosed
11/17/2010
Created
04/22/2019

Description

This module attempts to gain root privileges by exploiting a vulnerability in the `staprun` executable included with SystemTap version 1.3. The `staprun` executable does not clear environment variables prior to executing `modprobe`, allowing an arbitrary configuration file to be specified in the `MODPROBE_OPTIONS` environment variable, resulting in arbitrary command execution with root privileges. This module has been tested successfully on: systemtap 1.2-1.fc13-i686 on Fedora 13 (i686); and systemtap 1.1-3.el5 on RHEL 5.5 (x64).

Author(s)

  • Tavis Ormandy
  • bcoles <bcoles@gmail.com>

Platform

Linux

Architectures

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

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

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;