Creating a Module for the WiFi Pineapple Part 2

The WiFi Pineapple is a versatile tool for wireless attacks. The secret behind its success is its ability to run modules created by the community. These modules greatly enhance the pineapple’s versatility. In this article, I’ll be going over my experience of making one.

Disclaimer: I’m building a module for the wifi pineapple MKVI (nano and tetra) not MKVII because that’s all I have.

I’ll be making the ZeroTier module. In part one, I went over how I created the front end with html and angular js. I also explained the issues I ran into while setting up the backend.

If you just want the module here it is.

Fixing the Backend

Initially I had issues installing and setting up Zerotier. After digging through the logs the issue was that Zerotier was looking in the wrong locations. When opkg installs Zerotier to sd it does not automatically link the files Zerotier needs. The links were added to the dependencies.sh file but there were still errors. After more digging /dev/tun was missing. This was solved by installing kmod-tun to root instead.

Setup

The Zerotier setup was easy. Most of the configuration was done using UCI, Openwrt’s built in configuration tool. After fixing the issues with files not getting linked properly, Zerotier could be setup quickly. The user would only need to input the network ID and press connect. For the first setup, the WiFi Pineapple needed to be restarted, but after that the configuration could be changed on the fly.

Start and Stop

Zerotier comes with its own service in /etc/init.d/zerotier . This reads the UCI config and tries to connect to the network. This service is great as it saved me time on writing start and stop scripts for the module. It also allowed the Zerotier to start on boot.

Linking Front and Back

This step was not too hard. In a module, the front and backend is linked using PHP. All I did was add the necessary commands into a PHP script and that was it. I also added a few more bits to show the IP address of the Zerotier interface on the module page and allowed the user to generate a new identity.

After some bug fixing the module was done. I wanted to add a few more features but those would take more time. If the module is popular enough, I’ll consider implementing those features but for now it’s complete.

Here’s the link again.


Posted

in

,

by

Comments

Leave a Reply