On the internet there are packets flying everywhere. Some from legit sources, and many many many many other sources maybe not so much.
ICMP packets are truly awesome. I can reach out to a machine across the planet and know that it is there and that it is real.
The idea of being able to reach out and touch a machine across the planet is fascinating. In a previous post I demonstrated how to find 100% random hosts on the internet LINK.
What if we could modify this slightly to choose a particular country we want to connect with?
It is actually quite simple.
Check out the reference below . This site provides us with networks allocated to particular countries.
Take a look at the ranges. Some vary from 1 to the thousands! Pick the network you want.
With hping3 we select the appropriate network and leave the final octet as "x".
When we call "--rand-dest -I <your interface>" we are establishing that we want a random host from with in a specific network.
Since the specific network is allocated to a individual country the IP addresses that are returned belong to hosts from within that country.