Showing posts with label WLAN Analysis with Wireshark. Show all posts
Showing posts with label WLAN Analysis with Wireshark. Show all posts

Monday, October 28, 2019

WLAN Analysis with Wireshark (802.11 Radio Information, Part 4)

Let's continue to cover additional details on 802.11 Radio Information within a Wireshark capture.

(Wireless) Channel: channels are frequently accessed using IEEE 802.11 protocols. Take 2.4 GHz as an example, there are fourteen channels being designated here.

2.4 GHZ channel allocation
Channel 1: 2,412 MHz; Channel 2: 2,417 MHz; Channel 3: 2,422 MHz;
Channel 4: 2,427 MHz; Channel 5: 2,432 MHz; Channel 6: 2,437 MHz;
Channel 7: 2,442 MHz; Channel 8: 2,447 MHz; Channel 9: 2,452 MHz;
Channel 10: 2,457 MHz; Channel 11: 2,462 MHz; Chann12: 2,467 MHz
Channel 13: 2,472 MHz; Channel 14: 2, 484 MHz

However, depending upon the regulation in each country, some of the channels may not be available,

Let's grab any available example to make such justifications. The following diagram shows frame is in channel 6, 2,437 MHz.


At the same time, the below example can view different frames populated in wireless channel, such as 1,3,4,5,6,11, and 13.


For any specific Wireshark capture, if we would like to see the number of STAs attempt to communicate with a specific wireless channel, we could take advantage of Channel display filter (wlan_radio.channel). For example, the underneath example is "wlan_radio.channel ==1", and we can see around 7 STAs over there, where most of the frames are in Beacon frames.


However, within a similar timeframe, channel 6 is also significantly utilized. As you may realize that  "Probe Response" occupies fair amount of proportion.


The 2.4GHz band is broken up into 11 channels (1-11), each 20MHz wide. That inevitably brought a concern of  overlapping channels. When overlapping channels are used (2-5, 7-10 in 2.4GHz), any stations (STAs) on those channels will transmit independent of what is happening on the other channels, causing a degradation of performance. The following images hot indicates the STAs use channel 2~5 to perform wireless communication.


As you can interpret from that diagram, the above data is sorted by Channel number. However, if we take source STA as the index, then, we should notice that some STAs are swifting wireless channel changes.


Auto Channel is a common management feature in some of the APs. By doing so, those AP would use less busy channels, in order to provide better services to wireless clients.

Quiz Review: The following diagram is a sorted result with the filter of "wlan_radio.channel >= 7 && wlan_radio.channel <= 10", how many identical STA(s) you are able to clarify?


Friday, October 25, 2019

WLAN Analysis with Wireshark (802.11 Radio Information, Part 3)

Let's continue to get exposure on other sub-fields within 802.11 Radio Information, where we can refer to the below diagram for illustration.


Data Rate: The wireless transmit rate is the speed that data is being transmitted from an AP to a wireless device.
The maximum data rate for 802.11a (5 GHz) is 54 Mbps, 802.11b (2.4 GHz) is 11 Mbps, 802.11g (2.4 GHz), 54 Mbps, and 802.11ac can be up to 1,300 Mbps.

The below diagram is a collection of frames, in 802.11a, where you can see the data rate being displayed include 6, 9, 24 Mbps.


Within the very same Wireshark capture file, we also are able to realize 802.11ac frames, where the date rate stays pretty much the same, 780 Mbps, in the underneath diagram.


Quiz Review:

  • For 802.11n connections, what is the maximum wireless transmit rate?
  • According to below diagram, the Data Rate is only 1 Mbps, but the Wireshark capture does not have "Phy type" subfield, what would be a possible and smart guess on "Phy type" being utilized?

WLAN Analysis with Wireshark (802.11 Radio Information, Part 2)

Let's continue our discussion on the section of 802.11 Radio Information inside a Wireshark capture. Allow me to attach a diagram here.


Turbo Type: Turbo mode increases throughput by utilizing a wider channel of 40MHz instead of the normal 20MHz. In this example, it shows Non-turbo being set up, which corresponds with other information, such as Static Turbo (display filter, radiotap.channel.flags.sturbo) and Turbo (radiotap.channel.flags.turbo) in the section of radiotap. We may also refer to the diagram listed below.


Turbo mode can be configured
  • Static mode, or
  • Dynamic mode
Despite the fact that channels 6, 40, 48, 56, 153 and 161 are suitable for Turbo operation, but it really depends upon whether AP or STA (1) is capable of having this feature, and (2) has activated such function. The following diagram shows, even in channel 40, that STA is not Turbo capable, as no information is displayed in Wireshark capture on such sub-field.


At the same time, the below diagram shows, WLAN packet in channel 157, not belonging to any one of the options indicated above. The turbo mode is not functioning either. 


Quiz Review:  If the "Static Turbo" subfield in above diagram is showing False, does that mean it is in Dynamic mode?

Tuesday, October 22, 2019

WLAN Analysis with Wireshark (802.11 Radio Information, Part 1)

