Surveilling the Masses with Wi-Fi Positioning Systems
Unknown
Black Hat USA 2024 · Day 1 · Briefing
Overview
In his Black Hat USA talk, "Surveilling the Masses with Wi-Fi Positioning Systems," Eric Rye, a third-year PhD student specializing in network security and privacy at the University of Maryland, unveiled a critical vulnerability in Apple's Wi-Fi Positioning System (WPS). The presentation detailed how a low-power attacker could exploit specific design quirks of Apple's publicly accessible API to efficiently enumerate and collect vast amounts of Wi-Fi Basic Service Set Identifier (BSSID) geolocation data. This capability, Rye demonstrated, opens the door to large-scale surveillance and longitudinal tracking of Wi-Fi access points globally.

Key moments
- 0:00 Introduction to Wi-Fi Positioning Systems (WPS)
- 1:00 How Apple's WPS collects and stores location data
- 2:50 Apple's unique WPS: returning 400 unrequested BSSIDs
- 4:00 Core vulnerability: Unauthenticated, no-rate-limit API
- 5:20 Understanding MAC addresses and Organizationally Unique Identifiers (OUIs)
- 7:00 Improved attack strategy: guessing BSSIDs within allocated OUIs
Surveilling the Masses with Wi-Fi Positioning Systems
Speakers: Eric Rye, Third Year PhD Student, University of Maryland
Conference: Black Hat USA
YouTube: https://www.youtube.com/watch?v=hlbjUvkoyBA
Overview
In his Black Hat USA talk, "Surveilling the Masses with Wi-Fi Positioning Systems," Eric Rye, a third-year PhD student specializing in network security and privacy at the University of Maryland, unveiled a critical vulnerability in Apple's Wi-Fi Positioning System (WPS). The presentation detailed how a low-power attacker could exploit specific design quirks of Apple's publicly accessible API to efficiently enumerate and collect vast amounts of Wi-Fi Basic Service Set Identifier (BSSID) geolocation data. This capability, Rye demonstrated, opens the door to large-scale surveillance and longitudinal tracking of Wi-Fi access points globally.
Rye's research highlights a significant privacy concern inherent in the deployment and operation of modern positioning systems. While WPSs are designed to enhance user experience by providing geolocation services where GPS is unavailable or inefficient, Apple's implementation inadvertently exposes a global database of Wi-Fi access point locations. The implications extend beyond individual privacy, potentially enabling state-level actors or sophisticated adversaries to map critical infrastructure or track population movements without significant technical hurdles or resource expenditure.
The talk serves as a stark reminder of the often-unforeseen security and privacy ramifications of ubiquitous data collection and publicly exposed APIs. By detailing a practical method to exploit the system, Rye underscores the urgent need for robust authentication, rate-limiting, and user opt-out mechanisms in such powerful geolocation services. His work contributes to a growing body of research exposing how seemingly innocuous infrastructure can be repurposed for surveillance.
Background
▶ Watch: Introduction to Wi-Fi Positioning Systems (WPS) (0:00)
Wi-Fi Positioning Systems (WPSs) are fundamental components of modern mobile ecosystems, enabling devices to determine their geographic location without relying solely on Global Positioning System (GPS) satellites. This capability is crucial for various reasons: GPS consumes more power, many devices (like some MacBooks) lack dedicated GPS hardware, and GPS signals often struggle indoors or in urban environments (known as "urban canyons"). To overcome these limitations, companies like Apple, Google, Microsoft, and Skyhook operate their own WPSs, which essentially function as global databases mapping Wi-Fi access points to their physical locations.
The core mechanism of a WPS involves two main phases: data collection and device geolocation. During the data collection phase, mobile devices (e.g., iPhones) with high-quality geolocation information (obtained from GPS, cellular triangulation, or user input via map applications) periodically scan for nearby Wi-Fi access points. They identify each access point by its unique BSSID, which is typically the MAC address of the access point's wireless interface. These devices then send the BSSID along with its precise geolocation to the WPS operator's servers, contributing to a continually updated, worldwide database of Wi-Fi access point locations.
When a device needs to geolocate itself but cannot use GPS, it samples the 802.11 Wi-Fi channels, identifies nearby BSSIDs, and sends a query to the WPS. If the WPS knows the location of the queried BSSID, it responds with the corresponding geolocation data. The device then uses techniques like trilateration based on the received signal strengths from multiple known BSSIDs to determine its own position. This process is generally efficient and provides a seamless user experience.
However, Apple's WPS implementation introduces a critical "quirk" that forms the basis of Eric Rye's research. Unlike other WPSs that might only return information about the requested BSSID, Apple's API, upon receiving a query for a single BSSID, returns not only the geolocation of that specific BSSID (if known) but also the geolocations of up to 400 additional, unrequested BSSIDs that are geographically nearby. This generous response, coupled with the API's characteristics—it is unauthenticated, publicly accessible, and has no rate limit—creates a potent attack surface for mass data collection. Furthermore, there is no explicit way for Wi-Fi access point owners to opt out of having their BSSIDs and locations tracked and stored by Apple's system.
This isn't the first time Wi-Fi positioning systems have been scrutinized at Black Hat. Over a decade ago, the "ISniff GPS" Black Hat Arsenal talk demonstrated how tools like Kismet could be used to feed BSSIDs into Apple's WPS to map nearby identifiers. More recently, Eric Rye himself, along with a colleague, presented "IPVSeeYou" at Black Hat 2021, focusing on geolocating specific types of IPv6 addresses that embed MAC addresses in their lower 64 bits. Rye's current research stands as the third iteration in this line of inquiry, specifically focusing on how Apple's WPS can be exploited for comprehensive enumeration and longitudinal analysis of Wi-Fi location data.
Key Findings
▶ Watch: Apple's unique WPS: returning 400 unrequested BSSIDs (2:50)
The central finding of Eric Rye's research is the discovery and exploitation of a critical design flaw within Apple's Wi-Fi Positioning System API, enabling mass enumeration of Wi-Fi access point geolocations. This finding reveals that Apple's WPS, despite its utility for legitimate device geolocation, inadvertently provides a powerful, unconstrained tool for large-scale surveillance to any actor with an internet connection.
The core vulnerability stems from a combination of three key characteristics of Apple's WPS API:
- Generous Response: For every single BSSID queried, the API returns the geolocation of the requested BSSID (if known) and up to 400 additional, unrequested BSSIDs that are physically proximate, along with their respective geolocations. This "blast radius" significantly amplifies the data acquisition rate.
- Lack of Authentication: The API is publicly accessible without any form of authentication. This means anyone can send requests without needing an Apple ID, API key, or any other form of identification.
- Absence of Rate Limiting: There are no rate limits imposed on queries to the API. An attacker can send an effectively unlimited number of requests in a short period, facilitating rapid and extensive data harvesting.
Coupled with these API characteristics, Rye's research developed an optimized strategy for generating BSSID queries, drastically improving the efficiency of data collection. By focusing on Organizationally Unique Identifiers (OUIs) assigned by the IEEE, the search space for active BSSIDs was reduced by over 99%. This targeted approach, combined with the API's "400 additional BSSIDs" feature, creates a self-propagating data collection mechanism: a single successful query can yield hundreds of new BSSIDs, which can then be used as seeds for subsequent queries, creating a ripple effect that efficiently maps vast geographic areas.
The cumulative effect of these findings is that a "low-power attacker"—essentially anyone with the ability to send HTTPS requests—can systematically build a comprehensive database of Wi-Fi access point locations across the globe. This enables various privacy-invasive activities, including:
- Mass Surveillance: Tracking the movement and presence of Wi-Fi networks, which often correlate with people and organizations.
- Longitudinal Analysis: Observing changes in network presence over time, identifying new deployments, removals, or shifts in location.
- Targeted Geolocation: Pinpointing the location of specific BSSIDs, potentially associated with individuals or sensitive infrastructure, even if they are not actively using GPS-enabled devices.
Crucially, the research also highlighted that there is no way for individuals or organizations to opt out of having their Wi-Fi access points' locations cataloged by Apple's WPS. This lack of user control over their location data further exacerbates the privacy implications of these findings.
Technical Deep Dive
▶ Watch: Core vulnerability: Unauthenticated, no-rate-limit API (4:00)
The technical foundation of Eric Rye's attack strategy against Apple's Wi-Fi Positioning System hinges on understanding the structure of MAC addresses and leveraging specific API behaviors. To appreciate the efficacy of the attack, it's essential to first grasp the basic components of a Wi-Fi network identifier.
A MAC address is a 48-bit hardware identifier typically burned into the ROM of a network interface card during manufacturing. In the context of Wi-Fi, when referring to an access point, this identifier is specifically called a Basic Service Set Identifier (BSSID). The BSSID uniquely identifies a wireless interface on an access point, allowing devices to differentiate between multiple Wi-Fi networks.
MAC addresses have a well-defined structure. The upper three bytes (the first 24 bits) constitute the Organizationally Unique Identifier (OUI). The IEEE (Institute of Electrical and Electronics Engineers) is responsible for assigning these OUIs to manufacturers of 802.11 (Wi-Fi) interfaces. For instance, a company like Cisco or Apple might be allocated several OUIs to distinguish their various product lines. The lower three bytes (the remaining 24 bits) are assigned by the manufacturer to uniquely identify each device or interface they produce.
Initially, one might consider a "naive attack" strategy to enumerate Apple's WPS database: simply guessing random 48-bit BSSIDs and sending them as queries to the API. However, this approach is overwhelmingly impractical. With 48 bits, there are over 280 trillion unique possible BSSIDs (2^48). The probability of randomly guessing an active, known BSSID within Apple's database is infinitesimally small, rendering this method useless for large-scale data collection.
Rye's breakthrough lies in significantly improving the guessing odds by focusing the search space. He observed that while there are 16 million possible OUIs (2^24), the IEEE has only actually assigned approximately 36,000 OUIs to manufacturers. Crucially, the IEEE publishes this list of allocated OUIs freely on the internet. This insight provides the foundation for a highly optimized attack strategy:
Instead of guessing random 48-bit BSSIDs, an attacker can generate random BSSIDs only from within the pool of these 36,000 allocated OUIs. This single refinement results in an over 99% reduction in the search space. While still a guessing game, the probability of hitting an active BSSID (i.e., one that exists and is known to Apple's WPS) becomes significantly higher.
The attack capitalizes on this reduced search space in conjunction with the unique "quirk" of Apple's WPS API:
- Targeted BSSID Generation: An attacker generates a BSSID by randomly selecting one of the 36,000 allocated OUIs and then randomly generating the remaining 24 bits.
- Unauthenticated Public API Query: This generated BSSID is then sent as an HTTPS request to Apple's WPS API. The API requires no authentication, allowing anyone to query it.
- No Rate Limit Exploitation: The absence of rate limits means an attacker can programmatically send a continuous stream of these targeted BSSID queries.
- Amplified Data Collection: For each query, if the guessed BSSID is known to Apple's system, the API returns its geolocation. More importantly, it also returns the geolocations of up to 400 additional, unrequested BSSIDs that are geographically nearby.
This "400 additional BSSIDs" feature is the critical amplification factor. A single successful guess (hitting a known BSSID within the allocated OUI space) can immediately yield hundreds of new, verified BSSID-location pairs. These newly acquired BSSIDs can then be fed back into the system as seeds for further queries. This creates a highly efficient, self-propagating data collection process. By continuously querying known BSSIDs or strategically generating new ones within known OUI ranges, an attacker can rapidly expand their mapping coverage, effectively "crawling" Apple's global WPS database. This methodical approach allows a low-power attacker to accumulate vast quantities of Wi-Fi access point location data, enabling comprehensive surveillance and longitudinal analysis of network infrastructure movements.
Demo / Proof of Concept
▶ Watch: Understanding MAC addresses and Organizationally Unique Identifiers (OUIs) (5:20)
While the talk did not feature a live, interactive demonstration in the traditional sense, Eric Rye's presentation clearly outlined the methodology and practical steps for executing the mass enumeration attack against Apple's Wi-Fi Positioning System. The "Proof of Concept" described is the systematic process by which the researchers collected and analyzed the WPS data, thereby proving the feasibility and effectiveness of their findings.
The core of the demonstration, as inferred from the transcript, involves a multi-step data collection and analysis pipeline:
- OUI List Acquisition: The first step for any attacker would be to download the publicly available list of Organizationally Unique Identifiers (OUIs) from the IEEE website. This list, containing approximately 36,000 allocated OUIs, is crucial for narrowing down the vast search space of possible MAC addresses.
- Targeted BSSID Generation: A program or script is developed to generate candidate BSSIDs. This involves randomly selecting an OUI from the acquired list and then randomly generating the remaining three bytes (24 bits) to complete the 48-bit MAC address. This ensures that the generated BSSIDs fall within the "active" OUI ranges, significantly increasing the probability of hitting a valid, deployed Wi-Fi access point.
- API Query Execution: The generated BSSIDs are then used to construct HTTPS requests to Apple's WPS API. Since the API is unauthenticated and has no rate limit, these requests can be sent programmatically and continuously from any internet-connected machine. The speaker explicitly states that a "low power attacker" can perform this, implying that sophisticated infrastructure is not required.
- Response Parsing and Data Extraction: Upon receiving a response from the Apple WPS API, the program parses the JSON (or similar) data. For each query, the response includes the geolocation (latitude and longitude) of the requested BSSID (if found) and, critically, the geolocations of up to 400 additional, unrequested BSSIDs that are geographically nearby.
- Database Construction and Seeding: All extracted BSSID-geolocation pairs are then stored in a local database. The newly discovered "additional" BSSIDs are particularly valuable. These can be added to a queue of known BSSIDs, effectively "seeding" subsequent queries. By continually querying these newly found BSSIDs, the attacker can rapidly expand their map of Wi-Fi access points, moving outward from initial successful guesses in a highly efficient, snowballing manner.
- Longitudinal Analysis (Implied): The speaker mentions the ability to perform "interesting longitudinal analyses." This implies that the researchers collected data over periods of time, potentially repeatedly querying the same BSSIDs or regions to observe changes in Wi-Fi network presence, movement, or disappearance. This goes beyond simple mapping and delves into tracking and historical analysis of Wi-Fi infrastructure.
The effectiveness of this proof of concept lies in its ability to demonstrate that the unique combination of Apple's API design—returning 400 unrequested BSSIDs, being unauthenticated, and lacking rate limits—when coupled with a targeted BSSID generation strategy (using allocated OUIs), makes large-scale, automated collection of global Wi-Fi location data trivial for a malicious actor. This methodology effectively transforms Apple's WPS into an open-source intelligence (OSINT) tool for mass surveillance.
Defensive Implications
▶ Watch: Improved attack strategy: guessing BSSIDs within allocated OUIs (7:00)
The findings presented by Eric Rye have significant defensive implications for individuals, organizations, and particularly for Apple as the operator of the vulnerable WPS. Addressing these vulnerabilities requires a multi-faceted approach focusing on API security, privacy controls, and user awareness.
For Apple (WPS Operator):
- Implement Robust Authentication: The most critical step is to secure the WPS API with proper authentication mechanisms. This could involve API keys, OAuth tokens, or other credentials, ensuring that only authorized applications or users can query the system. This would immediately raise the bar for attackers from "anyone with an internet connection" to requiring a compromised or illicitly obtained credential.
- Introduce Strict Rate Limiting: Even with authentication, rate limiting is essential to prevent abuse. Limiting the number of queries per user, IP address, or API key within a given timeframe would significantly hinder large-scale enumeration attempts. Graduated rate limits (e.g., higher limits for legitimate Apple devices) could be implemented to maintain service quality for intended users.
- Reduce Response Amplification: The API's "400 additional BSSIDs" feature is a major amplification vector. Apple should reconsider this design choice and, at minimum, drastically reduce the number of unrequested BSSIDs returned per query, or ideally, only return the geolocation for the specifically requested BSSID. This would force attackers to make many more targeted queries, increasing their detection surface and making enumeration significantly less efficient.
- Provide a Clear Opt-Out Mechanism: Currently, there is "no way to opt out" for Wi-Fi access point owners. Apple should implement a clear, accessible, and easily verifiable process for individuals and organizations to request that their BSSIDs be removed from or excluded from the WPS database. This could involve a web portal where users can submit their BSSIDs and verify ownership.
For Network Administrators and Organizations:
- Assume Public Disclosure of AP Locations: Network administrators must operate under the assumption that the physical locations of their Wi-Fi access points (identified by their BSSIDs) are already public knowledge, or can be easily discovered, through WPS systems.
- Avoid Location-Based Security Relying on BSSIDs: Do not rely on the obscurity or privacy of BSSID locations for any security-critical functions. For example, if physical access to a particular area is restricted, the location of the Wi-Fi AP in that area should not be considered a secret.
- Review Wi-Fi Deployment Strategies: When deploying Wi-Fi, consider the privacy implications. While BSSIDs are necessary for Wi-Fi operation, be mindful that their presence can be mapped. For highly sensitive areas, alternative positioning technologies or strict physical security measures might be more appropriate.
- Monitor for Anomalous Wi-Fi Activity: While not directly preventing WPS enumeration, maintaining good network hygiene, including monitoring for unusual Wi-Fi scanning activity or unauthorized access points, remains crucial for overall network security.
For Individuals:
- Understand Location Privacy Risks: Individuals should be aware that even if GPS is disabled on their devices, their location can still be inferred with high accuracy through nearby Wi-Fi networks, as these networks' locations are often cataloged by WPSs.
- Limited Direct Action: Unfortunately, as an individual Wi-Fi router owner, there is currently very little direct action one can take to prevent their BSSID from being included in Apple's WPS database, short of turning off Wi-Fi broadcasting entirely. The primary defensive responsibility lies with the WPS operators.
- Advocate for Privacy Controls: Individuals should support efforts and policies that advocate for stronger privacy controls, opt-out mechanisms, and transparency from companies operating large-scale location databases.
In summary, the defensive implications underscore the need for a paradigm shift in how companies manage and secure their location-based services. The ease with which Apple's WPS can be exploited for mass surveillance demands immediate attention to API security, data minimization, and user privacy rights.
Key Takeaways
- Apple's Wi-Fi Positioning System (WPS) API allows for the mass enumeration of Wi-Fi access point geolocations globally.
- The API is unauthenticated, publicly accessible, and lacks rate limiting, making it exploitable by any low-power attacker.
- A critical design flaw returns up to 400 additional, unrequested BSSID geolocations per query, significantly amplifying data collection.
- Attackers can optimize BSSID guessing by leveraging the IEEE's list of allocated Organizationally Unique Identifiers (OUIs), reducing the search space by over 99%.
- This vulnerability enables large-scale surveillance, longitudinal tracking of Wi-Fi infrastructure, and targeted geolocation of access points.
- There is currently no user-friendly mechanism for Wi-Fi access point owners to opt out of having their BSSID locations recorded and exposed by Apple's WPS.
About the Speaker(s)
Eric Rye is a third-year PhD student at the University of Maryland. His academic and research focus lies primarily in the domain of network security and privacy. He describes his work as addressing "anything on the internet that's like sort of sad," indicating a commitment to uncovering and mitigating vulnerabilities that impact the integrity and privacy of online systems. His previous work includes research on geolocating IPv6 addresses with embedded MAC addresses, presented at Black Hat 2021.