Granny Walkthrough
Last updated
Last updated
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âŚ
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 session
ps
â 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