Pivoting
Nmap pivoting
Use nmap standalone binary to scan other machines on the internal network. This is the best option to scan large networks without proxy all the traffic.
Pivoting with weevely via webshell
Chisel
Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network.
Secure Socket Funneling (SSF) is a network tool and toolkit. It provides simple and efficient ways to forward data from multiple sockets (TCP or UDP) through a single secure TLS tunnel to a remote computer.
1. We need to upload the certifications into the target machine 2. Download the windows and Linux binaries from GitHub repository 3. Execute the ssfd (server) on the Linux side
4. Upload the certificates and ssf client into the target machine (windows)
On target host I will start the client, telling it to connect back to my box. I’ll use the following options:
-g - allow gateway ports. This allows client to bind local sockets to address besides localhost. -F 1080 - This runs a socks proxy on the server on port 1080. -Y 1111 - This opens local port 1111 as a shell on the client. -L 172.19.0.4:2222:10.10.14.3:2222 and -L 172.19.0.4:3333:10.10.14.3:3333 - These will open listeners on the target machine that will forwards back to my attacker box. This will come in handy when I want to exploit further machines that can’t talk to my attacker box directly.
Reference: https://0xdf.gitlab.io/2020/08/10/tunneling-with-chisel-and-ssf-update.html
Plink.exe
Ensure that kali linux is allowing port-forwarding:
Metasploit tunnel
Create the payload
Start the listener
Type "background" to put the section in the 2nd plane
Add the route and session (1)
Verify the route: route print
Create the socks4 proxy
Configure proxychains
Run your commands
Auto-route MSF (double pivot)
Imagine you have "www" access to a web-server located at the DMZ. With this technique, you can pivot through the infrastructure easily via Internet without exposing ports in your home-router.


Double pivoting with proxychains
Ligolo-ng : Tunneling like a VPN
Pivoting references
Last updated
Was this helpful?