Hello World!
blog for everything
EntriesAbout Me

Make ESP8266 Deauther

By bshabanov
Published in Code
September 14, 2020
1 min read

A couple of years ago, I made Deauther with Firebeetle esp8266 on a home etched FR4 PCB - it was great, it was fun, and then I forgot about it. Recently I found it in some old stuff and decided to make a new one, but with a better look and feel. I mill new PCB, solder everything, upload some new code, and surprise - deauther not de-authenticate anything. I spend hours of debugging until I found that the new SDK of esp8266(currently 2.7.2) has no longer support wifi_send_pkt_freedom that sends whatever packet you want it to send, which is crucial for deauth flow.

0x05
ESP8266 Deauther

With many tries and errors, and found a simple solution.

  • First, I install an old version of esp8266 - 2.0.0, patch some files, and build the sketch in Arduino.
  • Update esp8266 back to the latest version (2.7.2). This step is necessary in order to upload the bin file from step 1 via the eps tool from Arduino. The upload command is run from the terminal.

##Step by step guide

  1. Open Arduino and Go to File > Preferences
  2. Add http://arduino.esp8266.com/stable/package_esp8266com_index.json to the Additional Boards Manager URLs. (source: https://github.com/esp8266/Arduino)
  3. Go to Tools > Board > Boards Manager
  4. Type in esp8266
  5. Select version 2.0.0 and click on Install (must be version 2.0.0!)
  6. Go to File > Preferences
  7. Open the folder path under More preferences can be edited directly in the file
  8. Go to packages > esp8266 > hardware > esp8266 > 2.0.0 > tools > sdk > include
  9. Open user_interface.h with a text editor
  10. Scroll down and before #endif add following lines:
typedef void (*freedom_outside_cb_t)(uint8 status); 
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb);  
void wifi_unregister_send_pkt_freedom_cb(void);  
int wifi_send_pkt_freedom(uint8 *buf, int len, bool sys_seq);
  1. Go to the SDK_fix folder of this project
  2. Copy ESP8266Wi-Fi.cpp and ESP8266Wi-Fi.h
  3. Paste these files here packages > esp8266 > hardware > esp8266 > 2.0.0 > libraries > ESP8266WiFi > src
  4. Open esp8266_deauther > esp8266_deauther.ino in Arduino
  5. Select your ESP8266 board at Tools > Board and the right port at Tools > Port
  6. Sketch > Export compiled binary
  7. Go to Tools > Board > Boards Manager
  8. Search for esp8266 install latest version(currently 2.7.2)
  9. Open terminal
  10. Type in /{path-to-arduino packages}/packages/esp8266/tools/python3/3.7.2-post1/python3 /{path-to-arduino-packages}/packages/esp8266/hardware/esp8266/2.7.2/tools/upload.py --chip esp8266 --port /dev/cu.usbserial-1430 --baud 115200 --before default_reset --after hard_reset write_flash 0x0 /{path-to-binary}/esp8266_deauther.ino.generic.bin

That should be all in order to make your deauther work.

0x05
ESP8266 Deauther

Useful links:


Tags

#code#dev#esp8266#wifi-controller
Previous Article
AVR I/O Registers

bshabanov

Discover the world

Categories

Code
Misc
Electronics

Related Posts

AVR I/O Registers
August 14, 2020
1 min
0x48 0x65 0x6c 0x6c 0x6f 0x20 0x57 0x6f 0x72 0x6c 0x64 0x21
2021 and still discovering the world