Skip to contentSkip to conversation

Please don't puke: Modifying Frame Version, Beacon and Probe-Response values

DISCUSSION jpo 4 participants 9 messages May 31, 2016 – Jun 1, 2016 1 message not in the archive Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore

jpo

author
#0 lore raw

Hello all,
to implement a "Stealth feature", e.g. the WLAN network does not show up in normal Scans, we modified the Frame version, Beacon and Probe-Response values for an old ATH5K card running on the now dormant Madwifi driver.
Question: Is the same thing even POSSIBLE with ath10k? My main concern is, that the firmware just won't handle non-standard values.

Can somebody who understands the division of labor between mac80211, ath10k, the firmware and the hardware suppress his or her gag reflex long enough to think about this?

Thanks in advance
Joerg

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

#1 lore raw
Quoted 10 lines · jpo

Hello all,
to implement a "Stealth feature", e.g. the WLAN network does not show up in normal Scans, we modified the Frame version, Beacon and Probe-Response values for an old ATH5K card running on the now dormant Madwifi driver.
Question: Is the same thing even POSSIBLE with ath10k? My main concern is, that the firmware just won't handle non-standard values.

Can somebody who understands the division of labor between mac80211, ath10k, the firmware and the hardware suppress his or her gag reflex long enough to think about this?

First and foremost you'll need to use firmware with "raw-mode" support
- otherwise firmware just craps over frame headers. Some 10.2.4 support it - you can look into the mailing list archive for some discussions.

Not sure if Rx will work though as firmware-controlled Rx filters may prevent you from receiving frames with crazy frame_control values. You'll need to check this out yourself. Some firmware revisions might have RX_FILTER wmi command support but this isn't used/documented anywhere and it's questionable how much it allows you to override.

Whatever you find it'd be nice if you post whatever you find out (for posterity :)

Michał

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

#2 lore raw

Hi,

The other thing to keep in mind is the hardware assist for things like TIM parsing, wakeup, etc will likely not work. :)

-a

Quoted 27 lines · Michal Kazior
Quoted 10 lines · jpo

Hello all,
to implement a "Stealth feature", e.g. the WLAN network does not show up in normal Scans, we modified the Frame version, Beacon and Probe-Response values for an old ATH5K card running on the now dormant Madwifi driver.
Question: Is the same thing even POSSIBLE with ath10k? My main concern is, that the firmware just won't handle non-standard values.

Can somebody who understands the division of labor between mac80211, ath10k, the firmware and the hardware suppress his or her gag reflex long enough to think about this?

First and foremost you'll need to use firmware with "raw-mode" support
- otherwise firmware just craps over frame headers. Some 10.2.4 support it - you can look into the mailing list archive for some discussions.

Not sure if Rx will work though as firmware-controlled Rx filters may prevent you from receiving frames with crazy frame_control values. You'll need to check this out yourself. Some firmware revisions might have RX_FILTER wmi command support but this isn't used/documented anywhere and it's questionable how much it allows you to override.

Whatever you find it'd be nice if you post whatever you find out (for posterity :)

Quoted 6 lines

Michał

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

#3 lore raw

Hi Adrian,
does "hardware assist...will likely not work" mean "forget it, won't work" or "so it would have to be implemented in software instead"?

-- Regards Joerg

Quoted 23 lines

Adrian Chadd <[email protected]> schrieb am 17:53 Dienstag, 31.Mai 2016:

Quoted 1 line

Hi,

The other thing to keep in mind is the hardware assist for things like TIM parsing, wakeup, etc will likely not work. :)

-a

Quoted 3 lines · Michal Kazior
Quoted 2 lines · jpo

Hello all,
to implement a "Stealth feature", e.g. the WLAN network does

not show up in

Quoted 3 lines
Quoted 3 lines

normal Scans, we modified the Frame version, Beacon and Probe-Response values for an old ATH5K card running on the now dormant Madwifi driver.
Question: Is the same thing even POSSIBLE with ath10k? My main concern

is,

Quoted 2 lines
Quoted 2 lines

that the firmware just won't handle non-standard values.

Quoted 29 lines
Quoted 1 line
Quoted 1 line

Can somebody who understands the division of labor between mac80211,

ath10k,

Quoted 1 line
Quoted 1 line

the firmware and the hardware suppress his or her gag reflex long

enough to

Quoted 3 lines
Quoted 1 line

think about this?

First and foremost you'll need to use firmware with

