[Paper Review] Linux Goes Apple Picking: Cross-Platform Ad hoc Communication with Apple Wireless Direct Link
This paper reverse-engineers Apple Wireless Direct Link (AWDL), a proprietary ad hoc protocol used by Apple devices for features like AirDrop and AirPlay. The authors implement a fully functional AWDL stack on Linux using userspace C code, Netlink API, and pcap, demonstrating synchronization, master election, and end-to-end IPv6-based communication with Apple devices including iPhones and MacBooks.
Apple Wireless Direct Link (AWDL) is a proprietary and undocumented wireless ad hoc protocol that Apple introduced around 2014 and which is the base for applications such as AirDrop and AirPlay. We have reverse engineered the protocol and explain its frame format and operation in our MobiCom '18 paper One Billion Apples' Secret Sauce: Recipe of the Apple Wireless Direct Link Ad hoc Protocol. AWDL builds on the IEEE 802.11 standard and implements election, synchronization, and channel hopping mechanisms on top of it. Furthermore, AWDL features an IPv6-based data path which enables direct communication. To validate our own work, we implement a working prototype of AWDL on Linux-based systems. Our implementation is written in C, runs in userspace, and makes use of Linux's Netlink API for interactions with the system's networking stack and the pcap library for frame injection and reception. In our demonstrator, we show how our Linux system synchronizes to an existing AWDL cluster or takes over the master role itself. Furthermore, it can receive data frames from and send them to a MacBook or iPhone via AWDL. We demonstrate the data exchange via ICMPv6 echo request and replies as well as sending and receiving data over a TCP connection.
Motivation & Objective
- To reverse-engineer Apple Wireless Direct Link (AWDL), a proprietary ad hoc protocol used in Apple's ecosystem for services like AirDrop and AirPlay.
- To enable cross-platform ad hoc communication by implementing AWDL on Linux systems, extending its reach beyond Apple's native environment.
- To validate the protocol's behavior through a working prototype that synchronizes with existing AWDL clusters and supports bidirectional data exchange with Apple devices.
- To demonstrate end-to-end communication using standard networking protocols such as ICMPv6 and TCP over the AWDL data path.
Proposed method
- Reverse-engineered the AWDL protocol by analyzing its frame formats, synchronization mechanisms, and channel-hopping behavior on top of IEEE 802.11.
- Implemented a userspace AWDL stack in C on Linux, leveraging the Netlink API to interface with the kernel's networking stack.
- Used the pcap library to inject and receive raw 802.11 frames, enabling low-level control over wireless communication.
- Designed and integrated master election and cluster synchronization logic to enable dynamic participation in AWDL networks.
- Enabled IPv6-based data transmission by implementing the required network-layer and transport-layer protocols over AWDL.
- Validated the prototype by establishing ICMPv6 echo sessions and TCP connections with real Apple devices such as MacBooks and iPhones.
Experimental results
Research questions
- RQ1How does Apple Wireless Direct Link (AWDL) operate at the protocol level, particularly in terms of frame structure, synchronization, and channel hopping?
- RQ2Can a fully functional AWDL implementation be ported to non-Apple platforms such as Linux?
- RQ3What mechanisms does AWDL use to elect a master node and maintain network synchronization in an ad hoc setting?
- RQ4To what extent can cross-platform communication be achieved using AWDL, and what are the practical limitations?
- RQ5Can standard networking protocols like ICMPv6 and TCP be successfully layered on top of the AWDL data path?
Key findings
- The authors successfully reverse-engineered the AWDL protocol, revealing its frame format, channel-hopping sequence, and synchronization mechanisms on top of IEEE 802.11.
- A fully functional AWDL implementation was developed on Linux, demonstrating that the protocol can be natively supported outside Apple's ecosystem.
- The Linux-based AWDL stack correctly synchronized with existing AWDL clusters and could assume the master role when needed.
- End-to-end communication was achieved with Apple devices using ICMPv6 echo requests and replies, confirming the viability of the IPv6-based data path.
- TCP connections were successfully established between the Linux system and Apple devices over AWDL, proving the protocol's support for reliable transport.
- The implementation leveraged standard Linux networking interfaces (Netlink, pcap) to achieve interoperability without kernel modifications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.