Using War Pi 2.0

Now that you have a working rig built, it is time to put it to use.

It is up to you on how you want to go wardriving.  I prefer biking over walking or driving, so I am sharing my biking experience.  The first step was setting up my rig.  I decided that my camelback was a good candidate, and the equipment I selected was not too heavy so it worked out without having to modify it or create some elaborate platform.



Cable routing is a challenge.  The GPS has a fixed cable so just short of cutting and splicing a shorter lead, you will need to coil it up. GPS positioning is important.  If at all possible, keep it close to flat and point towards the sky for a good lock.  My first few rides gave me GPS points that were all over and I suspect it was poor signal reception.  As you can see below, I managed to hook it into the plastic hook at the top of the bladder, so it sat relatively flat.IMG_20160402_153644095

The picture at the top is the overall view, what you cannot see is the battery pack and excess cable tucked into the small pocket.  The white short cable is the power connection.

As for the WiFi adapter, I simply looped the cable to take up slack and hid it under the Pi 2 case.  One of the loops for the strap just happened to be big enough for the antenna of the Alfa AWUS051NHv2, and the lower bungee was snug against the USB connector.  Not tight enough to strain it, just enough to hold it.IMG_20160402_153619641

I did not have to use any fasteners other than the camelback bungee.  I had velcro strips on hand, just in case, but everything just kind of held together nicely.  Now to take it out for a spin!

How to use

If you remember from our build post, we set everything up to run automatically.  So once you are sure everything is situated and not flying off while you are moving, hit the ON button for your power supply.  Give it a good 3-4 minutes to boot up, start Kismet, and get a good GPS lock.  Then go!

When you return from your trip, DO NOT POWER IT OFF. If you kill power, you risk fragmenting the file system.  If you made a copy of the built image already you can restore to that no problem, but we spent all that time make that great script to execute a graceful shutdown.  You will need power to retrieve the data files anyhow, so simply unplug the GPS and WiFi adapter, then plug into your local router for SSH access.  Shut down Kismet before working with the log files.
# sudo /etc/init.d/kismet stop

Retrieving Files

You have some options here.  I am going to go with the easy option of simply copying the files on to a USB thumb drive.  Before we do that, lets convert our Kismet files into Google Earth kml files, so we can plot on Google Earth.  First, we need to download a handy python script that will handle the conversion for us.

# wget

Once downloaded, we are going to rename it, move it to our logging directory and make it executable.

# mv /home/pi/kismet/
# cd /home/pi/kismet
# sudo chmod 755

Now we are ready to convert the Kismet files to kml.  Here is the output of the help file, so we can properly format our command.

# ./ -h
python netxml [options] [file1] [file2] [dir1] [dir2] [...]
./netxml [options] [dir1] [dir2] [file1] [file2] [...]

python --kmz --kml -o today somefile.netxml /mydir

-h, --help       show this help message and exit
-o OUTPUTNAME    Filename without extension
--kml            Create a KML file for Google Earth <outputname>.kml
--kmz            Create a KMZ file for Google Earth <outputname>.kmz
--disable-names  Disable names in KML/KMZ 

Example of the command I run:

# ./ -o MyWardrive --kml Kismet-20160402-22-21-44-1.netxml
Parser: Kismet-20160402-22-21-44-1.netxml, 944 new, 0 old
Outputfile: MyWardrive.*

KML export...
WPA     728
WEP     16
None    83
Other   117
Done. 944 networks

It is that easy. Now lets get those files off to USB. Plug in your USB thumb drive. Here is the dmesg output that will point you to the correct USB drive to mount.

# dmesg
[17845.912047] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[17845.913268] scsi host0: usb-storage 1-1.4:1.0
[17846.908621] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 
[17846.910804] sd 0:0:0:0: [sda] 1952256 512-byte logical blocks: (1000 MB/953 MiB)
[17846.911190] sd 0:0:0:0: [sda] Write Protect is off
[17846.911215] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[17846.911583] sd 0:0:0:0: [sda] No Caching mode page found
[17846.911606] sd 0:0:0:0: [sda] Assuming drive cache: write through
[17846.915769]  sda: sda1
[17846.919380] sd 0:0:0:0: [sda] Attached SCSI removable disk
[17846.926462] sd 0:0:0:0: Attached scsi generic sg0 type 0

As you can see, the USB drive is attached to /dev/sda1. We will make a directory if this is the first time we are mounting the USB drive. If not, we will simply run the mount command.
# sudo mkdir /media/USB1
# sudo mount /dev/sda1 /media/USB1
# ls -al /media/USB1    < to confirm volume is mounted

Now we can copy all the files from the Kismet data directory to the USB drive.
# sudo cp /home/pi/kismet/MyWardrive.kml /media/USB1/.
# sudo cp /home/pi/kismet/Kismet* /media/USB1/.

After all the files have been copied, unmount the drive before disconnecting it.
# sudo umount /media/USB1

Final Thoughts

After copying the files to my PC, I launched Google Earth and was pleased with the results.  My short bike ride yielded some interesting results.  This neighborhood still has open WiFi available, and at least 16 Access Points using WEP.


Kismet netxml to kml converter, from Patrick Salecker (there are other fun tools there too)

Leave a Reply

Your email address will not be published.