We will now attempt to privilege escalate onto the target and gain root access.
First we need to upgrade the shell using a python one liner to make sure we have full terminal functionality.
Python shell upgrades involve enhancing a basic command shell obtained during a penetration test into a more fully-featured, interactive shell. This typically includes enabling features such as command history, tab completion, and better handling of terminal commands.
Upgraded shells provide more stable and reliable connections, reducing the risk of losing access.
Run the following command:
python -c 'import pty;pty.spawn("/bin/bash")'

You should now have a better functioning shell.
