Shells

Broad Topic

Basics

  • Host: Setup the listener to catch the reverse shell

    • nc -nvlp 1234

  • Target: Upload your reverse shell, navigate, execute, connect

  • Example: BashedHTB sends a php reverse shell with wget

Easy Test Connect

PHP web shell

  • Upload this simple 'shell.php', and call it using parameter 'cmd=uname'

  • Consider, you might need to send 'shell.php3' to avoid the block/filter.

Python

By Burp

Browser

Bash Reverse

Powershell Reverse

netcat

  • Create a python reverse shell

  • Listener #1: Share rshell with <

  • Listener #2: Wait for incoming

  • LFI: Execute nc to pickup rshell and execute it

Windows netcat

  • Windows Target might not have netcat

  • Download and send the nc64.exe (assuming they are using 64bit)

  • Execute your nc64.exe to send a ReverseShell back to yourself

Last updated

Was this helpful?