Pivot
RINETD
Install first:
Modify config file:
SSH Tunneling
Access Remote's local port
[Kali] <======> [Linux] 10.10.10.10 192.168.10.10 [127.0.0.1:5901 LISTEN]
From Kali:
Local Port Forwarding
"Bridging"
Scenario:
[KALI] <===> [Debian] <===> [Windows Server] 10.10.10.10 192.168.10.10 172.16.10.10 ---------------------X--------------------------------------> tcp/445 --------------V---------> tcp/445 -----------V-----------------> tcp/22
Then we can use SSH port forward.
From Kali:
Remote Port Forwarding
Scenario:
[KALI] [Debian] 10.10.10.10 172.16.10.10 (Compromised) ----------X----------> tcp/22 ----------X----------> tcp/3306 ANY <------V--------------
From Debian:
Now on Kali, when traffic goes to tcp/2221, it will go to Debian's tcp/3306
SSH Dynamic Port Forwarding
Scenario:
[KALI] <===> [Debian] <===> [Windows Server] 10.10.10.10 192.168.10.10 172.16.10.10 ---------------------X--------------------------------------> tcp/445 --------------V---------> tcp/445 --------------V---------> tcp/any -----------V-----------------> tcp/22
Then we can use SSH Dynamic Port Forward.
From Kali:
For this to work, additionally we have to run proxychain. First configure /etc/proxychains.conf:
Then we can do on Kali:
(Win) Plink.exe
From Windows:
Then from Kali, we can touch the Windows's 3306 via localhost:1234.
Bypass Deep Inspection
Deep inspection means, even if you use tunneling method to connect (e.g. HTTP via SSH tunnel), the firewall can still be able to determine that the traffic protocol is HTTP instead of SSH.
Scenario:
Shell on an internal Linux Server (HTTP-based via tcp/443)
Local port forward bounding to tcp/8888, which will forward all connections to WinSer tcp/3389
Last updated