Sunday, July 05, 2009

View Kismet data in Google Earth

There are many ways to visualize your kismet logs with gps information. I tried some of them, in my opinion the following method is the best.

Download and extract the latest version of kisgearth.

To convert kismet logs to a google earth .kml-file use the perl script:
./ -G /var/log/kismet/Kismet-Jul-05-2009-1.gps -oN mymap.kml -n 1 -s -- /var/log/kismet/Kismet-Jul-05-2009-1.xml
For more options use
./ -h
Now start Google Earth and open the mymap.kml file and you are done.

The drawback of this method is the need of having google earth installed. On the other hand you can browse your collected data with many details about the networks available, while other solutions such as the "gpsmap" command only creates static images with the found networks on them.

Kismet and your smartphone's GPS

Kismet is much more fun with a GPS device attached, this way you have the ability to view the details of all found networks on a graphical map. So why not use your smartphone's GPS (if you have one, of course) ?

I use a Nokia smartphone with symbian OS installed. To transfer the GPS data to my computer do the following:

Download and install ExtGPS. If your phone can read barcodes, this may speed up things:Enable bluetooth, start ExtGPS and confirm the usage of bluetooth und GPS data.

Wait until you got connected to one or more satellites (the upper dot turns green). If you can't get a connection, be sure to be outside.

Next connect yout phone via bluetooth:
$ sdptool search SP
Inquiring ...
Searching for SP on 00:22:33:44:55:66 ...
Service Name: Symarctic ExtGPS
Service Description: Share phone's built-in GPS module via Bluetooth
Service Provider: Symarctic Solutions
Channel: 5
With the information above (bold) you can create a rfcomm device (as root):
# rfcomm bind 1 00:22:33:44:55:66 5
# ls -l /dev/rfcomm1
crw-rw---- 1 root root 216, 1 2009-07-05 21:00 /dev/rfcomm1
This newly created device can be used as source for gpsd:
# gpsd /dev/rfcomm1
As a last step check the file kismet.conf (look in /etc/kismet/) and enable gps usage:
# Do we have a GPS?
# Host:port that GPSD is running on. This can be localhost OR remote!
Once gpsd is running, the lower dot should turn green too.

Now run kismet, from now on your location information will be logged. In the next post I will show how you can convert this data for usage with google earth.