Rapid7 VulnDB

Android 'su' Privilege Escalation

Back to Search

Android 'su' Privilege Escalation

Disclosed
08/31/2017
Created
03/19/2019

Description

This module uses the su binary present on rooted devices to run a payload as root. A rooted Android device will contain a su binary (often linked with an application) that allows the user to run commands as root. This module will use the su binary to execute a command stager as root. The command stager will write a payload binary to a temporary directory, make it executable, execute it in the background, and finally delete the executable. On most devices the su binary will pop-up a prompt on the device asking the user for permission.

Author(s)

  • timwr

Platform

Android,Linux

Architectures

aarch64, armle, x86, x64, mipsle

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

;