improved handling of attack vector, when 2 RPI attack the same target at the same time
@@ -2150,7 +2150,6 @@ else
memcpy (pkeptr +66, wpakeyap->nonce, 32);
}
-
memset(&packetout, 0, HDRRT_SIZE +WPA2QOS_SIZE +1);
memcpy(&packetout, &hdradiotap, HDRRT_SIZE);
memcpy(&packetout[HDRRT_SIZE], &wpa2qosdata, WPA2QOS_SIZE);
@@ -2182,6 +2181,25 @@ fsync(fd_socket);
return;
}
/*===========================================================================*/
+bool checkmyvendorsta(uint8_t *mactest)
+{
+size_t c;
+int testoui;
+
+testoui = mactest[0];
+testoui = (testoui << 8) +mactest[1];
+testoui = (testoui << 8) +mactest[2];
+
+for(c = 0; c < MYVENDORSTA_SIZE / sizeof(int); c++)
+ {
+ if(testoui == myvendorsta[c])
+ {
+ return true;
+ }
+ }
+return false;
+}
+/*===========================================================================*/
static inline void process80211eap()
{
static uint8_t *eapauthptr;
@@ -2215,7 +2233,9 @@ if(eapauth->type == EAPOL_KEY)
rc = be64toh(wpak->replaycount);
if(keyinfo == 1)
{
- if((authlen == 95) && (memcmp(macfrx->addr1, &mac_mysta, 6) == 0))
+ if(authlen == 0x5f)
+ {
+ if(memcmp(macfrx->addr1, &mac_mysta, 6) == 0)
{
keyver = ntohs(wpak->keyinfo) & WPA_KEY_INFO_TYPE_MASK;
if(keyver == 1)
@@ -2230,9 +2250,13 @@ if(eapauth->type == EAPOL_KEY)
{
send_m2wpa2kv3qos(macfrx->addr2, eapauthptr);
}
-// addpownedstaap(macfrx->addr1, macfrx->addr2, RX_M1);
return;
}
+ if(checkmyvendorsta(macfrx->addr1) == true)
+ {
+ return;
+ }
+ }
if(fd_pcapng != 0)
{
writeepb(fd_pcapng, false);
@@ -2245,7 +2269,7 @@ if(eapauth->type == EAPOL_KEY)
lasttimestampm1 = timestamp;
return;
}
- if(authlen > 95)
+ if(authlen > 0x5f)
{
pmkidok = detectpmkid(macfrx->addr1, macfrx->addr2, authlen, eapauthptr +EAPAUTH_SIZE);
if(pmkidok > 0)
