First we need to add the domain in the /etc/hosts file to get access to the website. I usually do a subdomain scan after I get a domain using wfuzz or gobuster , I prefer wfuzz because are faster than gobuster.
When I have to enumerate a website I start with fuzzing using feroxbuster and dirsearch.
After a long time I use hydra to brute force the admin user password.
admin:liverpool
I also find an interesting script to exploit this CMS version.
After some minutes of enumeration I got stuck, so I go back to open ports and there’re NFS share folders, but I cannot access. Verify /etc/exports to see which folder are shared.
So folder /home/william is shared and can be accessed. Let’s see his uid and gid:
It’s 3003. Create a user “william” on your machine with the same uid and gid, and mount the folder to see what’s inside.
Found the user flag and another useful files.
Ok, so if I execute script without argument, it will exec admin.sh. But if I provide with argument, I can read this argument(strcat) as leonard priv.
Now let’s login with the id_rsa key.
After minutes of enumeration I found how to get root privilege. See the capabilities.
# Execute this command into your attacking machine
sudo useradd -u 3003 william
sudo mount -t nfs 10.10.126.209:/home/william /home/william
sudo usermod --shell /bin/bash william
sudo -u william -i