Squashed
Personal Rating: hard
The privilege escalation was something I did not consider before, so I had to take a peek in the writeup to get a hint on what to do
Enumeration:
sudo nmap -p- -sV <IP>
NFS Share UID Abuse
I got access to an nfs share:
There was a KeePass database file in ~/Documents of ross' home, but I could not crack it
NFS does not check the user IDs, so you can list the user ID of the webroot user, create a user with the same UID on the local system and place a reverse shell there
This got me a shell as the user alex
LinPEAS shew me CVE-2021-3560, but I could not make an exploit work.
In ross' home there was the .XAuthority file, which caches the cookie for a screen session. Exploiting or even finding this was new to me up until I did this box.
X Session Hijack
You could imitate the user ross over the nfs share the same way as you did with the webuser alex. Then you could copy the cookie file with this command:
Then you could go onto the box with alex again and highjack the session with this command:
With “w” you could then see, that you have access to ross' screen session. You can create a screenshot then
You could then start a python http server in tmp, copy the file over to your host and have a look at it. Then you could see, that the user had keepass open where you could see the root password.
Last updated