Important note on WLAN sniffing and injection
WLANs typically operate within three different frequency ranges—2.4 GHz, 3.6 GHz, and 4.9/5.0 GHz. Not all Wi-Fi cards support all these ranges and associated bands. As an example, the Alfa card, which we are using, only supports IEEE 802.11b/g. This would mean this card cannot operate in 802.11a/n. The key point here is that to sniff or inject packets in a particular band, your Wi-Fi card will need to support it.
Another interesting aspect of Wi-Fi is that in each of these bands, there are multiple channels. It is important to note that your Wi-Fi card can only be on one channel at any given moment. It is not possible to tune into multiple channels at the same time. The analogy I can give you is your car radio. You can tune it to only one of the available channels at any given time. If you want to hear something else, you will have to change the channel of the radio. The same principle applies to WLAN sniffing. This brings us to an important conclusion—we cannot sniff all channels at the same time, we will need to select which channel is of interest to us. What this means is, that if our access point of interest is on channel 1, we will need to set our card on channel 1.
Though we have addressed WLAN sniffing in the previous paragraphs, the same applies to injection as well. To inject packets on a specific channel, we will need to put the card radio on that channel.
Let's now do some exercises on setting our card to specific channels, channel hopping, setting regulatory domains, power levels, and so on.