mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-31 01:04:03 -05:00
fragattack: tweaked when we can auto-detect macos and eapol-amsdu results
This commit is contained in:
parent
3ebb32b45d
commit
68a297795c
@ -148,11 +148,16 @@ class MacOsTest(Test):
|
||||
# before authenticated because previous fragment was EAPOL.
|
||||
# By sending to broadcast, this fragment will not be reassembled
|
||||
# though, meaning it will be treated as a full frame (and not EAPOL).
|
||||
_, request, _ = generate_request(station, self.ptype)
|
||||
_, request, check_fn = generate_request(station, self.ptype)
|
||||
frag2, = create_fragments(header, data=request, num_frags=1)
|
||||
frag2.SC |= 1
|
||||
frag2.addr1 = "ff:ff:ff:ff:ff:ff"
|
||||
|
||||
# We can automatically detect result if the last fragment was
|
||||
# sent after the authentication
|
||||
if self.actions[-1].trigger >= Action.AfterAuth:
|
||||
self.check_fn = check_fn
|
||||
|
||||
# Practically all APs will not process frames with a broadcast receiver address, unless
|
||||
# they are operating in client mode. But to test APs without tcpdump anyway, allow the
|
||||
# ping to be send to a broadcast destination, so other STAs can monitor for it.
|
||||
@ -198,12 +203,17 @@ class EapolAmsduTest(Test):
|
||||
log(STATUS, "Generating ping test", color="green")
|
||||
|
||||
# Generate the single frame
|
||||
header, request, self.check_fn = generate_request(station, self.ptype)
|
||||
header, request, check_fn = generate_request(station, self.ptype)
|
||||
# Set the A-MSDU frame type flag in the QoS header
|
||||
header.Reserved = 1
|
||||
# Testing
|
||||
#header.addr2 = "00:11:22:33:44:55"
|
||||
|
||||
# We can automatically detect result if the last fragment was
|
||||
# sent after the authentication
|
||||
if self.actions[-1].trigger >= Action.AfterAuth:
|
||||
self.check_fn = check_fn
|
||||
|
||||
mac_src = station.mac
|
||||
mac_dst = station.get_peermac()
|
||||
if self.bcast_dst:
|
||||
|
Loading…
Reference in New Issue
Block a user