Skip to content

Instantly share code, notes, and snippets.

@PotatoMaster101
Last active February 21, 2021 10:09
Show Gist options
  • Save PotatoMaster101/c2f26c265362a598e99872a861a9c3da to your computer and use it in GitHub Desktop.
Save PotatoMaster101/c2f26c265362a598e99872a861a9c3da to your computer and use it in GitHub Desktop.
Steps to upgrade a reverse shell to a full TTY shell

Upgrade to Full TTY Shell

  1. Make sure shell is bash: python3 -c 'import pty;pty.spawn("/bin/bash")'
  2. Send reverse shell to background: CTRL + Z
  3. Change terminal setting: stty raw -echo
  4. Send reverse shell to foreground: fg
  5. Reset terminal: reset
  6. When prompt terminal type, use xterm
  7. (Optional) change terminal row and width, use stty rows 75 cols 250
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment