Kismet + GPSDrive + MySQL + Python = Google Earth Wlan Map

Last week I decided to build a map of the wireless access point in the Town. It is not really easy to find the right tools, so I decided to write this little Howto.

To archive this goal you need severals tools:

Kismet

First install Kismet. You need a wireless card that support RFMon in monitor mode. I think Madwifi cards, and patched Orinoco are the only ones that support this.

Launch Kismet, and now check for a given AP that kismet know the best level..

If everything is ok, edit the kismet config file and set gps=try

GPSDrive

Download and install the latest CVS version of GPSDrive (I have some issues with the latest tgz and kismet). The next step is to have a GPS working with gpsd. Most GPS will work, I bought a cheap one with a USB cord on ebay.

Simply launch gpsd, and after gpsdrive. You should see the reception level in GPSDrive.

MySQL

To use Kismet + GPSDrive, you need to have a MySQL database. In fact GPSDrive will ask to kismet the new APs, and dump this informations in a MySQL db. You can find the create.sql in GPSDrive sources.

mysql -u root -p < ./create.sql

This will add a user : gast / gast

First try

Ok, now launch GPSDrive and set the ‘use SQL’ (or edit the config file), and quit.

Now to start the whole stuff:

  • Plug the wireless antenna (this is better for wardriving ;)
  • Plug the GPS
  • Launch gpsd (be carefull to have enought satellite in view)
  • Launch Kismet (it should tell you, it find the GPS…)
  • Launch GPSDrive (it should display a little kismet logo on bottom)
  • Now, you’re ready to go, walk down the street you should see new APs on the GPSDrive map.
http://www.brest-wireless.net/albums/Misc/full_gpsdrive.sized.jpg

After the trip: Google Earth

Ok, now you have a lot of points in your database.. And GPSDrive have a little troubles to display them.. After a little time, i decided to install Google Earth, and look at the way to add new points on the map..

This, is quite simple, all i need to do is to extract data form the SQL, and build a xml file that contain all the points. I decided to write gpsdriveToGoogleEarth.py. This quick and dirty script will generate a file ‘ap.kml’. Now simply launch Google Earth and open this file. You will see something like this:

http://www.brest-wireless.net/albums/Misc/google_earth.sized.jpg

The main issue for me, is that Google Earth doesn’t support Linux right now so I need to dual-boot.. But this provide a easy way to build the card without too much pain. And i can share the Google Earth file others guys simply.

WARNING

I do this only for the fun, so don’t try to hack wireless access point using this howto, this is not the goal !

– Enjoy

Related posts :

admin August 18th, 2005

