Privilege escalation with Metasploit
In this section, we will explore privilege escalation modules for Windows as well as Linux OSes. So, let's get started.
Escalation of privileges on Windows-based systems
During a penetration test, we often run into situations where we have limited access, and if we run commands such as getsystem
, we might get the following error:
Figure 8.46 – Attempting escalation of privileges using the getsystem command
Let's try and find some UAC bypass modules in Metasploit using the search UAC
command, as follows:
Figure 8.47 – Searching for UAC exploits in Metasploit
Let's use the bypassuac_sluihijack
module and try escalating privileges on the target, as shown in the following screenshot:
Figure 8.48 – Setting up the bypassuac_sluihijack module
Metasploit is smart enough to load the module if you forget to use the use
command. To make sure...