Upgrading Reverse Shell

  • Catching Reverse is an awesome , but it's is not real tty shell
  • 1.Clear command is not work
  • 2.We type Ctrl + C can close the shell
  • 3.Sometime we need to type sudo , but sudo is not work in this
  • But Don't Need to worry , we can upgrade very easily to real tty
  • 1.First spawn tty shell with python:
     python -c 'import pty;pty.spawn("/bin/bash")'
  • Or
  •  python3 -c 'import pty;pty.spawn("/bin/bash")'
  • 2.Change as the background task in your local shell or terminal :
  • Ctrl + z 
    stty raw -echo 
  • 3.Foregrounding this reverse shell and setting TERM Environment
  • fg 
    export TERM=xterm-256color
  • Now we can successfully upgrade our reverse shell and this shell is more effective