28 Responses to “Kismet + GPSDrive + MySQL + Python = Google Earth Wlan Map”

  1. Pierre Don 18 Aug 2005 at 5:38 pm

    How impressive! Thanks for this illustrated howTo.

    I would be very interested in doing this same experience around the place of Nation (in the east of Paris), just to see. From my flat, last time I checked, I could see 5 different wireless networks.

    Could you give the model of your GPS? I was looking for a cheap one (Garmin eTrex for example) I could connect to my laptop but the price (even on eBay) was too expensive…

  2. Jkxon 18 Aug 2005 at 7:26 pm

    I bought a GPS without LCD that only plug to the laptop using USB. It came from China, and cost me 36.5 Euro (fedex included..)

    Look at:

    ;)

  3. Pierre Don 19 Aug 2005 at 9:14 am

    Thanks for the tip

  4. jbon 28 Aug 2005 at 1:51 am

    “Any ideas why I would get a line 9 syntax error near unexpected token `(’”

    and

    “line 9 ‘def h1():’”

    Thanks for any help you can give.

    JB

  5. Jkxon 28 Aug 2005 at 3:17 am

    Where ?

  6. jbon 29 Aug 2005 at 12:46 pm

    Line 9 

    def hl():

        print “=” * 80

  7. jbon 29 Aug 2005 at 2:58 pm

    It apprears it is having a problem with the () symbols.

  8. Jkxon 29 Aug 2005 at 5:09 pm

    Are you sure to run with python gpsdriveToGoogleEarth.py ? (because this works fine)

  9. JBon 29 Aug 2005 at 7:05 pm

    That was my problem.  I was not running python gpsdriveToGoogleEarth.py.  I also experienced a probelm with kitmet detecting 70+ APs but gpsdrive only recorded 1 (wep Enabled) in the MySql database.  Any ideas.

  10. JBon 29 Aug 2005 at 10:28 pm

    Where can I get a copy of v2.10pre3.

    John

  11. Jkxon 30 Aug 2005 at 9:31 am

    I get the same issue (only one AP in gpsdrive). You need the latest CVS snapshot to fix this (not the 2.10pre3)

  12. JBon 30 Aug 2005 at 12:40 pm

    Is it possible you can email or post the CVS snapshot with instructions to fix the issue.  It would be much appreciated.

  13. Jkxon 30 Aug 2005 at 12:49 pm

    This bug is fixed in the CVS (it only exist in the .tgz)

    To download it. simply follow the GPSDrive doc at http://gpsdrive.kraftvoll.at/download.shtml

    export CVSROOT=:pserver:anonymous@cvs.gpsdrive.cc:/cvsroot
    cvs login [press enter - there's no password]
    cvs co gpsdrive
    
  14. JBon 30 Aug 2005 at 4:23 pm

    Blank password does not work.  Any ideas.

  15. JBon 30 Aug 2005 at 10:58 pm

    After installing the CVS update it is no longer writting to mysql.  I have run make uninstall on all and reinstalled pre2.  What advise can you give on getting it installed right.  Fedora Core 4 is the platform.

    John

  16. jkxon 31 Aug 2005 at 12:18 am

    Simply install this in a different place. with a ./configure –prefix=/opt_for_example

  17. monaraltoon 01 Sep 2005 at 9:15 pm

    ªLJMªLM

  18. Jkxon 02 Sep 2005 at 8:29 am

    I found this tutorial about the KML (Google Earth) file format.

    http://www.keyhole.com/kml/kml_tut.html

  19. Philippeon 24 Sep 2005 at 6:36 pm

    I kind of got inspired by your project here:

    http://www.niquille.com/kismet-earth/

  20. HCSCharleson 03 Oct 2005 at 12:41 pm

    Would the person who originated this post consider emailing me. Would like to discuss hiring your obvious talents to setup a laptop to achieve the results in the images above.

    Charles

  21. HCSCharleson 03 Oct 2005 at 12:41 pm

    Would the person who originated this post consider emailing me. Would like to discuss hiring your obvious talents to setup a laptop to achieve the results in the images above.

    Charles

    info@hcsdatarecovery.com

  22. shammion 11 Nov 2005 at 2:25 pm

    thi is very nice

  23. Anonymouson 27 Nov 2005 at 12:01 pm

    capullos

    esto es una puta ierda

  24. mixon 10 Jan 2006 at 6:22 am

    awsome guys im going to go out and buy a usb gps tomorrow
    this is great

  25. Ryanon 21 Sep 2006 at 6:56 am

    fyi, there is now a version of google earth for linux

  26. Jesteron 19 Oct 2006 at 11:26 pm

    …Yeah… Leave em a warning telling them NOT to hack… that’s really gonna avert anyone from trying…

  27. Graemeon 18 Jan 2007 at 8:33 pm

    I’m also suffering from a problem mentioned above.

    GPSDrive registers one WEP as a waypoint and then doesn’t bother with the rest. I can’t get the CVS solution to work as described. I enter the password in as blank and then nothing happens. It just sits there! Any ideas would be greatly appreciated.

    Thanks,
    Graeme

  28. l33tb33ron 01 Apr 2008 at 9:37 pm

    I run a certain programe with a gps device.
    I find the cooridnates change often.
    Yet the gps and the device it has logged is stationary.
    In other words, min location & max location can change by over 200 meteres & more & differnt times of the day or lenght of time the gps has been running.
    Any sugestions..

Comments RSS

Leave a Reply