Hands-on example of Privilege Escalation on a Windows target
In this section we will illustrate how you can use privilege escalation on Windows PCs. This hands-on illustration works on Windows 8 and has also been reported to be effective in Windows 10. It makes use of some techniques that have been discussed, that is, PowerShell and Meterpreter. It is a cunning technique that drives the user of the target machine to unknowingly allow a legitimate program to run, which in turn does the privilege escalation. Therefore, it is the user that unknowingly allows malicious actors to escalate their privileges. The process starts within Metasploit and particularly on Meterpreter.
Meterpreter is first used to establish a session with a target. This session is what the attackers use to send commands to the target and effectively control it.
The following is a script called persistence
that an attacker can use to start a session with a remote target. The script creates a persistent listener...