Skip to content

Ping Sweep

Enumeration

Ping Sweep:

Msfconsole - msf6 > run post/multi/gather/ping_sweep RHOSTS=172.16.5.0/23

Linux shell - for i in {1..254} ;do (ping -c 1 172.16.5.$i | grep "bytes from" &) ;done

FPING: https://fping.org/dist/fping-5.5.tar.gz

CMD - for /L %i in (1 1 254) do ping 172.16.5.%i -n 1 -w 100 | find "Reply" - increase wait time with -w

PowerShell - 1..254 | % {"172.16.5.$($_): $(Test-Connection -count 1 -comp 172.16.5.$($_) -quiet)"} - 1..254 | % { $ip="172.16.5.$_"; if(Test-Connection $ip -Count 1 -Quiet){$ip} }

- If host's firewall blocks ICMP, we can perform TCP scans on the network - Use msfs socks_proxy post-exploitation module to configure a local proxy on our attack host