Upgrade Reverse Shell to Fully Interactive TTY
Name | Command |
---|---|
TTY/Upgrade TTY | python -c "import pty;pty.spawn('/bin/bash')" |
TTY/Fix TTY 1 | printf "\n\n(Rows,Cols)\n ";printf '\e[1;91m%-6s\e[m' $(stty size);printf "\n\nTerm= \e[91m$TERM\e[0m\n\n";stty raw -echo;fg; |
TTY/Fix TTY 2 | export SHELL=bash;export TERM=xterm-256color;stty rows 20 columns 100;\echo ;echo ;read -p "Enter Rows:" ROWS;read -p "Enter Cols:" COLS;stty rows $ROWS columns $COLS && clear |
Once you get a reverse shell:
- Right click → Custom Commands → TTY → Upgrade TTY Python
- Press ctrl+z to background
- Right click → Custom Commands → TTY → Fix TTY 1
- Right click → Custom Commands → TTY → Fix TTY 2
- Enter the row and col values as prompted from step 2