Automation of Sniffer Node Deployment

We started thinking about deployment on Friday April 10th.  That day I attempted to manually set up the nodes but after spending 45 minutes partitioning and formatting SD cards, I realized that there must be a better way.  Over the next couple of days, I instead shifted my focus to finding a way to automatically do all this rather boring configuration.  My final scripts (sitting here https://github.com/DepthDeluxe/dot11sniffer/tree/master/deployment) allow me to fully configure and bring up one of our nodes in about 5 minutes.

code

For the application bootstrapper, I decided to use the Puppet deployment management application.  While horribly slow on the Raspberry Pis, it allows for a fairly straightforward way to automatically configure the setup.  The image above is a segment of the Puppet source.  Here, I have declared that the “base-devel”, “scapy”, and “aircrack-ng” packages should be installed and specified where the “dot11sniffer” service file should be located.  Through this simple, declarative interface, I can install all prerequisite programs and libraries, move service files to where they need to be, and start them up.

0401150916

Our nodes run Arch Linux ARM.  The primary reason we chose this operating system is my past experience with it and that it uses Systemd, a new replacement for the init application.  This allows for easy daemon management.  Instead of having to write code that starts up your application, all you have to do is specify what type of application it is and the command to start it up.  I wrote 3 systemd service files: dot11setup, dot11monitor, and dot11sniffer which constitute the application bootstrapper, monitor mode enabler, and the sniffer daemon respectively.

gouda

The work that I had put in the previous week had payed off.  We now have an easy, scalable way to deploy wireless nodes.  While it may have been faster just to “bite the bullet” and do the manual configuration, this approach allows us to quickly add more nodes if we so desired.  Looking back, I wouldn’t have chosen to do anything different.

 

Print Friendly
Posted in MAC & Cheese

Messages

Assignments