


If you’re using Linux or Mac, then using SSH is very simple. You can execute shell commands in the same manner as you would if you were physically operating the remote computer.
Ssh tunnel manager tutorial windows#
Windows users can take advantage of SSH clients like Putty. Any Linux or macOS user can SSH into their remote server directly from the terminal window. The example below shows a typical SSH prompt. It provides a mechanism for authenticating a remote user, transferring inputs from the client to the host, and relaying the output back to the client. SSH service was created as a secure replacement for the unencrypted Telnet and uses cryptographic techniques to ensure that all communication to and from the remote server happens in an encrypted manner. SSH, or Secure Shell Protocol, is a remote administration protocol that allows users to access, control, and modify their remote servers over the internet. How Does SSH Work With These Encryption Techniques.Understanding Different Encryption Techniques.Notice that in our case we are doing remote port forwarding, there are two more kind of port forwarding: local and dynamic but I won’t talk about the different in this post. The IP is for the SSH server (Linux machine).The user is the user for the SSH connection, not for the RDP !.In our case, we will connect to port 12345 and will be forward to 3389 -R - forward remote port to local address.-N - don’t start a shell/command (SSH-2 only).-P - connect to a specific port (“22”, SSH in our case).With this tool we will be able to create encrypted tunnels that allow RDP ports to communicate back to the Linux machine, the attacker command and control (C2) server.Įxample for using it: plink.exe -pw -P 22 -2 -4 -T -N -C -R 0.0.0.0:12345:127.0.0.1:3389 It can be used to establish secure shell (SSH) network connections to other systems using arbitrary source and destination ports. Stage 3: Creating the tunnelĪ common utility used to tunnel RDP sessions is PuTTY link, known as Plink. If you are doing it on lab, make sure that you are able to connect to the computer with RDP before starting the tunnel. Once the connection has been established, the attacker connects from anywhere with RDP to the Linux machine over port “12345” and it will be forwarded to 127.0.0.1:3389 on the victim’s machine. The attacker has an external SSH server (Linux machine) and it creates a remote port forwarding for a generic port (“12345”) on the Linux machine from the victim’s computer on 127.0.0.1:3389. The attacker will enable RDP on the machine, dump user’s credentials or create a new user and add it to a group with permissions for RDP connection. Let’s say our attacker succeeded to get a foothold on one computer (victim’s computer) of the internal network. It reminds VPN because VPN is based on the idea of tunneling but they are different from each other. It uses the process of encapsulation through which the private network communications are sent to the public networks.

It allows us to transmit data from one network to another.

Tunneling, also known as “port forwarding”, is the transmission of data for use only within private network through the public network.
Ssh tunnel manager tutorial how to#
In this blog post I will show how to do RDP over SSH tunnel with plink, but first, lets just understand what it means to create a tunnel. But attackers know about it and found other ways to bypass it such as network tunneling and host-based port forwarding. Usually, companies protect such non-exposed systems by firewall and NAT rules from inbound RDP attempts. But it also help attackers, that compromised such computer, to get a connection to this remote computer. Remote Desktop Protocol (RDP) helps to get a nice graphical connection to a remote computer.
