cd hak5-wifi-coconut
mkdir build
cd build
cmake ../
cmake will confirm that the required dependencies are available.
Compile
Still in the build directory, run make to compile the code:
Install
While still in the build directory, finally, install the compiled programs:
This will install the wifi-coconut tool to the default path (/usr/local/bin by default), and the rt2800usb firmware to /usr/local/share/.
Running
Running the wifi_coconut tool requires root privileges, since it performs raw access to the USB devices. Run it via sudo:
Additionally, the wifi_coconut tool takes several options to automate behavior:
Integrating with other tools
Output from the wifi_coconut tool can be directly piped to other tools like tcpdump or tshark:
or
Troubleshooting
After connecting the WiFi Coconut, you can look at the output of lsusb to confirm that the radios have been found:
If all the radios do not appear, check the output of dmesg - you may need to run sudo dmesg depending on your Linux distribution.
Root required
When running the wifi_coconut tool or coconut capture with Kismet, root is required. Run the wifi_coconut tool with sudo, and install Kismet as suit-root or run it via sudo as well.
Usage: wifi_coconut [options]
By default, the wifi_coconut tool opens in interactive mode.
Universal options:
--disable-leds Go fully dark; don't enable any LEDs
--invert-leds Normally a Wi-Fi Coconut enables all the LEDs
and blinks during traffic; Invert only lights
when there is traffic.
--disable-blinking Disable blinking the LEDs on traffic
Non-interactive modes:
--no-display Don't display channel UI while logging
--wait Wait for a coconut to be found
--pcap=[fname] Log packets to a pcap file. If file is '-',
a pcap file will be echoed to stdout so that it can
be piped to other tools. --wait-for-coconut Wait for a coconut to be connected and identified
--list-coconuts List Wi-Fi Coconut devices and exit
--coconut-device=X If you have multiple Wi-Fi Coconuts, specify
which one to use
--enable-partial Enable a Wi-Fi Coconut even if not all the
radios have been identified.
--plain-dot11 Log plain 802.11 packets instead of radiotap
formatted packets with signal and channel
--quiet Disable most output