
This returns an Alpha-2 ISO code which we can later use to fill a map. Iso_code = untry(ip_address).country.iso_code In this case we use the database and Python module as such: import geoip2.database

They also provide a solid Python library on Github which you can use to easily interact with the databases. Maxmind provides a Country database which we downloaded and queried against.

For example, in our case, we wanted to draw a world map indicating where participants were coming from. Maxmind provides their "GeoLite2" databases for the cost of creating an account.

Geolocating IP addressesĪ simple resource we found for mapping a physical location to an IP address are the free Maxmind databases. We had several data points to work from, and there are plenty of open tools available, so it is just a matter of cobbling those items together to create a sweet, sweet map. As part of the #OpenSOC event Recon InfoSec recently conducted, we wanted to visualize where all of our participants were coming from.
