Pivoting

Port Forwarding

The goal is to redirect packet from one port to another port.



# from ipv4 to ipv6, all packet to localhost:445 will direct to <ipv6>:445
sudo socat TCP-LISTEN:445, fork TCP:<ipv6>:445

ssh to kali machine

port forwarding with ssh

note:

local-port and local-machine in the kali machine (attacker)

Reverse Proxy

chisel

ref: https://www.youtube.com/watch?v=dIqoULXmhXg

  1. Attacker (Kali)

  1. Run in Victim Machine

Windows

Linux

  1. Config the proxychains (Attacker)

change /etc/proxychains4.conf

  1. Run command

sshuttle

Need (user login as ssh)

SSH Tunnel

nice ref:https://www.isabekov.pro/reverse-ssh-tunnel/

Can't ssh to machine?

Forward Proxy

chisel

sshuttle

Forward Proxy

Need SSH to machine:

It mean, every packet to 127.0.0.1:8989 will be forwarded as IP 10.10.10.10

You can set proxy on your browser or proxychains.conf

Don't forget to using incognito to your browser or clear cache, for better process.

Forward Proxy

If that internal port have vhost configuration, you must set up that /etc/hosts on kali linux with pointing to local port (/etc/hosts on victim machine).

Case of forward proxy

Are you stuck?

Network Pentest with Chisel

https://notes.benheater.com/books/network-pivoting/page/penetrating-networks-via-chisel-proxies

Last updated