"raw-mode" support

Quoted 20 lines

- otherwise firmware just craps over frame headers. Some 10.2.4 support it - you can look into the mailing list archive for some discussions.

Not sure if Rx will work though as firmware-controlled Rx filters may prevent you from receiving frames with crazy frame_control values. You'll need to check this out yourself. Some firmware revisions might have RX_FILTER wmi command support but this isn't used/documented anywhere and it's questionable how much it allows you to override.

Whatever you find it'd be nice if you post whatever you find out (for posterity :)

Michał

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

#4 lore raw

Hi,

Likely a mix of both. Eg, the RX filter stuff as mentioned above may mean that you need to listen to /all/ frames for a BSS, rather than just say data and beacon frames. If the beacon frame matching logic checks the frame version, you need to listen to /all/ of the frames.

For power management things, it's likely none of that will work, so you can't use things like auto-sleep based on beacon traffic / timers / TIM bitmap - you'd have to keep the NIC awake all the time.

-adrian

Quoted 5 lines · Joerg Pommnitz

Hi Adrian,
does "hardware assist...will likely not work" mean "forget it, won't work" or "so it would have to be implemented in software instead"?

Quoted 56 lines

-- Regards Joerg

Quoted 52 lines

Adrian Chadd <[email protected]> schrieb am 17:53 Dienstag, 31.Mai 2016:

Quoted 1 line

Hi,

The other thing to keep in mind is the hardware assist for things like TIM parsing, wakeup, etc will likely not work. :)

-a

Quoted 3 lines · Michal Kazior
Quoted 2 lines · jpo

Hello all,
to implement a "Stealth feature", e.g. the WLAN network does

not show up in

Quoted 3 lines
Quoted 3 lines

normal Scans, we modified the Frame version, Beacon and Probe-Response values for an old ATH5K card running on the now dormant Madwifi driver.
Question: Is the same thing even POSSIBLE with ath10k? My main concern

is,

Quoted 3 lines
Quoted 3 lines

that the firmware just won't handle non-standard values.

Can somebody who understands the division of labor between mac80211,

ath10k,

Quoted 1 line
Quoted 1 line

the firmware and the hardware suppress his or her gag reflex long

enough to

Quoted 3 lines
Quoted 1 line

think about this?

First and foremost you'll need to use firmware with

"raw-mode" support

Quoted 20 lines

- otherwise firmware just craps over frame headers. Some 10.2.4 support it - you can look into the mailing list archive for some discussions.

Not sure if Rx will work though as firmware-controlled Rx filters may prevent you from receiving frames with crazy frame_control values. You'll need to check this out yourself. Some firmware revisions might have RX_FILTER wmi command support but this isn't used/documented anywhere and it's questionable how much it allows you to override.

Whatever you find it'd be nice if you post whatever you find out (for posterity :)

Michał

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

#5 lore raw
Quoted 10 lines · Adrian Chadd

Hi,

Likely a mix of both. Eg, the RX filter stuff as mentioned above may mean that you need to listen to /all/ frames for a BSS, rather than just say data and beacon frames. If the beacon frame matching logic checks the frame version, you need to listen to /all/ of the frames.

For power management things, it's likely none of that will work, so you can't use things like auto-sleep based on beacon traffic / timers / TIM bitmap - you'd have to keep the NIC awake all the time.

I'm guessing little of this is in hardware, aside from rx filters, so probably a few tweaks to the firmware would handle much of this...

And, if for AP mode, then the NIC is always awake anyway, right?

Thanks,
Ben

Quoted 74 lines

-adrian

Quoted 5 lines · Joerg Pommnitz

Hi Adrian,
does "hardware assist...will likely not work" mean "forget it, won't work" or "so it would have to be implemented in software instead"?

Quoted 56 lines

-- Regards Joerg

Quoted 52 lines

Adrian Chadd <[email protected]> schrieb am 17:53 Dienstag, 31.Mai 2016:

Quoted 1 line

Hi,

The other thing to keep in mind is the hardware assist for things like TIM parsing, wakeup, etc will likely not work. :)

-a

Quoted 3 lines · Michal Kazior
Quoted 2 lines · jpo

Hello all,
to implement a "Stealth feature", e.g. the WLAN network does

not show up in

Quoted 3 lines
Quoted 3 lines

normal Scans, we modified the Frame version, Beacon and Probe-Response values for an old ATH5K card running on the now dormant Madwifi driver.
Question: Is the same thing even POSSIBLE with ath10k? My main concern

