SSH
Local port forwarding
The -L
command tells the SSH client to request the SSH server to forward all the data we send via the port 1234
to localhost:3306
on the Ubuntu server.
Confirming Port Forward with Netstat
Dynamic port forwarding
The -D
argument requests the SSH server to enable dynamic port forwarding. Once we have this enabled, we will require a tool that can route any tool's packets over port 9050
.
To inform proxychains that we must use port 1080, we must modify the proxychains configuration file located at /etc/proxychains.conf
. We can add socks5 127.0.0.1
1080 to the last line if it is not already there.
Nmap
One more important note to remember here is that we can only perform a full TCP connect scan
over proxychains.
Setting up remote/reverse port forwarding through SSH
Payload - listener sent to InteralIPofPivotHost:8080
SSH remote port forward - InteralIPofPivotHost:8080 --> 8000
Local listener on port 0.0.0.0:8000
Use multi/handler LPORT 8000
Last updated