MonthFebruary 2016

Airgraph-ng on Kali 2.0

Airgraph-ng does not install by default with aircrack-ng. Its main wiki page has not been updated for almost six years, but is still relevant and airgraph-ng does see a fix now and again. Getting it running on Kali 2.0 was straightforward enough, but did require a bit of troubleshooting.

Make install threw an error regarding ‘common.mak’ which does not exist. Instead of ‘make install’ it appears that ‘python setup.py install’ should be used for the installation now.

This almost gets you there. Airgraph-ng expects the path /usr/bin/airgraph-ng to be valid, so creating a link to the directory gets it going. The following commands should get airgraph-ng installed and running:

cd /opt
svn co http://svn.aircrack-ng.org/trunk/scripts/airgraph-ng
cd airgraph-ng
python setup.py install
ln -s /opt/airgraph-ng /usr/bin/airgraph-ng

Note that trying this on two installs, first time it is run it says that it is getting ‘oui.txt’. I had to let this run for a minute or two before killing it and being able to successfully create an image.

airgraph-ng CAPR

War-walking Hawaiian Style

Overview

To prepare for an upcoming Wifi Survey, I decided to configure a Wifi Pineapple to use Kismet and GPS as described in Hacking Exposed – Wireless. In addition to the book, there are quite a few articles and posts to make this happen, and overall it is a simple effort.

Configuration

  • WiFi Pineapple Mark V
  • Pineapple Juice 15000
  • GlobalSat BU-353-S4 USB GPS Receiver

Setup

While some people recommend using Kismet for GPS, I did not have success with that configuration and ended up running GPSD. Consequently, the default kistmet.conf file does not require substantial changes as it defaults to a GPS/GPSD configuration.

Daemonizing GPSD and specifying the ‘don’t wait for a client to connect before polling’ flag (-n). Note that a capital ‘N’ flag is used to run GPSD interactively and may assist with your device troubleshooting.

While I think that your GPS will most likely register as /dev/ttyUSB0, double-check the load.

Kismet is a client interface for the Pineapple, so ensure that you install AutoSSH and auto-enable it.

To get Kismet running, we need to do the following:

  1. ssh to Pineapple
  2. Install dependencies:
    1. opkg update
    2. opkg install gpsd
    3. opkg install kistmet_server
  3. Edit Kismet configuration (see Wardriving with WiFi Pineapple Mark V running Kismet)
    1. Modify log directory; logprefix=/sd/kismet/
  4. Run GPS service:
    1. gpsd -n /dev/ttyUSB0
  5. Initialize Antenna
    1. ifconfig wlan1 down
    2. iwconfig wlan1 mode monitor
  6. Run Kismet
    1. kismet_server

Kiswalk Startup/Shutdown Script

With your setup scripts in place, all that needs to be done is to SSH into the Pineapple, run ‘kiswalk.sh start’, go for a walk, SSH back in and run ‘kiswalk.sh stop’

#!/bin/bash

if [[ "$1" == "start" ]]
then
    echo "Starting Kismet..."

    # Initialize GPS device
    gpsd -n /dev/ttyUSB0

    # Put the second antenna in monitor mode
    ifconfig wlan1 down
    iwconfig wlan1 mode monitor

    # Start Kismet
    kismet_server --daemonize
elif [[ "$1" == "stop" ]]
then
    # Stop Kismet
    echo -e '\n!0 shutdown' | nc localhost 2501

    # Download the capture files
    tar cvzf /sd/kismet.tar.gz /sd/kismet/*
    scp /root/kismet.tar.gz root@172.16.42.239:/sd/kismet.tar.gz
else
    echo "kiswalk.sh [start/stop]"
fi

Script maintained on Github

References

Hak5 Forum: GPSD Problem

Hak5 Forum: Track Pineapple via GPS

Wardriving with WiFi Pineapple Mark V running Kismet

© 2019 /dev/thought

Theme by Anders NorénUp ↑