Windows Privilege Escalation (Bypassing User Account Control)

 For this lab, I was given a meterpreter bind shell on a remote machine with low lever user privileges. I discovered a little more about it using run post/windows/gather/win_privs which showed me that the user eLS was in the local admin group but did not have admin or system lever privileges. I also saw that UAC was enabled. This meant that I would need to try to bypass this feature before trying to use the getsystem meterpreter command.




In order to bypass User Account Control, we can try downloading code and manually compiling and running it, but msfconsole has a built in script which we can also work with. I first of all backgrounded the session and then tried use exploit/windows/local/bypassuac




Once I executed this script, a new meterpreter session was created. eLS now had admin rights but still was not system.




I could now try the getsystem command from within meterpreter. This worked, and I had successfully managed to elevate privileges from a low level user to system.



This is a simple way to elevate privileges, but it needs to be used with care as it does not always work and the getsystem command can crash systems. This command actually tries different methods to elevate privileges. We can use the -t flag with the number of the method if we want to only try one of them getsystem -t 1





Popular posts from this blog

Hacking Year of the Owl (thm)

Hacking Reset (thm)

Simple CTF (tryhackme)