It's that time, a new episode about WiFi! Our main topic is Troubleshooting WiFi with Wireshark.
I saw this get shared on Twitter which is an article from The Guardian. Apparently, AirBnb WiFi is a security threat for travelers. This shouldn't be a surprise to anyone but it is possible that the owner could be spying on your traffic, collecting information on you or even stealing your passwords. The best thing to do is not use the WiFi. I know, hard to do. From another perspective, a maliciuos hacker could break into your access point and install a backdoor and have his/her way with your WiFi. Now that's a scarier thought.
I noticed Keith Parsons shared an interesting photo on social media. He displayed what he carries every day as part of his WLAN Professional toolkit. My toolkit is a lot lighter than that only because I hate carrying a lot of gear. Here's a look into my toolkit:
- Ekahau adapters
- Metageek dBx adapter
- Google Pixel C tablet
- Omnipeek adapters
- USB extender with Hub Holster
- Airconsole
- Netool
- Macbook Pro
For software I use:
What’s in your toolkit? Leave a comment below. I’m very curious what other professionals carry.
A WiFi Question from Lee Badman caught my attention, #WIFIQ 8/10/16 Have you ever had to deal with someone spoofing/copying your residential or business SSID? Circumstances, course of action?
On campus I know I’d find that rogue access point and shut it down after finding it.
But if it’s a neighboring tenant, what options do you have? The only thing I can think of is to simply ask them to change their SSID.
Troubleshooting WiFi with Wireshark
Download this sample pcap file to follow along.
My primary computer is a Macbook Pro. You can perform the same troubleshooting steps on a PC.
First step is to download the application at wireshark.org.
Before capturing wireless frames, there are a few things to take note. If you’re using a Macbook Pro/Air then you should be okay capturing frames using your built-in wireless adapter. I highly recommend using Airtool to assist in capturing frames on specific channels and channel widths. Airtool will conveniently save that capture for you on your desktop and open it right up in Wireshark.
If you’re using a PC, capturing wireless frames may not be that easy. Normally, the wireless adapter in Windows doesn’t allow you to capture frames in promiscuous mode. You’ll want to capture all the wireless frame details. Those frames I am referring to, not just the data frames, but also the frames used for management and control of the wireless medium.
On a Windows PC I have used the AirPcap adapter from Riverbed.
Once you’ve captured enough wireless frames, go ahead and stop it. Now we should be looking at Wireshark. The window is divided into three sections:
- List of frames captured at the top pane
- Middle pane shows the details of the frame selected at the top pane
- Bottom pane shows the frame bytes of the selected frame.
We can see details such as the source mac address, destination mac address, and the details of the frame.
On the Info column, you can see what kind of frame is captured. For example, the first frame is a probe request from a device. What’s awesome about diving into wireless frames is being able to see so many details. Expand the Radiotap Header and we can see what data rate this frame was sent out on, which frequency, the signal, etc.
Expand IEEE 802.11 Probe Request and we can identify what kind of frame this is. It’s a Management frame with a subtype of 4 which is a Probe Request.
Now the meat of this specific frame is where you will expand IEEE 802.11 wireless LAN management frame. Here we will find the details of this probe request from the client device. It is probing for a specific SSID called test and has included all of the client’s capabilities.
We’re already seeing how powerful it is to analyze wireless frames when troubleshooting client devices.
So that’s looking at wireless frames. Let’s add more functionality to Wireshark. We can add columns to the frame list pane in order to see more details.
A few columns I like to have visible are:
- Duration
- Channel
- Data rate
- MCS Index
To add a column, right click on an existing column and select Column Preferences. Click on the Plus icon to add a new column. So for example, to add a Duration column, give the title of this column Duration, change the type to Custom and the in the field Name we will use what’s called a filter. For duration it is wlan.duration.
Display filters are your best friend. Display filters are used to find specific types of frames or packets. For example, if I wanted to see frames from a specific source MAC address, I would type in wlan.addr == mac_address in the display filter bar.
It is possible to filter from almost any type of frame.
Typically when capturing wireless frames, I capture everything without any filters. In Wireshark, it is possible to apply a capture filter. I don’t like this approach because you may miss a frame that may be required for troubleshooting. Instead, I capture everything and filter down from that capture. Sure it takes up a lot of hard disk space but that’s the life of a protocol analyzer. I know, I need a hobby.
But if you really want to conserve on space, Airtool has an option to not save layer 3-7 payloads. A neat little feature.
Download a PDF of display filters to use here.
So how is this useful? Let’s say an client is unable to join the wireless network and all you are able to do is perform wireless captures. So if it were me and this was my only option, I’d go to where the client is having issues. Assuming the client drivers are good and the SSID can be seen by the client and the only issue is it never connects to the SSID, we need to find out what channel to start capturing on.
We could use another useful tool such as WiFi Explorer, same author of Airtool, to find out what the strongest signal is on what channel. That’s where I would start capturing wireless frames, then while capturing frames, have the client try to connect. After the process fails, I would stop the capture.
Assuming we captured on the correct channel, we should be able to see the probe request coming from the MAC address of the client which you can obtain from the computer itself. After looking at the capture we should be able to see the 802.11 State Machine. If we don’t see successful authentication and association then that’s when we need to look closely at the capture. Maybe it’s because the client doesn’t support the requirements of the BSS such as a mandatory rate the client doesn’t support.
If you’re more of a visual person, Wireshark does have the capability to display the capture in a graph. What if we wanted to see how many retransmissions are occurring. In Wireshark, navigate to the Statistics menu and select I/O Graph. In the graph window, we will add a new data point by clicking on the plus icon. Rename it to Retries. The display filter to show retries is “wlan.fc.retry == 1”. Since this is bad we will color it as red. Next we modify the Y Axis to display Packets per second and also display All Packets so we can compare retries to all packets captured. That graph shows you the amount of retry frames compared to all frames captured.
There we have some basic Wireshark troubleshooting. That should be enough to get you going and it will take some practice. We went over installing Wireshark and how to capture wireless frames. Then we went over the different panes within Wireshark and how to add additional columns for easier viewing of frames. Next I went over how I use Wireshark to capture frames and troubleshoot an example issue. Also I provided two tool that will assist you in capturing frames, Airtool and WiFi Explorer.
In the news we talked about how insecure it is to use WiFi at an AirBnb. I know I wouldn’t.. The list of tools Keith Parsons has in his bag which is quite impressive. What’s in your bag? and a discussion of how to deal with someone spoofing your SSID.
This was, by far, my favorite episode so far that didn’t include an interview. Wireshark is super intimidating without a little guidance and you’ve helped me to relax and approach the tool differently. Thanks, Rowell.
Thanks Anthony! Is there anything specific within Wireshark you want me to cover? Or are there any other technical topics you want me to go over in the podcast?
Nice episode. Very useful information, this helped me a lot to start with my own wireshark captures right away. In my case, I’m using a PC with Windows 8.1 and Acrylic Wi-Fi Pro software, it allows me to put my old usb adapter TL-WN722N in monitor mode and capture 2.4GHz band… now I need to get a new usb device with dual band capabilities and 802.11ac support… any suggestion?
Thanks Rowell!
Hi Maximo,
You could try using the Netgear AC1200 – http://amzn.to/2cOshtx
Hi Rowell,
Can you tell me how to look at packets captured from a chromebook environment where a class is either temporarily disconnected, delayed, or stuck in a processing screen when they try to access a graphics-intensive test online? What should I looking for in my packet capture to find the source of this problem. Any help would greatly be appreciate! Thanks in advance for your time!
How many devices are connecting? Did you gather any info from the controller or AP?
This is in a elementary classroom environment. According to the network guy that takes care of the network, he didn’t see anything out of the ordinary. They have an Aruba AP in each classroom with about 20 students connected. About 3 different schools were testing that day. Fifth graders did tests that did not have graphics and were fine, but third graders had problems with sluggishness or got stuck while doing graphics-intensive tests. They eventually get through it after waiting a while or rebooting again and again. The network guy said the controller looked fine. However, they did another test and ran wireshark where they saw jitter on the firewall.
Anything of interest when looking at duration? Any disassociations occurring?
Good information you’ve provided within the article. A person will discover similar info at a site such as http://www.fixyoursearchresults.com. That type of site will be of use for people who wants to fix their reputation online.
How trouble shooting performance issues in WiFi (WLAN) technologies?
What are the parameters need to check in Packet captures?
Could you please share details
Which part in the post above are you having issues?
Thanks Rowell.
I am troubleshooting issues between an internet radio device and an access point. I am using a macbook air to capture the packets. I have two access points, one that works with the internet radio and another that does not.
For the purposes of troubleshooting, I setup the APs to not require any encryption on the SSID. So when capturing packets I’d expect to see everything and on the clear. So far on both APs I can see the following on the capture: the scanning probe, the authentication, the attach request, attach response, the DHCP requests, the RTS and the CTS packets… However, I am not seeing the actual data packets (HTTP GET, etc…) being sent by the client towards a test web server on the network. I do see a few of the HTTP responses coming back from the internet server but not all. This behavior is identical on either AP.
Do you know why wireshark is not capturing the data packets? Is there a way to capture it all?
It’s possible that you’re missing some of the packets.