Local privilege escalation attack
In this recipe, we will escalate privileges on a compromised machine. Local privilege escalation allows us to gain access to system or domain user accounts, utilizing the current system to which we are attached.
Getting ready
To execute this recipe we will need the following:
A connection to the Internet or intranet
A compromised machine using the Metasploit framework is also required
How to do it...
Let's begin the process of performing a local privilege escalation attack from a Meterpreter shell. You will have to use Metasploit to attack a host in order to gain a Meterpreter shell. You can use one of the recipes in Chapter 6, Exploiting Vulnerabilities, to gain access to a host using Metasploit.
Once you have gained access to your victim using a Metasploit exploit with a Meterpreter payload, await for your Meterpreter prompt to display:
Next, to view the
help
file for thegetsystem
command, we run the–h
option:getsystem –h
Finally, we run getsystem without any...