Basic Pivoting
Last updated
Last updated
Source:
Releases:
Download and Unzip Ligolo-ng: Follow the instructions from the to download and unzip the contents.
To create the interface for pivoting, you need to add a new TUN/TAP interface and bring it up.
Delete Old Interfaces (if any):
Add a New Interface:
This creates the interface ligolo to route traffic through the tunnel.
You can always get help or view available options by running:
Start the proxy server with the self-cert option, which will listen for incoming connections:
On the target machine, use the following command to download the agent:
Once the agent is downloaded, run it with the following command:
Here, you are connecting back to your Kali machine. Note: We're using a self-signed certificate, which is why the -ignore-cert
option is included.
To view the active sessions, run the following in the terminal:
Choose the session by typing its number, for example, '1'. Once you are in the session, run:
This command shows the interfaces on the target machine, including the internal network machine, like 10.10.86.141/24
.
To route traffic through the tunnel (pivot), you need to add the target network to your routing table.
Add a Route to access the internal network:
Verify the Route:
You can check if Ligolo has added the route properly with:
Now that the route is added, go back to your proxy server, ensure you're in the correct session, and start the proxy.
Select Session:
Choose the correct session by typing the number (e.g., '1').
Start Pivoting:
Run the start
command to begin the pivot.
Now that the pivot is active, you can verify access to the internal network by using CrackMapExec to check if the internal machines are resolvable.
If CrackMapExec can resolve the internal machines, the pivot is successful, and you now have access to the internal network.