fix: WPA3 is now correcly identified and reported (fixes #1098)

This commit is contained in:
Simone Margaritelli 2024-08-17 12:40:40 +02:00
parent 6282fe3451
commit 0ceb938f10

View file

@ -253,9 +253,15 @@ func Dot11ParseEncryption(packet gopacket.Packet, dot11 *layers.Dot11) (bool, st
cipher = rsn.Pairwise.Suites[i].Type.String()
}
for i = 0; i < rsn.AuthKey.Count; i++ {
// https://balramdot11b.com/2020/11/08/wpa3-deep-dive/
if rsn.AuthKey.Suites[i].Type == 8 {
auth = "SAE"
enc = "WPA3"
} else {
auth = rsn.AuthKey.Suites[i].Type.String()
}
}
}
} else if enc == "" && info.ID == layers.Dot11InformationElementIDVendor && info.Length >= 8 && bytes.Equal(info.OUI, wpaSignatureBytes) && bytes.HasPrefix(info.Info, []byte{1, 0}) {
enc = "WPA"
vendor, err := Dot11InformationElementVendorInfoDecode(info.Info)