Reverse Shells

Below we find reverse shells in different languages and different tools.


Upgrade Shell

Below you have a step by step how to upgrade your shell

  1. Spawn a interactive shell with python

  2. Send shell into the background (CTRL-Z)

  3. Set the TTY.

Below you can see the command needed to execute to upgrade a shell.

1.Spawn Interactive shell

python3 -c 'import pty;pty.spawn("/bin/bash");'

2. Send the shell to the background

CTRL-Z

3. Set the TTY

stty -a
stty raw -echo; fg
stty rows 66 cols 157
export TERM=xterm

After all the above steps we should have an more stable reverse shell.


Break out of restricted environment

We find above one-liner on GTFOBins but we need the at-Binary for it to work.


Listeners

nc

msfconsole

We will need to change the payload if we create a shell with an other payload.


Bash

shell.sh


nc


Evil-WinRM

Certificate Authentication


PowerShell


Powercat


Python

msfvenom

Last updated