radiotap.netbsd.org archive mirror
 help / color / mirror / Atom feed
* Proposal: Add a new flag to the proposed TX flags field to control the sequence number of injected packets
@ 2009-02-09 18:56 Gábor Stefanik
       [not found] ` <69e28c910902091056h119b3fa4g460e5e18288c1c3c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Gábor Stefanik @ 2009-02-09 18:56 UTC (permalink / raw)
  To: radiotap-sUITvd46vNxg9hUCZPvPmw, Johannes Berg,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

Currently the TX Flags field is defined as a bitmap containing:
0x0001 Transmission failed due to excessive retries
0x0002 Transmission used CTS-to-self protection
0x0004 Transmission used RTS/CTS handshake
0x0008 Transmission shall not expect an ACK frame and not retry when
no ACK is received

I'd like to propose the following additional bit:
0x0010 Transmission has the sequence and fragment numbers pre-set from
userspace and should not be renumbered

This bit is useful for packet injection, where userspace injectors
might want to control the sequence and fragment numbers of the packets
it injects. A particular example is aireplay-ng's -5 mode
(fragmentation attack), where userspace injects pre-made fragments
one-by-one. The wireless stack usually can't recognize that the
injected packets are fragments, and instead treats them as complete
packets, assigning a new sequence number to each fragment, preventing
the receiving party from correctly reassembling the fragmented packet.
The userspace does however know that the packets being injected are
fragments, and such can produce much more correct sequence numbers for
them. So, userspace can in these cases set TX_FLAGS |=3D 0x0010 and put
pre-generated sequence numbers on the packets it injects.

Similar to how 0x0008 works, this bit also should be used when packets
are being sent, as opposed to when they are being reported as having
been sent (like the first 3 bits).

I have posted a reference implementation on the linux-wireless mailing
list about a month ago, and it is also available here:
http://trac.aircrack-ng.org/svn/trunk/patches/mac80211_2.6.28-rc8-wl_frag+a=
ck_radiotap.patch
(Note that this patch may not clearly apply to 2.6.29-rc2 or the
current wireless-testing kernel, as it was made against the
master-2008-12-17 tag of wireless-testing.)

Gábor

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Proposal: Add a new flag to the proposed TX flags field to control the sequence number of injected packets
       [not found] ` <69e28c910902091056h119b3fa4g460e5e18288c1c3c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-02-09 18:57   ` Gábor Stefanik
  2009-03-13 15:02   ` [Resend] " Gábor Stefanik
  1 sibling, 0 replies; 3+ messages in thread
From: Gábor Stefanik @ 2009-02-09 18:57 UTC (permalink / raw)
  To: radiotap-sUITvd46vNxg9hUCZPvPmw, Johannes Berg,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

On Mon, Feb 9, 2009 at 7:56 PM, Gábor Stefanik <netrolller.3d@gmail.com> wrote:
> them. So, userspace can in these cases set TX_FLAGS |=3D 0x0010 and put
Sorry for the typo - this was meant to be "TX_FLAGS |= 0x0010".

Gábor
-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Resend] Proposal: Add a new flag to the proposed TX flags field to control the sequence number of injected packets
       [not found] ` <69e28c910902091056h119b3fa4g460e5e18288c1c3c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2009-02-09 18:57   ` Gábor Stefanik
@ 2009-03-13 15:02   ` Gábor Stefanik
  1 sibling, 0 replies; 3+ messages in thread
From: Gábor Stefanik @ 2009-03-13 15:02 UTC (permalink / raw)
  To: radiotap-sUITvd46vNxg9hUCZPvPmw, Johannes Berg,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

Currently the TX Flags field is defined as a bitmap containing:
0x0001 Transmission failed due to excessive retries
0x0002 Transmission used CTS-to-self protection
0x0004 Transmission used RTS/CTS handshake
0x0008 Transmission shall not expect an ACK frame and not retry when
no ACK is received

I'd like to propose the following additional bit:
0x0010 Transmission has the sequence and fragment numbers pre-set from
userspace and should not be renumbered

This bit is useful for packet injection, where userspace injectors
might want to control the sequence and fragment numbers of the packets
it injects. A particular example is aireplay-ng's -5 mode
(fragmentation attack), where userspace injects pre-made fragments
one-by-one. The wireless stack usually can't recognize that the
injected packets are fragments, and instead treats them as complete
packets, assigning a new sequence number to each fragment, preventing
the receiving party from correctly reassembling the fragmented packet.
The userspace does however know that the packets being injected are
fragments, and such can produce much more correct sequence numbers for
them. So, userspace can in these cases set TX_FLAGS |=3D 0x0010 and put
pre-generated sequence numbers on the packets it injects.

Similar to how 0x0008 works, this bit also should be used when packets
are being sent, as opposed to when they are being reported as having
been sent (like the first 3 bits).

I have posted a reference implementation on the linux-wireless mailing
list about a month ago, and it is also available here:
http://trac.aircrack-ng.org/svn/trunk/patches/mac80211_2.6.28-rc8-wl_frag+a=
ck_radiotap.patch
(Note that this patch may not clearly apply to 2.6.29-rc2 or the
current wireless-testing kernel, as it was made against the
master-2008-12-17 tag of wireless-testing.)

Gábor

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-13 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-09 18:56 Proposal: Add a new flag to the proposed TX flags field to control the sequence number of injected packets Gábor Stefanik
     [not found] ` <69e28c910902091056h119b3fa4g460e5e18288c1c3c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-09 18:57   ` Gábor Stefanik
2009-03-13 15:02   ` [Resend] " Gábor Stefanik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).