How to Detect Deauth attacks on Wi-Fi network using ESP8266

In this tutorial, using the Wemos board, which is based on ESP8266, we are going to detect DEAUTH attacks and inform the user. We will also use a battery shield to make the project portable.  Visit CiferTech for more tutorials, and be sure to follow my Instagram page to support me. ^-^


ESP8266 WiFi chip


The ESP32 and ESP8266 modules from Espressif Systems are some of the most widely used and accessible IoT chips. They are also cheaper than other IoT chips. We can also use Arduino software to develop its code, which provides easier access for the user.

 

Some features of ESP8266:

  • The ESP8266 network and microcontroller module is one of the most popular, inexpensive and accessible IoT chips.
  • Having a powerful microcontroller with internal WIFI network connection,
  • Full TCP / IP full stack support
  • It is also a good option for small and low-consumption IoT applications by providing adequate hardware interfaces.
  • This microcontroller was launched in 2014.

 


 Wemos D1 Mini


Wemos board is one of the most popular boards used in the field of iot, one of the advantages of this board compared to boards such as Node MCU is its small size. The Wi-Fi chip used in this board is ESP8266. Another advantage of this board is the existence of various shields for this board, which makes any project very easy and enjoyable for the user, shields such as battery shield, multi sensor, DHT22, relay, oled, a large number The shield has been developed for this board, which will leave you a good iot experience.

 


Wemos battery shield


The battery shield allows the user to portable their IoT project by connecting the shield to the Wemos board and connecting the battery from the connector to charge the battery in addition to the portable size of the project. The lithium battery suitable for this shield is in the voltage range of 3.3 to 4.2.

 


Deauthentication attack


These types of attacks occur in the 802.11 standard, ie the same Wi-Fi wireless networks. In fact, this attack is such that by sending a large number of de-authentication packages to the target APs, the device access is cut off. We are connected to it, in fact, we do this without connecting to the target APs, and we will only be able to carry out this attack by having information such as the AP MAC address and SSID or the same Wi-Fi name. Now the question is what is the reason for this attack by the attacker ?! In fact, the whole process is to capture HandShake. In this case, the person cuts off your access to the network, forcing you to reconnect, so that the attacker can record the radio event between you and the rotor, which in This event transmits important information and as a result an attacker can infiltrate your wireless network.

 


Items needed


Wemos D1 Wimos Development Board

Wimos Battery Charger Shield

Neopixel LED

Lithium battery

 


Schematics and connections


In this project, we use a neopixel ring and the DI pin is connected to the D2 pin of wemos.

 


Project code


First, we have introduced the following libraries, one for recognizing the ESP8266 board and the other for launching neopixels.

 

The following functions define the requirements, such as the number of LEDs used, badrit, pin used for neopixels and other settings.

 

Upload the following code to your board:

 


Conclusion


As a result, after connecting and uploading the color code, the neopixels will turn green, and when an attack occurs, the color of the neopixels will turn red. In fact, Wemos is always scanning the 14 available channels, and in case of any problems, you will be notified.

 

  • Thanks to Spacehuhn’s for providing the code for this project, go check out his website with awesome content.

 

1 thought on “How to Detect Deauth attacks on Wi-Fi network using ESP8266”

  1. ทางเข้า sbobet

    Thank you a bunch for sharing this with all of us you actually understand what you’re speaking approximately!
    Bookmarked.

Leave a Reply

Your email address will not be published. Required fields are marked *