The WiFi Doctor Will See You Now.

El Kentaro
Jul 10 · 5 min read

So with Hacker Summercamp just around the corner, I figure I’d make something stupid again this year. Last year I made the bling-deauth-badge.

https://www.instagram.com/p/Bl68aFfhUwZ/

Late night eureka ….

I was looking at my amazon shopping cart where whenever I see something interesting , I just add to the cart and move the item to “buy later.” Its a list of weird or cool things I see on Amazon that one day I might have some use for. In that cart-list sat a 150ml large plastic syringe. Which gave me an idea. The other hobby of mine, if you haven’t figured out by now is making wifi-related gadgets. Suddenly the idea was clear, a barometric trigger wifi packet injector.

Parts.

1) 150ml Syringe x 1.
2) NeoPixel Ring — 12 x 5050 RGB LED with Integrated Drivers x 1
3) Adafruit Feather HUZZAH with ESP8266 — Loose Headers x 1
4) MPL3115A2 — I2C Barometric Pressure/Altitude/Temperature Sensor x1
5) Lipo Battery x 1

Birds of a Feather.

Initially I thought about using a Wemos Mini D1 pro, because it has an external antenna connector and are very cheap and it has a 5V pin to drive that an ESP8266 does not. Then I realized the setup would require someway to power the device while still maintaining an air tight chamber in the syringe. I would have to run the cable behind the blunger , the antenna connection , which initially I though could be a “fake” needle would have to have an air tight seal. The build was getting more complicated than I wanted it to be, I wanted this to be a quick build. After all its a gag item.

The @Adafruit feather is a great platform, I love working with them. Yes, they are a bit pricier and the international shipping is not the best option for me. So if I can get the parts domestically I would, fortunately I had a couple ESP8266 feathers lying around I purchased a couple months back. So I tracked down the MPL3115A2 sensor and Neopixel ring from a local distributor and I started the build.

Wiring …well kinda.

So on my twitter time line the website circuit.io came up, I wanted to give the site a try so I figured this project was a simple enough project to do so. Unfortunately the ESP8266 feather is not listed under the “Controllers” , however NodeMCU is. I have used the NodeMCU platform before and am comfortable enough, so I laid out the circuit based on the NodeMCU controller and decided to “translate” the wiring to a feather. After all “translating” is my day job. (Its not that hard….)

The one “dirty” cheat I decided to do was to wire the “pwr” of the Neopixel ring to the 3v3 on the feather had have that pin “shared” with MPL3115A2 sensor. (after I had soldered all the wiring , I realized the MPL3115A2 has a 3vo pin which I might have been able to use for the Neopixel)

So the 3v3 output max is 400mA, so even with 12 be-pixels at 18mA each I would be under the max output so it would work.

Writing the Software. (or I what I call Frankensteining code)

Technically I should have written the whole source code by myself, over the years I have collected snippets here and there to fit my needs. The following is a list of snippets used in this projects:

  1. FakeBeaconESP8266 by markszabo https://github.com/markszabo/FakeBeaconESP8266
  2. Neopixel coloring by beau.turner https://codebender.cc/sketch:65819#Neopixel%20Ring%2016%20Color%20Wipe.ino

The only piece I actually “wrote” was the logic to trigger the MPL3115A2. The idea is simple, get a baseline of the pressure prior to compressing the air, detect the change and trigger “flood” attack. But even this its based on the example by Adafruit. Now technically using a MPL3115A2 for this project is overkill, there is so much more that this sensor can do. You could make a beacon flooder/deauther that would trigger when reaching a certain height, “Deauthing weather balloon” anybody? Or when the temperature changes, “Is it hot in here or is my wifi being deauthed?”


void pressureAttack() {

float pascals = baro.getPressure();
Serial.print(pascals/3377); Serial.println(“ Inches (Hg)”);
Serial.print(“base pascal “); Serial.println(base_pascal);
Serial.print(“current pascal”);Serial.println(pascals);

// Convert pascals to PSI for easier comparison
float deltaPSI_1 = base_pascal*0.000145037738;
float deltaPSI_2= pascals*0.000145037738;

Serial.print(“deltaPSI1”);Serial.println(deltaPSI_1);

while ((deltaPSI_2-deltaPSI_1) > 0.7 ) {
rainbowCycle(1);

//actual beacon flood function
sendFuzzedBeacon(“The WiFi Doctor is here”,10);

//detect change if you let go of the plunger or not.
pascals = baro.getPressure();
deltaPSI_2= pascals*0.000145037738;


}

colorWipe(strip.Color(0,0,0), 25); // Black
strip.show();
delay(500);

}


The logic is pretty simple.

  1. Get baseline reading in pascals.
  2. Loop for reading pressure. (ie: void loop(){ code goes here})
  3. Compare baseline with current read pressure.
  4. If pressure is different then launch attack.
    — (to make it easier to compare , here I convert pascal to PSI to make it easier to compare arithmetically.)
  5. If attack light up neopixel ring and attack. Continue this till the plunger is let go and pressure is back closer to the baseline.
  6. Stop attack and “turn off” neopixel.

Construction notes:

So I did 3D print a base to hold the setup together inside the syringe chamber.

Initially I thought about having everything at the bottom and the plunger coming down to the topside. Then I realized , i needed a way to charge the feather, and securing the setup became harder than I expected. I should have know, syringes are made so that stuff “doesn’t “ stick to , makes sense.

However the rubber part of the plunger does come off and making a small hole does not compromise the air tightness (is that even a word?) too much. So I secured the hole setup on the plunger side and in the end it works out fine.

But its not really “injecting” … or is it..

Well yea you can have it deauth everything in its vicinity , but I’m not a fan of deauth attacks to prove a point. I rather beacon flood, I like the “creative” freedom a beacon flood allows me, beacon flooding Frozen lyrics, tweets , inspiration quotes etc.

But using the logic you could easily make a mass deauther, however be advised DO NOT RUN A DEAUTHER at SUMMER CAMP. Your summer camp experience will quickly become a very unpleasant experience.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade