Hello,
We are going to exploit one of OffSec Proving Grounds Medium machines which called Pwned1
and this post is not a fully detailed walkthrough, I will just go through the important points during the exploit process.
Enumeration:
Nmap:
Reading
/robots.txt
:
We got a list of possible paths on the server on
/hidden_text/secret.dic
Running
gobuster
using that list:- Checking the source code of that page:
- we have a user and password:
ftpuser:B0ss_Pr!ncesS
:
- we have a user and password:
- Login to ftp:
Downloading
id_rsa
andnotes.txt
files to our local machine:Getting Shell through
SSH
:
Privilege Escalation:
- Enumeration:
- sudo -l: we can run
/home/messenger.sh
script as selena without password.
- Reading
/home/messenger.sh
file:
- sudo -l: we can run
- Getting shell as
selena
user:
1
sudo -u selena /home/messenger.sh
- As you can see in the screenshot above, we are a part of
docker
group, so let’s exploit that:
1
docker run -v /:/mnt -it alpine
Happy Hacking!
Comments powered by Disqus.