Rapid7 VulnDB

Solaris RSH Stack Clash Privilege Escalation

Back to Search

Solaris RSH Stack Clash Privilege Escalation

Disclosed
06/19/2017
Created
03/19/2019

Description

This module exploits a vulnerability in RSH on unpatched Solaris systems which allows users to gain root privileges. The stack guard page on unpatched Solaris systems is of insufficient size to prevent collisions between the stack and heap memory, aka Stack Clash. This module uploads and executes Qualys' Solaris_rsh.c exploit, which exploits a vulnerability in RSH to bypass the stack guard page to write to the stack and create a SUID root shell. This module has offsets for Solaris versions 11.1 (x86) and Solaris 11.3 (x86). Exploitation will usually complete within a few minutes using the default number of worker threads (10). Occasionally, exploitation will fail. If the target system is vulnerable, usually re-running the exploit will be successful. This module has been tested successfully on Solaris 11.1 (x86) and Solaris 11.3 (x86).

Author(s)

  • Qualys Corporation
  • bcoles <bcoles@gmail.com>

Platform

Unix

Architectures

x86, x64

Development

References

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

;