Upgrade to Fully Interactive TTY

Last modified: 2023-04-08

Privilege Escalation Reverse Shell

After reverse shell, the shell has poorly functions, so we can upgrade to more functional shell.

Upgrade

After connecting to the target shell with reverse shell, it's recommended to make the shell to be more elegant.

python3 -c 'import pty; pty.spawn("/bin/bash")'
# or
python -c 'import pty; pty.spawn("/bin/bash")'
# or
python2 -c 'import pty; pty.spawn("/bin/bash")'
# or
SHELL=/bin/bash script -q /dev/null

The commands below make our shell even more perfect.

Ctrl+z
stty raw -echo;fg
Enter x2
export TERM=xterm