Page cover

Port Fowarding and Proxying

Port Fowarding and Proxying

Port Fowarding

SSH Tunneling/Local Port Forwarding

ssh user@<ip> -p port -L 8001:127.0.0.1:8080 -fN

SSH Remote Port Forwarding

ssh -R 5555:127.0.0.1:5555 -p2222 <user>@<ip>

Socat - Port Forward

./socat.exe TCP-LISTEN:8002,fork,reuseaddr TCP:127.0.0.1:8080

chisel - Remote Port Forward

-> Your machine

./chisel server -p <LISTEN_PORT> --reverse &

-> Compromised Host

./chisel client <ATTACKING_IP>:<LISTEN_PORT> R:<LOCAL_PORT>:<TARGET_IP>:<TARGET_PORT> &

Chisel - Local Port Forward

-> Compromised Host

-> Your Machine

Proxying - Network Pivoting

sshuttle (Unix) - proxying

SSH + Proxychains

edit /etc/proxychains.conf with socks4 127.0.0.1 8080

chisel - Reverse Proxy

-> Your Machine

-> Compromised Host

chisel - Forward Proxy

-> Compromised Host

-> Your Machine

metasploit - proxying

Last updated