mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
new: new wifi.assoc command to perform a RSN PMKID clientless attack (closes #436)
This commit is contained in:
parent
0ec645afd3
commit
acbc6d28dd
7 changed files with 279 additions and 6 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue