Building Kismet for OpenWRT

Kismet on OpenWRT

Thanks to the hard work of Foxtrot at Hak5, there are now official Kismet Makefiles for OpenWRT, and the packages are already included in the repositories for the Wi-Fi Pineapples!

For building in generic OpenWRT instances, read on…

Kismet needs a lot of resources

Kismet tracks a lot of information about different networks and devices, which takes a lot of RAM. Most OpenWRT targets have very limited resources for flash and RAM and are not best suited for running Kismet. Usually, these devices are best suited for running the Kismet remote capture code, feeding packets to a full Kismet server on ‘real’ hardware.

It is possible to run a full Kismet server, and the package scripts provided attempt to disable the most memory-consuming aspects of Kismet while retaining functionality, however most systems running OpenWRT will run into limitations.

Get the OpenWRT code

Check out a recent version of the OpenWRT/LEDE codebase:

$ git clone https://github.com/openwrt/openwrt.git

Get the Kismet packaging code

$ git clone https://github.com/kismetwireless/kismet-packages.git

Install the OpenWRT feeds

We need to tell OpenWRT to pull the feeds into the build system. The feeds system includes many packages Kismet needs to compile. Change to the OpenWRT directory you checked out, and run:

$ cd openwrt
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a

This will download all the third-party package definitions. They’ll be needed by the Kismet packages.

Copy, or symlink, the Kismet package definitions. From the openwrt directory you should already be in:

$ cp -R ../kismet-packages/openwrt/kismet-openwrt packages/

This assumes you checked out the kismet-packages repository in the same directory that you checked out OpenWRT; if you used a different directory, of course copy from there instead.

Configure OpenWRT

You will need to configure your basic options for OpenWRT, such as the processor and board. This needs to match the processor of the target system you are building packages for.

$ make menuconfig

Enable Kismet

Now we need to enable the Kismet package. In the OpenWRT config tool still:

  1. Navigate to Network
  2. Scroll to kismet.
  3. Inside the kismet option will be many possible sub-packages. Enable the packages you need as modules.

Kismet packages

Kismet is split into multiple packages to minimize the storage required; you can pick and choose what sub-packages you need:

Compile OpenWRT

Now we need to start the build process: It will take a while.

$ make

Depending on how many processors your system has, you can speed this up with

$ make -j$(nproc)

or similar.

Copy the packages!

If everything went well, you now have a bunch of packages to copy (or a firmware image to flash). They can be found in build_dir/target_[your target processor]. Remember you may need to copy many sub-packages to your device as well!