This patch adds support for frame injection on 802.11n Wi-Fi cards. The patch has been tested with kernel 4.4 (the current stable OpenWRT kernel) and it should work with any recent kernel.
The patch requires support for frame injection by the specific Wi-Fi driver you are using and has been tested extensively only with the ath9k. The patch will not work for VHT rates (11ac) and in general with the ath10k driver.
The radiotap parsing code is from the upstream radiotap project.
A new SetTXRateHT element has been added to allow frame injection at arbitrary MCS (0-15).
The RadiotapEncap/Decap element now supports retry chains, however, the corresponding kernel patch has not yet been merged into upstream. All chains following the first one are thus ignored. If you need the kernel patch adding support for longer retry chains please message me.
This patch adds support for frame injection on 802.11n Wi-Fi cards. The patch has been tested with kernel 4.4 (the current stable OpenWRT kernel) and it should work with any recent kernel.
The patch requires support for frame injection by the specific Wi-Fi driver you are using and has been tested extensively only with the ath9k. The patch will not work for VHT rates (11ac) and in general with the ath10k driver.
The radiotap parsing code is from the upstream radiotap project.
A new SetTXRateHT element has been added to allow frame injection at arbitrary MCS (0-15).
The RadiotapEncap/Decap element now supports retry chains, however, the corresponding kernel patch has not yet been merged into upstream. All chains following the first one are thus ignored. If you need the kernel patch adding support for longer retry chains please message me.
Sample script for frame injection:
RatedSource(<9999>, RATE 1, LIMIT 100) -> EtherEncap(0x06BB, 00:15:6D:84:13:5D, FF:FF:FF:FF:FF:FF) -> WifiEncap(0x00, 0:0:0:0:0:0) -> SetTXRateHT(MCS 0, TRIES 1) -> RadiotapEncap() -> Print() -> ToDevice (moni0)
This assumes that moni0 is in monitor mode on a supported driver.
Sample script for rx:
FromDevice(moni0, PROMISC false, OUTBOUND true, SNIFFER false) ->RadiotapDecap() ->FilterPhyErr() ->WifiDupeFilter() ->ToDump(/tmp/tmp.pcap, ENCAP 802_11, SNAPLEN 0)