new: new wifi.assoc command to perform a RSN PMKID clientless attack (closes #436)

This commit is contained in:
evilsocket 2019-02-07 18:27:14 +01:00
commit acbc6d28dd
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
7 changed files with 279 additions and 6 deletions

View file

@ -14,6 +14,7 @@ type Handshake struct {
Challenges []gopacket.Packet
Responses []gopacket.Packet
Confirmations []gopacket.Packet
hasPMKID bool
unsaved []gopacket.Packet
}
@ -49,6 +50,9 @@ func (h *Handshake) AddAndGetPMKID(pkt gopacket.Packet) []byte {
if prevWasKey && layer.LayerType() == layers.LayerTypeDot11InformationElement {
info := layer.(*layers.Dot11InformationElement)
if info.ID == layers.Dot11InformationElementIDVendor && info.Length == 20 {
h.Lock()
defer h.Unlock()
h.hasPMKID = true
return info.Info
}
}
@ -86,6 +90,12 @@ func (h *Handshake) Complete() bool {
return nChal > 0 && nResp > 0 && nConf > 0
}
func (h *Handshake) HasPMKID() bool {
h.Lock()
defer h.Unlock()
return h.hasPMKID
}
func (h *Handshake) NumUnsaved() int {
h.Lock()
defer h.Unlock()