This tutorial will guide you on how to use ligolo-ng, a network tunneling tool used for creating covert communication channels. We will cover its installation, configuration, and usage.

Beginner30 minutes

Step 1: Step 1: Installation

Before using ligolo-ng, ensure it is properly installed in your system.

git clone https://github.com/nodauf/Go-Tools.git

Practice Exercise

Install ligolo-ng on a different operating system and note any differences.

Show Solution
The installation process should be similar across operating systems, but some system-specific commands might be required.

Step 2: Step 2: Understanding the Configuration File

ligolo-ng uses a YAML configuration file to set various parameters. Let's understand its structure.

relay: '0.0.0.0:2222'\nproxy: '127.0.0.1:1080'\npassword: 'P@ssw0rd'

Practice Exercise

Create a configuration file with different parameters and explain their significance.

Show Solution
The 'relay' value represents the listening address of the server, 'proxy' is the address of the local proxy server, and 'password' is the password for authentication.

Step 3: Step 3: Starting the Relay Server

With a configuration file in place, you can now start the relay server.

./ligolo-ng relay

Practice Exercise

Start the relay server on a different port and explain any changes you observe.

Show Solution
When the relay server is started on a different port, you'll need to adjust your firewall settings and configuration file to accommodate the change.

Step 4: Step 4: Establishing a Tunnel

Once the relay server is up, you can establish a tunnel from the client side.

./ligolo-ng tunnel

Practice Exercise

Try establishing a tunnel with incorrect configuration parameters. What happens?

Show Solution
If the configuration parameters are incorrect, the tunnel establishment will fail, and ligolo-ng will display an error message.

Step 5: Step 5: Transferring Data

With a tunnel established, you can now start transferring data over the communication channel.

echo 'Hello, World!' | nc localhost 2222

Practice Exercise

Transfer a file over the tunnel and discuss the process.

Show Solution
You can use the 'nc' command along with file redirection to send a file over the tunnel. For example, 'nc localhost 2222 < file.txt'.

Step 6: Step 6: Closing the Tunnel

When you're done transferring data, it's important to close the tunnel cleanly.

pkill ligolo-ng

Practice Exercise

What happens if you don't close the tunnel properly? Discuss the potential consequences.

Show Solution
If the tunnel is not closed properly, it could leave open network connections, which could be a security risk or consume system resources unnecessarily.

Sign in to take Cornell notes on this lesson — they save automatically and stay with your account.

Sign in

Click to access the login or register cheese