Granny Walkthrough
Hey folks, we are back again with one of Hack The Box machines โGrannyโ which it depends on custom exploitation and Windows privileges escalation, but before we get started letโs take a look at its info


Thatโs good, itโs easy, but you will learn new things about Win Priv Escalation, letโs get startedโฆ
Nmap scan
In this step we will discover all open ports, service running, OS detect results and more nmap -A -T4 -oG granny.gnmap <machine-ip>

We have only port 80 open and have service running on it Microsoft IIS 6.0
and nothing else.
Letโs try to discover machine webpage by searching for 10.10.10.15:80
and you will get nothing useful, so letโs discover the hidden directories by using dirbuster/dirsearch/ffuf/gobuster
or any tool you want

We have more directories, but thereโs no useful information in all of them, so letโs take the next step
Letโs try to search for exploitation of the service running at google
or searchsploit
tool

The good news, we have the same exploitation at metasploit
and exploit-db
Letโs search for it on metasploit
and then use is

After editing all of these options, type run to get meterpreter
session

Good, we have a session now, letโs type shell
to open a reverse shell and know who we are and what privileges we have

Unfortunately, we have user access or privileges only, so letโs search for user.txt
and then try to get root access
Letโs go to the Documents and Settings
directory and try to get access to user directory

We canโt open any directory !!
Okay, let's try to get root access
Put this session in the background by typing background
and you will get <session-id>
and then search for suggester
module for discovering all vulnerabilities which our vulnerable machine is affected by

Just put the session number into it as you can see and run

Nice, we have a bunch of vulnerabilities, and you should try every one of them. For me, Iโll try to get the last one first

Good, Itโs for privilege escalation, let's try it

Unfortunately, our vulnerable machine refuses the module execution so letโs go into it and see what the service prevents the module from execution
session -i <session-id>
โ to return to exist open sessionps
โ to see services running

Note WmiPrvse.exe
this service prevents any external module from execution, letโs migrate it by typing migrate <process-id>

Okay, letโs return to our module and try to run it again

Okay, just change the lport
to anything other than the lport
which the first session run on it.

As you can see weโre admin now, itโs easy now to grab the user and the root flag
Last updated