fireligolo-ng for pivoting, Reverse shell and file transfer

ligolo-ng Set Up

Go to the GitHub page and Download File.

File.
Files to download

We will be using a proxy file for our attacking machine (in our case, it is Kali Linux) and an agent file for a compromised host that is Linux or windows. (Take care of the architect of the machine).

Download it for Kali Linux machine and compromised host.

Make directory

Creating an interface for proxy server:

The above command is copied from the repo git wiki. [Click here to view itarrow-up-right]

Running proxy file

Running proxy file in Kali Linux. [Click here to view itarrow-up-right].

Start the proxy server on your Command and Control (C2) server (default port 11601):

Connecting to proxy server from compromised host

circle-info

Don't forget to give execute permission to the file.

We will see msg like shown below for a successful connection.

Listing the active sessions

Using session as command we can list the session and then give session number to connect to that session.

Setting up forwarding Automatically

This is available in Ligolo-ng 0.7.3. For other versions need to add manually.

find out the internal network you want to visit.

Add this to the routing table from the Kali Linux terminal.

You can also use autoroute command if you started proxy with sudo permission.

Got to the session of ligolo and type start to start the tunnelling.

Setting up forwarding Manually

Verify the connection.

You can use a tool like netexec or try ping (Pinging may not always work !!).

Best way is to run nmap command to verify. 😂

Suppose you want to access ssh 🤔. You can simply do this using the ssh command.

Adding Listener

For reverse shell

If you want to catch the reverse shell then it is highly advisable to add Listener.

Way to do that. Run the below command in the agent session.

When setting up a reverse shell using a PowerShell Base64-encoded payload, ensure that the IP address used is the local IP address of the machine through which you are tunneling. To identify the correct local IP address, run a network enumeration tool or command (e.g., netstat, ipconfig, ifconfig, or netexec) on the tunneling machine to verify the IP address you need to use. Replace the placeholder with the identified local IP address in the payload.

In my case, Tunneling machine is MS01. and it's local IP is 10.10.x.147

For File transfer:

Add a listener for the transfer of a file.

Start the server in the directory where the file to be transferred is located.

You can run the below command to download the file. Please Take care of the IP address you are using.

Last updated