Kismet Monitoring From a Hak5 Wi-Fi Coconut: Coconut War Rig

Ringmast4r
The Hacker Outpost
Published in
9 min readSep 4, 2022

An unexpected thing to find ourselves here… How did it come to be this way?

Throughout the last year, I have been fascinated by the act of ‘wardriving’. A unique practice that combines hardware savvy, technical skill, and radio knowledge into a beautiful symbiotic art form. Packaged into a grotesque ordinance of wires, batteries, microcontrollers, and antennas it is an alluring sight to behold. All of which together are the finished product of our beloved ‘rigs’. Thus, the name has been dawned on the tool of our scanning adventures: Wardriving Rigs.

I have been tinkering with several projects over the years, mostly with raspberry pis, and have been more recently drawn to my new home in the world of ‘Cyberdecks’. Wardriving and Cyberdecks combined, it only made sense to create wardriving rigs. So with that said, over the past year, I have been interested in wardriving/warwalking rigs.

Recently released at DEF CON 30, Hak5’s Wi-Fi Coconut, became an immediate area of interest. While at the Linq Casino bar, my good friend who happens to be a red team pentester told me about the Wi-Fi Coconut and even took it out of his bag to show me with excitement of what it might do. An unexpected surprise, as the Wi-Fi Coconut was brought to DEF CON 30 by Hak5 unannounced and was not on their website yet for sale. As it was released at DEF CON 30, only a select few of people learned about the discovery of the yet-to-be-unveiled device. Amongst the horde of humans and shenanigans, this would be an easy thing to miss without prior knowledge of it.

As I read the given instructional card within the box a particular area immediately caught my eye, “…utilizes an array of finely tuned 802.11 radios to simultaneously monitor all channels of the 2.4 GHz Wi-Fi spectrum”. I gasped with shock and excitement and exclaimed to my hacker companion “…this could be a wardriving monster!”

Two weeks after DEF CON, I purchased one with glee.

The coconut arrives in due time which brings us to where we are now. Considering I may be one of about 30 people (if that) in the world who have one of these devices this early, it would be fun to write about it. In an attempt to document my process for creating a Coconut War Rig guide for y’all, I thought it would be a simple task. However, quickly into what was supposed to be an easy setup, turned to be a myriad of issues. So rather than a full walkthrough, this will serve more of an array of troubleshooting guides with a general sense of what I am trying to accomplish.

Now there’s more than one way to skin a cat. (Sorry my cat lover friends, ilu) However, with my style of doing things, I enjoy running operating systems from USB booting them. There is something about containing an entire operating system on a USB, which I can carry around with me anywhere on such a tiny device. It's fascinating. If you damage something on the operating system, you just reflash the USB and problem solved. Everything is self-contained within the USB drive, and nothing is altered on the original operating system of the computer that is used. Which means, I can carry around my computer with me anywhere and I can run it from any computer and pick up what I was just working on. That is also my double spin take on the meaning ‘my other computer, is your computer.’ Quite literally so.

A great alternative to installing an operating system to your local machine or having to create a partition within your hard drive to multiboot your pc. Or potentially totally crashing or wiping your own machine with no knowledge of how to fix it. Its quick and easy and removes a lot of headache from the equation which would otherwise eat into your time: if you’re not already familiar with any of these steps.

We are going to USB Boot Kali Live OS (kali-linux-2022.3-live-amd64) on a Samsung FIT Plus 128GB 3.1 (MUF-128AB/AM) USB Flash Drive with persistence from a MSI Stealth GS Series Stealth Laptop, and run the Hak5 Wi-Fi Coconut through kismet after downloading and installing the correct software and drivers. Here we go!

Download Kali

1. Download the Live Boot option for Kali OS

2. Go to https://www.kali.org/get-kali/ (or go find the downloads on their official website.)

3. Go to Live Boot

4. Select and download the latest Kali image from the selections ( it will be in the middle with a blue notification below which says ‘recommended’ )

5. Wait for the image to finish downloading to your computer

6. Huzzah! You just downloaded Kali Live OS

USB BOOT KALI

1. Download the Live Boot image OS from kali.org

2. Flash the image to a USB using Rufus (I had issues with persistence using Balaena Etcher)

3. Select the full partition size (we want to use the entire USB’s memory space)

4. Boot the USB from your computer of choice

5. Once at the menu, select the ‘Live system with USB persistence’ option

6. The system will boot directly to GUI/Desktop

7. Huzzah! You are on Kali OS!

Test if Persistence is Working

  1. Right click on the desktop
  2. Create a new folder
  3. Name the folder whatever you want, ‘test’
  4. reboot the system and login to see if the folder is still there

Update Kali

We are going to update the operating system as well as do a full upgrade to ensure everything is installed and up to date running the latest version of Kali

  1. Open a terminal
  2. Type in the command;
  3. sudo apt update && sudo apt full-upgrade -y
  4. Wait forever for this to finish installing.

Create User with Root Privileges

There are two ways to do this both ending with the same result. The quick and easy way, or the normal way.

