- Get the reverse shell in netcat
- check python support in the target system
- If your terminal is using zsh, then you need to switch to bash
exec bash --login
ps -p $$ # check whether bash is the current shell for the terminal
- spawn bash using python
python -c 'import pty;pty.spawn("/bin/bash")'
- background the netcat listener using CTRL+Z
- GET the terminal of host
- Get the dimensions of host terminal and note down the rows,columns length
- Type the following command in host terminal
stty raw -echo
fg # which gets the netcat listener to foreground
reset # might be you'll be asked to enter terminal type, input will be from step 3
- In the netcat listener psuedo terminal, enter the commands
stty rows <rows_length_from_step_4> columns <columns_length_from_step_4>