Tunneling With Ligolo-Ng

Tunneling like a VPN

Description

I like to use Ligolo-ng for tunneling because it allows me to route traffic through an interface like a VPN instead of having to rely on a bunch of socks tunnels. It also works cross OS on both Linux and Windows and can be used in much the same way as a traditional C2 system, establishing sessions to victims and issuing commands. Ligolo-ng can be downloaded from Githubarrow-up-right and there is fairly extensive documentation found on the wikiarrow-up-right.

The goal of this post is to essentially serve as a cheat sheet for the tool, providing the commands and scripts required to quickly and easily establish tunnels during engagements.

Commands

The commands below download the appropriate proxy server and agent files (make sure to use the same version and correct OS) then unzip the archives and give execute permissions to the linux server binary.

Next the Ligolo-ng server must be started on the attacking host.

Copy the Ligolo-ng agent to victim machine and run it to establish a connection.

Catch the created session and join it. Then create an interface and start the tunnel.

Lastly, add a route(s) to the subnet(s) we are trying to reach, specify dev for device and then pass the name of the interface we created in Ligolo-ng.

Now a proxy tunnel should be correctly set up that will route all traffic destined for the subnet specified through Liogolo-ng and the victim machine.

Last updated