SSH Tunneling

SSH Tunneling can be used in multiple functions and as a Penetration tester / Hacker you may use it in initiating a backdoor connection from the victim to the attacker or zombie machine.

 

ssh_tunneling

 

Client Machine

client_ssh_01

-R : Specifies that the given port (2222) on the remote server (can be the victim) host is to be forwarded to the given host and port (22) on the local side (can be the attacker).

-N : Do not execute a remote command.

 

Server Machine

you’ll find a listening port 2222 opened at the remote (attacker) machine

mgmt_netstat_2

 

Now in order to connect back to the client (victim) machine through the tunnel you have to ssh to localhost with port 2222 wich will forward to port 22 at the victim inside the tunnel.

mgmt_connect

 

Leave a Reply

Your email address will not be published.