Dreaming
April 08, 2024
Last updated
April 08, 2024
Last updated
We can see here that port 3306 is running which is mysql database
Then after we viewed the "test.py" we can grab some credentials
But remember that the code in the "getDreams.py" has a vulnerability that is doesn't filter out some key input that is malicious.
Now we will see again the contents of "dreams" table from the "library" database.
Thus conclude that we can insert the reverse shell into the database.
As we run that command as user death it will excecute the reverse shell and we will receive the connection from it
As we navigate to morpheus user we can see "restore.py" which is a python script
As we go see the shutil.py from the directory /usr/lib/python3.8. We can see here that we can modify the shutil.py
This is the unedited shutil.py script
Now we will inject our reverse shell into the shutil.py
PS. Just press enter multiple times for us to insert our malicious code