Portforwarding and tunneling
Commands to enumerate internal networks
PS C:\> Get-NetNeighbor -AddressFamily IPv4
PS C:\> Test-NetConnection -ComputerName 192.168.210.13 -Port 443
PS C:\> Test-WSMan -ComputerName 192.168.1.10
PS C:\> arp -a
PS C:\> route printIntrusionz3r0X@htb[/htb]$ arp -n
Intrusionz3r0X@htb[/htb]$ route -4Ping Sweep
Intrusionz3r0X@htb[/htb]$ for i in {1..254} ;do (ping -c 1 172.16.5.$i | grep "bytes from" &) ;done
C:\\> for /L %i in (1 1 254) do ping 172.16.5.%i -n 1 -w 100 | find "Reply"
PS C:\\> 1..254 | % { $ip="192.168.210.$_"; if (Test-Connection -Count 1 -ComputerName $ip -Quiet) { "$ip`: True" } }
meterpreter > run post/multi/gather/ping_sweep RHOSTS=172.16.5.0/23Port Scanning if ICMP is blocked
for i in {1..65535}; do (echo > /dev/tcp/192.168.1.1/$i) >/dev/null 2>&1 && echo $i is open; doneLigolo NG
Configure double pivoting
Chisel
Chisel double pivoting

Scan the entire IP list one line
Local Port Forwarding over SSH
Remote/Reverse Port Forwarding with SSH
Meterpreter Tunneling & Port Forwarding
Socat
SSH Pivoting with Sshuttle
RPivot
Port Forwarding with Windows Netsh
DNS Tunneling with Dnscat2
ICMP Tunneling
Last updated