We will continue our Wireshark wireless packet discussion, where this should be the first article talking about 802.11 Radio Information. The following diagram is an example of this 802.11 Radio Information session. As you can see, there are several sub-fields being covered here. The writer would like to take this opportunity to get more understandings on those sub-fields.


PHY type: describes type of PHY type being used on this network. The above packet indicates it is in 802.11a. Within IEEE 802.11 Standard, there are several types being defined:

  • IEEE 802.11a provides wireless 54Mbps data rate
    • Wireshark shows 5
  • IEEE 802.11b provides wireless 11Mbps data rate
  • IEEE 802.11g provides wireless 54Mbps data rate
    • Wireshark shows 6
  • IEEE 802.11n provides wireless 300Mbps data rate
    • Wireshark shows 7
  • IEEE 802.11ac (5-GHz) provides wireless 900Mbps data rate
    • Wireshark shows 8

The following two screenshot should present one example on 802.11n, 802.11g, another one, 802.11ac.



Of course, you should be aware that the Wireshark display filter for "PHY type" is wlan_radio.phy.

In a Wireshark packet capturing file, for the same STA (the same MAC), it usually is transmitted by using the same 802.11 PHY type. For example, the underneath diagram describes a STA (MAC ended with 36:84:C1) is using 802.11a.


VRRP MAC Address: VRRP stands for Virtual Router Redundancy Protocol. The virtual router MAC address is usually in the following format:

00-00-5E-00-01-{VRID} (in hex in internet standard bit-order)

The first three octets are related to IANA's OUI. When you look into the next two octets (00-01), that indicates the address block assigned to the VRRP protocol. {VRID} is the VRRP Virtual Router Identifier, where 11 is an example in our lab facility.


The following image-shot presents another example, with the same source STA (MAC ended with 38:ff:22) and destination STA (MAC ended with VRID_11). As you can see, frame 478 attempts to utilize 802.11ac, however, it turns to 802.11n, as it may attempt to lower the speed and turn to be malformed frame.


In the source and destination, you may see TA/RA mark over there. TA stands for Transmission Address, where RA, Recipient Address. The following diagram shows frame#18,082, MAC address ended with 38:ff:22 is the Transmission Address (or Transmitter address) and Received address is the STA (MAC ended with 0c:67:58). (This is a 802.11 Block Acknowledgement frame) However, the frame#18,083, the Received address remains the STA (MAC ended with 0c:67:58). (This is a Clear-To-Send frame).

Review Session: If the PHY shows 4, which 802.11 technology is presented?


Review Session: According to the following capture, 802.11b is used. Does that mean 802.11b being utilized by those STAs with D-Link name in the source address, or the laptop being managed to collect all of those frames?


Monday, October 21, 2019

WLAN Analysis with Wireshark (Radiotap Header Section, Part 5)

With all of the above 4 articles regarding the subject of Radiotap Header Section, the writer of this blog believes that "Channel Flags" should reserve a good space to explore concepts.

Channel Flags: displays the information about characteristics of the channel itself, such as the modulation type used, spectrum being used, half/quarter rate channel. The following diagram shows an example on Channel Flags.


Complementary code keying (CCK): is a modulation scheme used with wireless networks (WLANs) that employ the IEEE 802.11b specification. In our example as shown above, CCK is not being used. However, the below capture, CCK is in used.


Orthogonal Frequency Division Multiplexing (OFDM): is a digital multi-carrier modulation scheme that extends the concept of single subcarrier modulation by using multiple subcarriers within the same single channel. OFDM takes advantage of a large number of closely spaced orthogonal subcarriers that are transmitted in parallel.

This example also shows the WLAN capturing device (an Apple MacBook) is using 5 GHz spectrum. 5260, as precisely indicates in below image.


Even with the same laptop, we may be landing in different channel frequency. The following diagram, captured in the same day, different time-periods, of course, shows 5785 channel frequency being used. (Since they are in different channel, we will talk more on "channel" in incoming articles).

Gaussian frequency shift keying (GFSK) is also a modulation method for digital communication found in many standards such as Bluetooth. It (GFSK) filters the data pulses with a Gaussian filter to make the transitions smoother.

This article should pretty much serves the last item on Radiotap Header Section.

Hands-on participation:
  • Please take the time to reexamine your captured packet, what kind of messages being delivered in this section?
  • Please kindly borrow another laptop, from your associates, and obtain similar Wireshark packet collections. Please don’t assume what worked for you in the first file will make same-items deliveries in the second file.

Friday, October 18, 2019

WLAN Analysis with Wireshark (Radiotap Header Section, Part 4)

Let's continue our discussion on Radiotap Header Section.

Present Flags Words: this is like a summary information regarding any particular information is presented or not. The underneath diagram is an example regarding this field. Since TSFT and Flags sub-fields are explained in another article, we will continue with other items, especially the ones which are shown "Present"


All of the "Present" items are shown here.


Rate (or Data Rate): deals with TX/RX data rate. According to above diagram, we have 6.0 Mb/s. MCS rates (used on 802.11n/HT channels) have the high bit set and the (Modulation and Coding Scheme) MCS in the low 7 bits.
The Wireshark display filter of Data rate (Mb/s) is "radiotap.datarate" where we are able to see 9 or 24 Mb/s in other frames, from the same capture file.


