Module 15: Kismet Essentials

Installation

Installing Kismet:

kali@kali:~$ sudo apt install kismet
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  kismet-capture-common kismet-capture-linux-bluetooth kismet-capture-linux-wifi kismet-capture-nrf-51822 kismet-capture-nrf-mousejack
  kismet-capture-nxp-kw41z kismet-capture-ti-cc-2531 kismet-capture-ti-cc-2540 kismet-core kismet-logtools libmicrohttpd12 libprotobuf22
  python3-kismetcapturefreaklabszigbee python3-kismetcapturertl433 python3-kismetcapturertladsb python3-kismetcapturertlamr python3-protobuf
Suggested packages:
  gpsd kismet-doc kismet-plugins festival
The following NEW packages will be installed:
  kismet kismet-capture-common kismet-capture-linux-bluetooth kismet-capture-linux-wifi kismet-capture-nrf-51822 kismet-capture-nrf-mousejack
  kismet-capture-nxp-kw41z kismet-capture-ti-cc-2531 kismet-capture-ti-cc-2540 kismet-core kismet-logtools libmicrohttpd12 libprotobuf22
  python3-kismetcapturefreaklabszigbee python3-kismetcapturertl433 python3-kismetcapturertladsb python3-kismetcapturertlamr python3-protobuf
0 upgraded, 18 newly installed, 0 to remove and 112 not upgraded.
Need to get 0 B/6,237 kB of archives.
After this operation, 29.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
...
Setting up kismet (2020.04.R3-0kali1) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for kali-menu (2020.3.2) ...
Processing triggers for libc-bin (2.30-8) ...

Configuration Files

Config files can be found in /etc/kismet/.

Output Files

Log files are in three formats: kismet, PcapPpi, and PcapNg. Kismet is the default and includes all the gathered data in a SQLite database. PcapPpi is a legacy Pcap format while PcapNg is the modern.

We can override settings in multiple files by creating a kismet_site.conf file in /etc/kismet/.

Converting PcapNg to Pcap:

Creating an override to store data in a new directory and create log files in kismet and PcapNg formats:

Data Sources

Data sources include Wi-Fi, Bluetooth, Software Defined Radio (SDR), and nRF signals.

Starting Kismet

Running kismet, disabling the ncurses library:

Listing the Kismet log directory:

Running Kismet on channels 4, 5, and 6:

Starting Kismet as a daemon:

Web Interface

Web Interface is available on localhost:2501 by default.

OUI database can be found at /usr/share/kismet/kismet_manuf.txt

Securing the Web Interface

Restricting access, changing from listening on all interfaces to only our loopback:

Remote Capture

To enable remote capture, we need to setup an SSH tunnel to the server or configure the remote instance of Kismet to listen on a specific network interface. Starting a Kismet server without a data source on Kali:

Establishing a SSH tunnel with port 8000 forwarded:

Starting a remote capture:

Log Files

Command line switches related to logging:

Using sqlite3 to interact with the database:

Let's quickly review each table.

  • The KISMET table contains the database version and which version of Kismet created the log file.

  • The alerts table contains any alerts or WIDS issues.

  • The data table contains records that are not packet related, such as SDR data.

  • The datasources table contains information about the data sources used to capture data.

  • The devices table contains information about the devices Kismet was able to identify.

  • The messages table contains informational messages, such as those displayed in the console or web application.

  • The packets table contains the raw packets captured by Kismet. The table can contain multiple DLTs.

  • The snapshots table contains time-based information.

Schema for the devices table:

Let's review the columns.

  • The first_time and last_time columns contain when Kismet saw a device, the first time and last time, respectively.

  • The devkey column contains a unique identifier for each device.

  • The phyname column contains the physical layer for the device.

  • The devmac column contains a device's MAC address.

  • The strongest_signal column contains the strongest recorded signal for the device.

  • The min_lat, max_lat, and avg_lat columns contain the minimum, maximum, and average latitude values for the device.

  • The min_lot, max_lot, and avg_lot contain the minimum, maximum, and average longitude values.

  • The bytes_data column contains the number of bytes of data seen for the device.

  • The type column contains a human readable value for the physical layer device type.

  • Finally, the device column contains a JSON version of the device record, which can be quite lengthy.

Getting MAC addresses from the devices table:

sqlite one-liner:

Reading Log Files

Processing a PcapNg file with Kismet:

Exporting Data

Pcap

Checking datasources in a kismet file:

Converting a kismet file to a PcapNg file:

JSON

Using kismetdb_dump_devices to create a .json file:

Last updated