Saturday 27 September 2008

Find a WiFi router by it’s MAC address

http://www.liamm.com/tech/find-a-wifi-router-by-its-mac-address
Find a WiFi router by it’s MAC address

Skyhook the company behind the WiFi pseudo GPS in the iPod touch and the iPhone apparently has an API that allows you access to their database. Using this database you can find the physical geographic location of a WiFi router or access point.

I know today I was going to continue on with explaining som eof the tools in the ultimate portable hacking device series. But I saw this and wanted to talk a little about it while it was still fresh in my mind. We’ll follow up with the iPod hacking tomorrow.

Well the gist of this is that Skyhook has an API that can be used to find longitude and latitude (And sometimes a street address) given a BSSID (MAC address of a WiFi network). I stumbled on to a post on Midnight Research Labs in which they’ve provided a python script that you can use to access this API.

Basically you run the script with the BSSID as an argument and optionally the name of an output file (something.kml) that can be imported into Google Earth.

So for example

./get-location-from-bssid.py 00:13:10:44:81:60 something.kml

Which gives you output like this

[*] City: Vancouver
[*] Country: Canada
[*] Address: Fake St.
[*] Longitude: -122.8452458
[*] County:
[*] State: BC
[*] Output KML File: ./something.kml
[*] Street Number: 4242
[*] Postal Code: V3W 8R9
[*] Latitude: 49.156984
[*] Finished..

And a nicely formatted .kml file you can import into Google Earth.

Now when I tried running my own BSSID through the API it came up with the correct longitude and latitude but didn’t include an actual address so your results may vary. But really the longitude and latitude seem to be incredibly accurate in my testing so the address almost seems redundant. This would be a great tool to pair with the output of kismet to allow you to do some wardriving without a GPS device.

As always if you have any comments, suggestions or questions please post them below in the comment section.

No comments: