Basic Pivoting
Basic Pivoting with Ligolo-ng
Source:
https://github.com/nicocha30/ligolo-ng
Releases:
https://github.com/nicocha30/ligolo-ng/releases
Step 1: Install Ligolo-ng
Download and Unzip Ligolo-ng: Follow the instructions from the Ligolo-ng GitHub repository to download and unzip the contents.
Step 2: Set Up the Interface
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.
Step 3: Get Help with Ligolo-ng
You can always get help or view available options by running:
Step 4: Start the Proxy Server (Listening)
Start the proxy server with the self-cert option, which will listen for incoming connections:
Step 5: Move the Agent to the Target Machine
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.
Step 6: View and Interact with Sessions
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
.
Step 7: Add Routing to the Pivoting Interface
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:
Step 8: Final Step - Start the Pivoting Session
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.
Step 9: Verify the Pivoting Setup
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.
Last updated