Channel: describes Tx/Rx frequency in MHz. We have 5260 (5 GHz spectrum channel) here.
The Wirehark display filter of Channel frequency is radiotap.channel.freq, where we have seen a fixed 5260 in this capture file.


Antenna Signal: RF signal power at the antenna. The RF signal power at the antenna is described in decibels difference from 1mW. The following diagram shows different Antenna signal being collected from this capture file, in a range of 29dBm ~ 82 dBm.


Question: Out of the same data rate, 6 Mb/s, as an example, are you expecting the same Antenna signal from the following diagram?


Antenna Noise: refers to RF noise power at the antenna. The Antenna noise should remain the same, despite the constant changes on Antenna signal. The below diagram should justify this statement.


Antenna: Contains a single unsigned 8-bit value to declare which antenna was used to transmit or receive the frame. The primary antenna has the lowest number, 1, as stated in our example.
The value of zero may be seen here, it means means antenna selection is left to the device. The writer used "radiotap.antenna" display filter to generate below diagram.


Thursday, October 17, 2019

                            WLAN Analysis with Wireshark (Radiotap Header Section, Part 3)

Let's continue the topic of Radiotap Header Section on the sub-item: Flags.

Flags: describing the properties of transmitted and received frames. The following diagram shows an example of Flags:


As you can see, there are several sub-items, including

Contention Free Period (CFP): Indicates whether frame was sent/received during the Contention Free Period. It (CFP) defines a period of time during which access to the Wireless Medium is free of contention.

Preamble: Shows whether frame was sent/received with short preamble. Preamble Type setting means that it adds some additional data header strings to help check the wifi data transmission errors. When it is set to short, shorter data strings would be added, resulting faster speed. However, some of the STA in your network might set Preamble to "Long", as displayed in underneath diagram.


WEP: informs whether a frame was encrypted. Despite the fact that the above diagram shows "False" in that captured frame, the below screenshot describes an AP (MAC ended with 97:78:6c) frame is encrypted.


When you take a closer look, you would identify that QoS / Data Frame are encrypted.


Question: In your Wireshark capture, in "Beacon Frame" "Probe Request" "Probe Response" frames, are they encrypted or not?

Fragmentation: is a way to partitioning an MAC Service Data Unit (MSDU) or an MAC Management Protocol Data Unit (MMPDU) into smaller MAC level frames, MPDUs,

Frame Check Sequence (FCS): A FCS refers to an error-detecting code added to a frame in a communications protocol. As you can not, not only the specific frame shown in the top diagram, the below screen shots tells that most of the frame here with FCS.


Data Pad: Frame contents has padding between the 802.11 header and the data payload to align the payload to a 32-bit boundary.

Bad FCS: Frame was received with an invalid FCS.

Short GI: Frame was sent/received with Short Guard Interval. The guard interval is the space between symbols (characters) being transmitted. It is used to eliminate inter-symbol interference, and increases throughput.
However, according to the below diagram, this AP, even the short GI is not set, is hardware capable with such features.


Wednesday, October 16, 2019

WLAN Analysis with Wireshark (Radiotap Header Section, Part 2)

Time Synchronization Function Timer (TSFT): is utilized to fulfill timing synchronization among (wireless) users.

The TSFT sub-field under the Present flags (of Radiotap Header Section) indicates its capability to show this information.The right-hand side diagram indicates this frame (7) is able to deliver that data.


The Wireshark MAC timestamp display filter is "radiotap.mactime" it is is a sequence number where the latter frame is embedded with higher TSFT. In 802.11 standard, Independent Basic Service Set (IBSS) defines a distributed Timing synchronization function (TSF). What that means, any two stations in an IBSS network are physically located in the signal reachable area, from the other station’s point of view.
A TSF keeps the timers for all stations in the same basic service set (BSS) synchronized. All stations shall maintain a local TSF timer. The diagram in below indicates, each station has a counter which will be used for two stations to exchange timing information on BSS ID (06:20:17:11:22:52).


The right-hand side diagram, with the filter of "wlan.bssid == 40:9b:cd:0c:67:58" could present more information. As you can see several STA are in the range of "40:9b:cd:0c:67:58," including MAC address ended with 38:ff:22; 97:78:6c; 00:01:11. 

The type of counting is in increments of microseconds.

Frame 39182 & 39183, with below diagram, show the same MAC timestamp. It turns our 39183 is a malformed fame where the radiotap data goes past the end of the radiotap header.



Tuesday, October 15, 2019

WLAN Analysis with Wireshark (Radiotap Header Section, Part 1)

The radiotap header format is a mechanism to supply additional information about frames. A generic radiotap header format should look very similar like the following diagram:

Header Length: The header length, for the same STA MAC may not remain the same, depending upon the destination, as well as the type of 802.11 frames being transmitted. Take the following diagram as an example, frame 1000/1001 are heading to the same destination / same type QoS wireless frame, but, one has header length 44, another one 52.

The item with header length 44 carries the following sub-fields:


On the other hand, header length 52 is embedded with below sub-fields.


If taking a close look, you would realize that frame 1000 has additional sub-fields: VHT information: