/WardrivingRaspberry

Wardriving with Rasbperry

Primary LanguagePython

Wardriving with Raspberry

Wardriving Resources for my Youtube Video

Kismet Version: 2016.07.R1-1

Raspbian Buster armhf

Downloading Raspbian OS

There are hundreds of thousands of tutorials on how to install RaspbianOS, this will not be another one. Google it.

Raspbian OS Download

Burning Raspbian OS with dd command

sudo dd if=2021-10-30-raspios-bullseye-armhf.img of=/dev/sdX bs=4M conv=fsync status=progress

Configuring /boot folder to set up wifi and ssh at system startup

The idea is to configure ssh without turning on the raspberry for the first time, so once the OS is burned, insert the SDcard in the computer to edit the files. To do this you only have to create a empty file in the boot folder called ssh.

In the same way with the wifi settings. Edit the /etc/dhcpd.conf file with your Wi-Fi credencials.

Reference: Enable SSH startup

Reference: Setup Wifi

UDEV Rules

I create a udev rule so that the devices connected via USB always have the same name and they can be referenced in the Kismet configuration files.

Edit /lib/udev/rules.d/72-static-name.rules file as follows (note: idProduct and idVendor in your case will be different, look them up using the command lsusb):

ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ATTRS{idVendor}=="<your_id>", ATTRS{idProduct}=="<your_id>", NAME="wifi_2ghz"
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", ATTRS{idVendor}=="<your_id>", ATTRS{idProduct}=="<your_id>", NAME="wifi_5ghz"

also GPS usb device:

ACTION=="add", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="<your_id>", ATTRS{idProduct}=="<your_id>", MDOE="0666”, SYMLINK+=”gps”

List of wifi card for hacking

To reload udev without reset Raspberry:

udevadm control --reload-rules

GPS setup

To setup the GPS device, install the following software:

sudo apt-get update
sudo apt-get install gpsd gpsd-clients python-gps
sudo apt install gpsd gpsd-tools gpsd-clients

The daemon will already be running, to check that the gps is running:

cgps -s

or:

gpsmon

References: Setting Up Gpsd On Your RaspberryPi

Kismet

Install Kismet with apt:

sudo apt install kismet

Edit the file /etc/kismet/kismet.conf as following:

source=wifi_2ghz:channel_hop=true,channels="1,2,3,4,5,6,7,8,9,10,11”
source=wifi_5ghz:channel_hop=true,channels="36,40,44,48,52,56,60,64,100,104,108,112,116, 120, 128, 132, 136, 140, 144, 149”
gps=serial:device=/dev/gps,name=gps_usb

The numbers separated by commas are the wifi channels and I am assigning the 2ghz channels to one card and the 5ghz channels to the other.

You can confirm which channels your card supports with the command iwlist channel

Run Kismet and collect data

Run kismet with the configuration file:

kismet_server -f /etc/kismet/kismet.conf &

Results

Use my script netxml_to_csv.py with the resulting file .netxml to convert it to CSV:

python3 netxml_to_csv.py -i <netxml_result_file.netxml> -o results.csv

Now, using pandas and folium can be plotted on a map, I recommend using google Colab. Use draw_aps.py.

References: Hak5 video

That's all, folks. Maybe I'm forgetting something, I always keep an eye on Twitter @kriwarez for any questions.