Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added beacon packet to handshake cap file for PMKID assoc attack #603

Merged
merged 1 commit into from
Aug 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/wifi/wifi_recon.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func (mod *WiFiModule) discoverAccessPoints(radiotap *layers.RadioTap, dot11 *la
}

if ap, isNew := mod.Session.WiFi.AddIfNew(ssid, bssid, frequency, radiotap.DBMAntennaSignal); !isNew {
//set beacon packet on the access point station.
//This is for it to be included in the saved handshake file for wifi.assoc
ap.Station.Handshake.Beacon = packet
ap.EachClient(func(mac string, station *network.Station) {
station.Handshake.SetBeacon(packet)
})
Expand Down
10 changes: 10 additions & 0 deletions modules/wifi/wifi_recon_handshakes.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ func (mod *WiFiModule) discoverHandshakes(radiotap *layers.RadioTap, dot11 *laye
staMac,
PMKID,
key.Nonce)

//add the ap's station's beacon packet to be saved as part of the handshake cap file
//https://github.com/ZerBea/hcxtools/issues/92
//https://github.com/bettercap/bettercap/issues/592

if ap.Station.Handshake.Beacon != nil {
mod.Debug("adding beacon frame to handshake for %s", apMac)
station.Handshake.AddFrame(1, ap.Station.Handshake.Beacon)
}

} else if !key.Install && !key.KeyACK && key.KeyMIC && !allZeros(key.Nonce) {
// [2] (MIC) client is sending SNonce+MIC to the API
station.Handshake.AddFrame(1, packet)
Expand Down