Method 1— Quick and Easy

  1. Open a terminal
  2. Type in the command;
  3. sudo adduser USERNAME
  4. Type in your password of choice
  5. Hit Enter into the following fields leaving them blank
  6. Press Y to accept changes
  7. Enter in the command to give root access;
  8. Sudo usermod -a -G sudo USERNAME
  9. Su USERNAME
  10. Test if you now have root access by entering the following commands
  11. Whoami
  12. Sudo whoami

Method 2— The normal way

1. Open a terminal

2. Enter in the commands;

3. Sudo useradd -m USERNAME

4. Sudo passwd USERNAME

5. Sudo usermod -a -G sudo USERNAME

6. Sudo chsh -s /bin/bash USERNAME

7. Su USERNAME

8. Test if you now have root access by entering the following commands

9 Whoami

10. Sudo whoami

(Optional) Sudo Password Removal

Now it's time to remove that pesky password prompt in terminal every time you run a sudo command. DISCLAIMER: This is not a recommended security practice. This is being done out of sheer convenience.

1. Open a terminal and enter in the following commands;

2. Sudo visudo

3. At the bottom of the document, enter in the following;

3. USERNAME ALL=(ALL) NOPASSWD:ALL

4. ctrl + X

5. y

6. press enter

Install GPSD

There are different ways to Install gpsd to ensure gps is working properly. This is just one.

  1. Sudo apt install gpsd
  2. To test if gps is working. Run the command;
  3. cgps
  4. or run the command;
  5. xgps

6. If these aren’t working you may need to manually start gpsd(or reboot your pc? sometimes after rebooting your system it will work right away);

7. sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock

Install Hak5 Wi-Fi Coconut’s Drivers

Now its time to download the Wifi Coconut Software and drivers. I followed The Hak5 Wifi Coconut documentaiton. Located at docs.hak5.org. The following is my attempt of documenting how I accomplished this.

  1. sudo apt update
  2. sudo apt install build-essential cmake libusb-1.0–0-dev libpcap-dev git
  3. git clone https://github.com/hak5/hak5-wifi-coconut
  4. cd hak5-wifi-coconut
    mkdir build
    cd build
    cmake ../
  5. sudo make
  6. sudo make install
  7. sudo wifi_coconut

Configure Kismet to recognize the Wifi Coconut

  1. Remove any Kismet installed from source
  2. sudo rm -rfv /usr/local/bin/kismet* /usr/local/share/kismet* /usr/local/etc/kismet*
  3. Download Kali Nightly git
  4. wget -O — https://www.kismetwireless.net/repos/kismet-release.gpg.key | sudo apt-key add -
    echo ‘deb https://www.kismetwireless.net/repos/apt/release/kali kali main’ | sudo tee /etc/apt/sources.list.d/kismet.list
    sudo apt update
    sudo apt install kismet
  5. Update kismet with nightly git;
  6. sudo apt install kismet-capture-hak5-wifi-coconut
  7. Fix the broken package which is not installing correctly;
  8. sudo apt install kismet-core kismet-adsb-icao-data

9. sudo apt install kismet-capture-hak5-wifi-coconut

10. Check to see if coconut is being read;

11. kismet_cap_hak5_wifi_coconut — list

12. Run kismet with coconut;

13. kismet -c coconut:name=WifiCoconut

14. Go into kismet data sources and select the WifiCoconut

Troubleshooting

I would surprised if you don’t run into issues. It’s just how computers are. 95% of your time will be spent troubleshooting and figuring out how to debug the issue. Thats where all the fun lies, within the puzzle of trying to solve the problem.

GPS

GPS works fine, but when Coconut starts Kismet it does not read coordinates within Kismet: Tell me about it… I am still working on that.

Flashing USB

If you have any issue with the USB device not being discovered by your computer. Open diskpart on a windows machine and use diskpart to correct the issue

  1. list disk
  2. select disk 1
  3. clean
  4. create partition primary
  5. reformat the drive through file explorer

Persistence on the USB not persisting

This gave me the most trouble. I have regularly used balena etcher in the past to flash a majority of my USBs and Micro SD cards. However, this time around I ran into most of my issues. Persistence wasn’t holding whenever I would reboot my machine. I kept losing all of my work. Rufus ending up working in the end to some degree for this. Some USBs would not work, while others did. On one occasion my kali instance was still there, however the user had been totally deleted. After recreating the user and testing after reboot. The user was still there…odd.

I still have some things to work out for it to be the way I like. But for now, the coconut is being recognized in kismet and the software is successfully compiled. I need to see why the gps is not working when Kismet is running the coconut. For now, I’ll take this as a win as it's been great practice. This is my first Hak5 device! I’ve been having a blast playing with it. I plan on using it to build a portable Coconut War Rig to boost my wigle numbers.

~Ringmast4r

--

--

The Hacker Outpost
The Hacker Outpost

Published in The Hacker Outpost

The Hacker Outpost is a collective of hackers who are sharing their insights on various interests.

Ringmast4r
Ringmast4r

Written by Ringmast4r

SOC Analyst by day | Hacker by night | Blue Team | DCG561