Netsh - Windows command line tool that helps with network configuration of a particular windows system.
Scenario:
We compromised Windows 10 IT admin’s workstation (10.129.15.150
,172.16.5.25
).
Attacker(10.10.15.5) → Windows10(10.129.15.150
,172.16.5.25
) → Windows Server (172.16.5.25)
Netsh
We can use netsh.exe
to forward all data received on a specific port like 8080 to a remote host on a remote port.
Windows10 machine will listen for incoming connections on port 8080.
Traffic is forwarded to port 3389 on Windows Server.
On Windows10 machine, any incoming connections on port 8080 will be forwarded to port 3389 on Windows Server.
We can verify port forward as such:
Now we can access Windows server’s port 8080 via Windows10’s port 8080: