# OpenWifiPass | An Open Source Implementation Of Apple’s Wi-Fi Password Sharing Protocol In Python

**URL:** <https://onehack.st/t/openwifipass-an-open-source-implementation-of-apple-s-wi-fi-password-sharing-protocol-in-python/173854>\
**Category:** Tools & Scripts\
**Tags:** tools, hacking\
**Created:** [February 27, 2021, 2:21pm UTC](https://onehack.st/t/openwifipass-an-open-source-implementation-of-apple-s-wi-fi-password-sharing-protocol-in-python/173854 "2021-02-27T14:21:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PlayBoy83](https://onehack.st/user_avatar/onehack.st/playboy83/32/164314_2.png) [@PlayBoy83](https://onehack.st/u/PlayBoy83)\
**Post date:** [February 27, 2021, 2:21pm UTC](https://onehack.st/t/openwifipass-an-open-source-implementation-of-apple-s-wi-fi-password-sharing-protocol-in-python/173854/1 "2021-02-27T14:21:41Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/8/e/8e9ef9e92af131a8c119aff21476b7cdd8786425.jpeg)

An open source implementation of the grantor role in Apple’s Wi-Fi Password Sharing protocol.

**Disclaimer**

OpenWifiPass is experimental software and is the result of reverse engineering efforts by the [Open Wireless Link](https://owlink.org/) project. The code serves solely documentary and educational purposes. It is _untested_ and _incomplete_. For example, the code **does not verify the identity of the requestor**. So, do not use this implementation with sensitive Wi-Fi credentials. OpenWifiPass is not affiliated with or endorsed by Apple Inc.

**Requirements**

**Hardware:** Bluetooth Low Energy radio, e.g., Raspberry Pi 4

**OS:** Linux (due to the `bluepy` dependency)

**Install**

Clone this repository and install it:

```auto
git clone git@github.com/seemoo-lab/openwifipass.gitpip3 install ./openwifipass

```

**Run**

Run `openwifipass` to share Wi-Fi credentials (`SSID` and `PSK`) with _any_ requestor (we need super user privileges to use the Bluetooth subsystem):

```auto
sudo -E python3 -m openwifipass --ssid <SSID> --psk <PSK>

```

**Use [quoting](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Quoting) of your shell to remove special meaning of certain characters in `SSID`/`PSK`.** In the example below, we use single quotes (`'`) to prevent shell expansion of the `$` character in the PSK.

A successful run of the protocol would look as follows:

```auto
pi@raspberrypi:~/openwifipass $ sudo -E python3 -m openwifipass --ssid OWL --psk '$uper$ecretPassword'Start scanning...SSID match in PWS advertisement from aa:bb:cc:dd:ee:ffConnect to device aa:bb:cc:dd:ee:ffSend PWS1Receive PWS2Send M1Receive M2Send M3Receive M4Send PWS3Receive PWS4Wi-Fi Password Sharing completed

```

**OPACK**

This projects contains a reusable OPACK (de)serializer. Read [OPACK.md](https://github.com/seemoo-lab/openwifipass/blob/main/OPACK.md) for more information.

**Authors**

- Jannik Lorenz

**Publications**

- Milan Stute, Alexander Heinrich, Jannik Lorenz, and Matthias Hollick. **Disrupting Continuity of Apple’s Wireless Ecosystem Security: New Tracking, DoS, and MitM Attacks on iOS and macOS Through Bluetooth Low Energy, AWDL, and Wi-Fi.** _30th USENIX Security Symposium (USENIX Security ’21)_, August 11–13, 2021, Vancouver, B.C., Canada. _To appear_.
- Jannik Lorenz. **Wi-Fi Sharing for All: Reverse Engineering and Breaking the Apple Wi-Fi Password Sharing Protocol.** Bachelor thesis, _Technical University of Darmstadt_, March 2020.

## GitHub:

> **[GitHub - seemoo-lab/openwifipass: An open source implementation of Apple's Wi-Fi...](https://github.com/seemoo-lab/openwifipass)**
>
> An open source implementation of Apple's Wi-Fi Password Sharing protocol in Python.
