Collecting a Device’s Preferred Network List (PNL)
Generally, a device’s probe request will only contain a ‘Wildcard’ SSID meaning that the device is just looking to insight a response from any AP. This ‘Wildcard’ SSID isn’t incredibly useful as data. It’s only sometimes an actual SSID is sent with a probe, which is great information as one can build a potential profile of where said device has been in the past by doing an SSID look up on services such as Wigle.net.
But what if we were able to encourage the device to reveal information about said PNL? One possible method of attack is to implement some sort of dictionary attack where we emitted fake beacon frames or probe responses with fake SSIDs, inciting unconnected devices that have said SSID saved in their PNL to try and send authentication, or association requests to attempt to seek connection. Then, one can read the authentication, or association requests, and collect their MAC addresses along with the SSID they are trying to connect to.
So, first of all, where can we get a good enough dictionary?
Wigle.net contains a ranking of the most used SSIDs that they have collected. Hence, this could act as a pretty good foundation for a dictionary. However, as I want to prove this potential attack can work without bombarding the air with fake beacon frames, I’m going to just try a collection of potential Wifi’s available at libraries throughout Sydney - eg. ‘State Library of NSW’.
So, if a device responses to our fake library beacon frames, then we can say that said device has visited that library in the past.
Obviously this doesn’t tell us much, but it can work just as a proof of concept - we may be able to get a sense of where the device lives as people would usually head to their local libraries.
So just by looking at my previously connected networks, I’ve identified 3 main formats:
Now they have to be an exact match, and hence the difference between 1 and 2 is the space.
So, all that is needed is a list of suburb names of Sydney, which I’ll web-scrape from here.
To briefly explain beacon frames, beacon frames are management frames for access points (APs) to actively advertise their location to devices, meaning that a device can avoid sending and receiving probes and move straight onto authentication if it so desires (as the existence of the AP is known).
So, we can use a wifi-tool called mdk3 to flood the air with beacons.
Here, I’ve used the SSID ‘State Library of NSW’ as an example:
Therefore, one can implement the following strategy to collect more information from target devices:
Again, the value of SSID’s is one can use a tool, just as Wigle.net, to potentially build a profile of where they have been in the past.
Though, one flaw with this is that depending on how long SSIDs stay on the device list’s PNL, you have a very large window of when they potentially visited and used wifi at a particular site. It may be effective against tourists, though more the value in this was to familiarise myself with WLAN further.