Jul 03 2006
Wardriving with Ubuntu Linux and Google Earth
Wardriving is fun. Going around the neighborhood and mapping all the wireless networks may be nothing more than a geeky hobby but it can sure teach you alot. And viewing the results in Google Earth is icing on the cake.
I’ve used NetStumbler on windows and this works great but since my computers at home are now nearly Microsoft-free, I had to relearn the process on Linux. It breaks down into a few easy steps:
- Install the drivers for you wireless card. On my HP laptop with a Broadcom card, I followed the instructions on the ubuntu forums which worked great with one exception: the driver link on that page doesn’t have a valid md5 sum so you can download it from this url instead
- Install gpsd. This is the software that talks to your gps unit and is available in the ubuntu packages through apt. The one hitch is that I had to set up my Magellan GPS unit up for the correct baud rate and NMEA output. Once installed, I connected the GPS unit via a serial port, turned it on and ran gpsd /dev/ttyS0 to start the gpsd server.
- Install kismet, the wireless packet sniffer. The version in the ubuntu repository is not recent enough to support my Broadcom driver so I had to download the latest source and compile it with the standard configure, make, sudo make install . Then I had to edit the /usr/local/etc/kismet.conf to reflect my system configuration; I changed the suiduser, source and logtemplate variables. Once configured, you can start it with the command sudo kismet.
- Now drive/bike/walk around for a bit with your laptop and gps unit. When you’re done, shutdown kismet and you’ll have a bunch of fresh logfiles to work with.
-
The main kismet log is an xml file containing all the info on the available wireless networks including their SSID, their encryption sheme, transfer rater and their geographic position via gpsd. I worked up a small python script, kismet2kml.py (based on a blog entry at jkx@Home), to parse the logfile into a KML file for use with Google Earth. It could certainly use some tweaking but it’s a start. To run it, give it the kismet logfile and pipe the output to a kml file:
kismet2kml.py kismet-log-Jul-03-2006-1.xml > wardrive.kml - Now fire up Google Earth (Linux version now available!) and load your KML file.

Also, as James Fee points out, posting your data as KML files means that the data can be integrated into a growing number of kml-ready apps including google maps (just upload the kml and point your browser to http://maps.google.com/maps?q=http://your.server/wardrive.kml).
Another neat application I’ve found for dealing with kismet logs is the kismet2gpx script for converting the kismet gps tracklog into gpx. Since most gps units have pretty tight limitations on the length of stored tracks, logging them to your laptop with kismet could be an effective way of creating detailed tracks on very long trips.
The important note here is that, user will still need to have a GPS unit. Ubuntu Linux and Google Earth are just software applications. It is not going to be as simple as using your laptop and trace out those signal.
Don’t forget to upload all those GPX tracks to the OpenStreetMap project too
i was going to go war driving tonight but the weathers bad, and i can’t drive yet.
dang if gas prices weren’t so high… I’ve been meaning to finish mapping the north half of my city.
As Keith said, this requires a GPS unit, and they’re rather expensive…
Haha very good folks! Keep it up
Hans - geeks.com for cheap GPS’s
Thanks for the nice Ubuntu howto.
this is a very helpful and informative info you had given us…
thanks for sharing it to the world…
good luck to you and more power…
Here you will find 2 additional post on Kismet + Google Earth (on Linux)
Kismet + GPSDrive + MySQL + Python = Google Earth Wlan Map
Howto to get openGL working on Debian (for Google Earth)
Hope this help.
A Delorme USB GPS unit can be had online and in store for around $99 with their navigation software (though get the unit and use streets and trips or iguidance instead)
Don’t forget tools like EarthStumbler for the Windows/NetStumbler users out there.
Nice post Matt, I’m inspired to do it myself now. It all seemed so mysterious before
Great script, worked well with a 200+ waypoint/AP file. Two potential “gotcha’s” in the script: First, if there’s no GPS data associated with an AP, it puts the AP in the middle of the South Pacific, because Kismet defaults to (-180,-90,0). Second, Kismet writes “<No current ssid>” to the xml file occasionally, this gets translated by the script to “” in the kml file, which Google Earth then thinks is invalid XML. It should be written as “{No current SSID}”. Not being a Python coder, I’ll make these changes by hand for now!
Whoops, guess wordpress doesn’t like the tags in my previous comment. The second issue should read that Kismet writes “ampersandlt;No current SSIDampersandgt; in the XML file, which the script then translates to leftbracketNo current SSIDrightbracket in the KML file, leading to Google earth evaluating it as invalid XML.
Good stuff though I’m still trying to get my Orinoco Gold card to work under Breezy Badger… Bookmarked the script for later reference.
Thanks for the cool demo! Just based some similar stuff on your examples of using elementtree http://casoilresource.lawr.ucdavis.edu/drupal/node/288
cheers,
Dylan
Can someone do the procedure for windows 2.
I did some war driving once. Was fun at first but it was hard to sustain for a long time given the limitations. But you are not me so you will probably get greater pleasure .
Don Lapre is a Superstar
webmaster@j-ams.org
http://www.j-ams.org
Hey, nice tutorial. Been meaning to get in to some wardriving for a while. I’ll have to read more about it now.
to fix the invalid token error with google earth edit kismet2kml.py, line 33 to look like this
ssid = ssid.replace(’&’,”) .replace(’
Looks like this site has the same problem as the script (parsing lessthan symbols), the line should look like (hopefully this displays correct)
ssid = ssid.replace(’&’,”) .replace(’lessthansymbolhere’,”)
hopefully you understand what I mean
this seems to keep google happy
Great tutorial, before i didn’t realy know what it was about but it inspires me to try it too.
I think alot of people tried cruising around with wireless, found alot of router never did anything with logs though.
Thanks good story
Great tutorial!! I like to hang around the maps on FON’s page and see where i can expect to have free WiFi. Now there is another way!
If you’re on OS X, KisMac (http://trac.kismac.de/) has Google Earth support built in.
Hello!
Not sure if this is the right place to post this, but here is the story of my dog called Shandy.
He was my favourite pet and he was very lively, lots of fun and very obedient. His main
passion in life was to be taken for a long walk, culminating with a big run out in his favourite
park. I would try to take him on this walk everyday, weather permitting. The park itself
was about three miles away from our house. What do you think?
By the way, I love that too! Where did you get that at?
Bye, bye - Wendy!
Nice..
old but still doing its job
http://www.niquille.com/kismet-earth
Very interesting
Some of the things you have suggested are very clever
Best of luck
cool work
Search, database linked to Google Maps with simple php code - Wardriving Map
Check this out.. Interactive Wardrive Map with database search.. Nice work
http://map.airdump.net
I Have Google Earth installed on my pc. However I’m using Windows and
haven’t tried using Linux though. Will try your GPS methods soon.
Thanks for sharing Perry.
can I map locations even if I am not in US ?
[…] howto su come utilizzare un portatile con Ubuntu, una scheda GPS, Kismet e Google Earth per andare a […]
[…] Užite?né odkazy: Wardriving mapa na Google Earth, wardriving Ubuntu Linux. […]
[…] could measure statistics related to an urban region, such as wireless network densities http://www.perrygeo.net/wordpress/?p=55) or noise pollution statistics, and then use the compiled data to intelligently formulate policies […]
[…] Wardriving with Ubuntu Linux and Google Earth – Wardriving is fun. Going around the neighborhood and mapping all the wireless networks may be nothing more than a geeky hobby but it can sure teach you alot. And viewing the results in Google Earth is icing on the cake. […]