kamerka: Build interactive map of cameras from Shodan

kamerka

kamerka

The script creates a map with cameras based on your geolocation or exact address. It uses Shodan API to find cameras, Geopy to find the address and measure distance, and Folium to draw a map.

It’s proof of concept to visualize cameras from Shodan API into the real map. Some of the cameras are left open with no authentication so you don’t need to have any hacking skills to get access and depends on where the camera is located you can get an interesting view in some cases. With a lot of luck, it can help you with OSINT investigations or geolocating photos. Imagine you have the photo to geolocate and you found open camera exactly pointing to this place, or somewhere nearby, which can give you hint.

kamerka

The most significant points in the script are Shodan API, GeoPy and Folium library.

Shodan allows us to find any device in a given location based on longitude, latitude and radius, responsible for this is filter “geo”. Next, filter “device” is added for displaying only webcams. The whole command looks like this: “geo:37.235,-115.811111,5 device:webcam”.

Thanks to Geopy, you can search by address or a particular building. Additionally, it measures the distance between the camera and the initial target.

Folium is amazing GIS (Geographic Information System) library with a lot of handy options and it looks really cool. Results from Shodan are passed into Folium to create a map with markers referring to each webcam. Markers are in two colours — red means that camera has probably some form of the authentication and does not return 200 OK code, while green colour says that it’s open or displays some login panel.

Moreover, markers are grouped, in case there are many in one place. After clicking on any, information like IP, model and distance are displayed.

Download && Use