is,

Quoted 3 lines
Quoted 3 lines

that the firmware just won't handle non-standard values.

Can somebody who understands the division of labor between mac80211,

ath10k,

Quoted 1 line
Quoted 1 line

the firmware and the hardware suppress his or her gag reflex long

enough to

Quoted 3 lines
Quoted 1 line

think about this?

First and foremost you'll need to use firmware with

"raw-mode" support

Quoted 20 lines

- otherwise firmware just craps over frame headers. Some 10.2.4 support it - you can look into the mailing list archive for some discussions.

Not sure if Rx will work though as firmware-controlled Rx filters may prevent you from receiving frames with crazy frame_control values. You'll need to check this out yourself. Some firmware revisions might have RX_FILTER wmi command support but this isn't used/documented anywhere and it's questionable how much it allows you to override.

Whatever you find it'd be nice if you post whatever you find out (for posterity :)

Michał

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

Signature · 8 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#6 lore raw
Quoted 9 lines · Ben Greear
Quoted 8 lines · Adrian Chadd

Hi,

Likely a mix of both. Eg, the RX filter stuff as mentioned above may mean that you need to listen to /all/ frames for a BSS, rather than just say data and beacon frames. If the beacon frame matching logic checks the frame version, you need to listen to /all/ of the frames.

Quoted 7 lines
Quoted 3 lines

For power management things, it's likely none of that will work, so you can't use things like auto-sleep based on beacon traffic / timers / TIM bitmap - you'd have to keep the NIC awake all the time.

I'm guessing little of this is in hardware, aside from rx filters, so probably a few tweaks to the firmware would handle much of this...

Right.

Quoted 1 line

And, if for AP mode, then the NIC is always awake anyway, right?

Right. But say, P2P/STA mode and no AP mode? Different story. (I'm assuming he has clients AND APs..)

Also, for ath10k chips, maybe it'll all need to be in raw mode? I don't know what the hardware encap/decap engines will do if you try passing it intentionally different frames like this.

-adrian

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

A message that is not in the archive (sent off-list or not yet received): CAEvAWuHgna4cdgkhQrQY4xo4XyaCAhkkf1zo8iDA_Gqgjc1Jeg@mail.gmail.com

#8 lore raw
Quoted 1 line · Jörg Pommnitz

This is about IBSS mode. The nodes form an ad-hoc backbone. Clients use normal, standard conforming APs.

So, about IBSS. Only ancient QCA firmware and 'CT' firmware supports IBSS as far as I know.

I was never able to get RSN to work with IBSS reliably in CT firmware, so it would have to be un-encrypted traffic. And, AMSDU + IBSS has hardware bugs, evidently, so firmware will disable AMSDU for you.

That said, adding a few more hacks for fake beacon ids might not make it any worse :)

Thanks,
Ben

Signature · 8 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k
#9 lore raw
In reply to Adrian Chadd
Quoted 18 lines · Adrian Chadd
Quoted 9 lines · Ben Greear
Quoted 8 lines · Adrian Chadd

Hi,

Likely a mix of both. Eg, the RX filter stuff as mentioned above may mean that you need to listen to /all/ frames for a BSS, rather than just say data and beacon frames. If the beacon frame matching logic checks the frame version, you need to listen to /all/ of the frames.

Quoted 7 lines
Quoted 3 lines

For power management things, it's likely none of that will work, so you can't use things like auto-sleep based on beacon traffic / timers / TIM bitmap - you'd have to keep the NIC awake all the time.

I'm guessing little of this is in hardware, aside from rx filters, so probably a few tweaks to the firmware would handle much of this...

Quoted 6 lines

Right.

Quoted 1 line

And, if for AP mode, then the NIC is always awake anyway, right?

Right. But say, P2P/STA mode and no AP mode? Different story. (I'm assuming he has clients AND APs..)

Yeah, I'm less sure about that. I still bet a few firmware tweaks would resolve issues...surely the hardware is not baking a lot of wifi frame constants into it's ROM...

Quoted 3 lines

Also, for ath10k chips, maybe it'll all need to be in raw mode? I don't know what the hardware encap/decap engines will do if you try passing it intentionally different frames like this.

Beacons and probe responses are not encrypted anyway, so probably doesn't need to disable hw-crypt. Might be a fairly long tail of effort to find every last place that makes some assumption on the values though...

Thanks,
Ben

Signature · 8 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k