ssh tunnel

NOTE: needs valid SSH creds on box to pivot from.

meterpreter tunnel

# to print existing routes 
autoroute -p

run autoroute [-s IP/CIDR]
[OR]
use post/multi/manage/autoroute
# use auxiliary/server/socks_proxy

ssh tunnel:

Forward tunnel (outgoing)

ssh user@IP -D PORT
# this sets up a tunnel between localhost:TUNNEL-PORT and target
# any requests to localhost:TUNNEL-PORT is routed via target

Reverse tunnel (incoming)

authorized_keys file

Command

Proxychains

/etc/proxychains4.conf

Now, run any command using $ proxychains4 [command]

proxychains4 for browser

Set up a foxyproxy configuration for browser:

  1. Title: proxychains

  2. Proxy Type: SOCKS4

  3. Proxy IP: localhost

  4. Port: 6900

chisel tunnel

Reverse socks proxy

NOTE: configure proxychains using socks5 IP PORT.

Forward socks proxy

sshuttle tunnel

  • REQUIREMENTS:

    • Works only on linux targets

    • SSH access to target

    • Python on target (static binary works)

Last updated

Was this helpful?