Working through the challenges.

Scanned the website using nmap, found that it hosts a couple of ports - 80, 22, 110 and 143.
Pasted image 20240802182712.png

Checking their website on the target IP, can see they've been victim of a cyber incident.
Also located the Twitter account was taken over, which leads to a pastebin:
Pasted image 20240802182842.pngWhich leads to a further page:
Pasted image 20240802182926.png

Saved password hashes to a text document and ran John with correct format flag:
Pasted image 20240802183316.png
Started to crack hashes with just the default password.lst word list.

Attempted to get access to pop3 login with the currently acquired passwords.
Split usernames and passwords:
Pasted image 20240802201807.png
Used Metasploit pop3_login module.
Pasted image 20240802201856.png

Located a successful login:
Pasted image 20240802202141.png

Reading the email over netcat:
Pasted image 20240802201933.png

Located the temporary password:
Pasted image 20240802201958.png

Trying different usernames with the temp password:
Pasted image 20240802202604.png
Sucess!
Pasted image 20240802202623.png
Locate an interesting file - we see that there's an MoTD thats presented on first login.
Locating this in /opt/cube/cupe.sh, we see that this file runs as root when ssh sign in.

Add a reverse shell to cube.sh, and restart the ssh session with nc running.
We now have a reverse shell with root:
Pasted image 20240803113213.png

And that's it! We're in, as root, and able to get to the flag:
Pasted image 20240803113427.png