Pivoting and Port Forwarding
Pivoting is to be able to move around inside a network.
Port forwarding allows remote access to a port over a network.Enumeration
# Network info
ifconfig
route print
netstat -r
arp -a
nmap -sn 192.168.1.0/24
# Ping Sweep For Loop on Hosts
# Linux
for i in {1..255}; do (ping -c 1 192.168.1.${i} | grep "bytes from" &); done
# Windows
for /L %i in (1 1 254) do ping 172.16.5.%i -n 1 -w 100 | find "Reply"
# PowerShell
1..254 | % {"172.16.5.$($_): $(Test-Connection -count 1 -comp 172.15.5.$($_) -quiet)"}
# Ping sweep twice to ensure the ARP cache gets built
# PS Port scan
1..1024 | % {echo ((New-Object Net.Sockets.TcpClient).Connect("IP", $_)) "TCP port $_ is open"} 2>$null
Ligolo-ng
Catching a revshell from pivoted network
Ligolo-ng Local Port Forwarding
Ligolo-ng Multi Pivot
Chisel
SSH
Last updated