All Projects → seemoo-lab → Openhaystack

seemoo-lab / Openhaystack

Licence: agpl-3.0
Build your own 'AirTags' 🏷 today! Framework for tracking personal Bluetooth devices via Apple's massive Find My network.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Openhaystack

Galaxybudsclient
Unofficial Galaxy Buds Client for Windows
Stars: ✭ 733 (-7.68%)
Mutual labels:  bluetooth, reverse-engineering
Gymnasticon
Make obsolete and/or proprietary exercise bikes work with popular cycling training apps like Zwift, TrainerRoad, Rouvy and more.
Stars: ✭ 155 (-80.48%)
Mutual labels:  bluetooth, reverse-engineering
Reverse Engineering Bluetooth Protocols
Intercepting Bluetooth device communication and simulating packet responses of an iPhone from a Raspberry Pi 3
Stars: ✭ 105 (-86.78%)
Mutual labels:  bluetooth, reverse-engineering
Continuity
Apple Continuity Protocol Reverse Engineering and Dissector
Stars: ✭ 180 (-77.33%)
Mutual labels:  apple, bluetooth
Sonyheadphonesclient
A {Windows, macOS, Linux} client recreating the functionality of the Sony Headphones app
Stars: ✭ 123 (-84.51%)
Mutual labels:  bluetooth, reverse-engineering
Openwifipass
An open source implementation of Apple's Wi-Fi Password Sharing protocol in Python.
Stars: ✭ 607 (-23.55%)
Mutual labels:  apple, reverse-engineering
Stcobfuscator
iOS全局自动化 代码混淆 工具!支持cocoapod组件代码一并 混淆,完美避开hardcode方法、静态库方法和系统库方法!
Stars: ✭ 740 (-6.8%)
Mutual labels:  reverse-engineering
Swiftui
A collaborative list of awesome SwiftUI resources. Feel free to contribute!
Stars: ✭ 774 (-2.52%)
Mutual labels:  apple
Rome
Carthage cache for S3, Minio, Ceph, Google Storage, Artifactory and many others
Stars: ✭ 724 (-8.82%)
Mutual labels:  apple
Hackintosh
Hackintosh long-term maintenance model EFI and installation tutorial
Stars: ✭ 6,589 (+729.85%)
Mutual labels:  apple
Flirtdb
A community driven collection of IDA FLIRT signature files
Stars: ✭ 809 (+1.89%)
Mutual labels:  reverse-engineering
Visualeffectview
Dynamic blur background view with tint color (UIVisualEffectView subclass) 📱
Stars: ✭ 795 (+0.13%)
Mutual labels:  apple
Room Assistant
Presence tracking and more for automation on the room-level
Stars: ✭ 764 (-3.78%)
Mutual labels:  bluetooth
Pokeemerald
Decompilation of Pokémon Emerald
Stars: ✭ 772 (-2.77%)
Mutual labels:  reverse-engineering
Macapps
个人收集的一些mac使用的不易找到的app,不断更新中。
Stars: ✭ 726 (-8.56%)
Mutual labels:  apple
Qbdi
A Dynamic Binary Instrumentation framework based on LLVM.
Stars: ✭ 801 (+0.88%)
Mutual labels:  reverse-engineering
Sonoff Homekit
Make your Sonoff Switch compatible with Apple Homekit! 🎉
Stars: ✭ 722 (-9.07%)
Mutual labels:  apple
Veles
Binary data analysis and visualization tool
Stars: ✭ 767 (-3.4%)
Mutual labels:  reverse-engineering
Arshooter
A demo Augmented Reality shooter made with ARKit in Swift (iOS 11)
Stars: ✭ 794 (+0%)
Mutual labels:  apple
Node Escpos
🖨️ ESC/POS Printer driver for node
Stars: ✭ 752 (-5.29%)
Mutual labels:  bluetooth

OpenHaystack application icon OpenHaystack

OpenHaystack is a framework for tracking personal Bluetooth devices via Apple's massive Find My network. Use it to create your own tracking tags that you can append to physical objects (keyrings, backpacks, ...) or integrate it into other Bluetooth-capable devices such as notebooks.

Screenshot of the app

Table of contents

What is OpenHaystack?

OpenHaystack is an application that allows you to create your own accessories that are tracked by Apple's Find My network. All you need is a Mac and a other Bluetooth-capable device. By using the app, you can track your accessories anywhere on earth without cellular coverage. Nearby iPhones will discover your accessories and upload their location to Apple's servers when they have a network connection.

History

OpenHaystack is the result of reverse-engineering and security analysis work of Apple's Find My network (or offline finding). We at the Secure Mobile Networking Lab of TU Darmstadt started analyzing offline finding after its initial announcement in June 2019. We identified how Apple devices can be found by iPhones devices, even when they are offline through this work. The whole system is a clever combination of Bluetooth advertisements, public-key cryptography, and a central database of encrypted location reports. We disclosed a specification of the closed parts of offline finding and conducted a comprehensive security and privacy analysis. We found two distinct vulnerabilities. The most severe one, which allowed a malicious application to access location data, has meanwhile been fixed by Apple (CVE-2020-9986). For more information about the security analysis, please read our paper. Since its release, we received quite a bit of press and media coverage.

Disclaimer

OpenHaystack is experimental software. The code is untested and incomplete. For example, OpenHaystack accessories using our firmware broadcast a fixed public key and, therefore, are trackable by other devices in proximity (this might change in a future release). OpenHaystack is not affiliated with or endorsed by Apple Inc.

How to use OpenHaystack?

OpenHaystack consists of two components. First, we provide a macOS application that can display the last reported location of your personal Bluetooth devices. Second, the firmware image enables Bluetooth devices to broadcast beacons that make them discoverable by iPhones.

System requirements

OpenHaystack requires macOS 11 (Big Sur).

Installation

The OpenHaystack application requires a custom plugin for Apple Mail. It is used to download location reports from Apple's servers via a private API (technical explanation: the plugin inherits Apple Mail's entitlements required to use this API). Therefore, the installation procedure is slightly different and requires you to temporarily disable Gatekeeper. Our plugin does not access any other private data such as emails (see source code).

  1. Download a precompiled binary release from our GitHub page.
    Alternative: build the application from source via Xcode.
  2. Open OpenHaystack. This will ask you to install the Mail plugin in ~/Library/Mail/Bundle.
  3. Open a terminal and run sudo spctl --master-disable, which will disable Gatekeeper and allow our Apple Mail plugin to run.
  4. Open Apple Mail. Go to PreferencesGeneralManage Plug-Ins... and activate the checkbox next to OpenHaystackMail.mailbundle.
  5. Allow access and restart Mail.
  6. Open a terminal and enter sudo spctl --master-enable, which will enable Gatekeeper again.

Usage

Adding a new accessory. To create a new accessory, you just need to enter a name for it and optionally select a suitable icon and a color. The app then generates a new key pair that is used to encrypt and decrypt the location reports. The private key is stored in your Mac's keychain.

Deploy to device. Connect a supported device via USB to your Mac and hit the Deploy button next to the accessory's name and choose the corresponding. Instead of using OpenHaystack's integrated deployment, you may also copy the public key used for advertising (right click on accessory) and deploy it manually.

Display devices' locations. It can take up to 30 minutes until you will see the first location report on the map on the right side. The map will always show all your items' most recent locations. You can click on every item to check when the last update was received. By clicking the reload button, you can update the location reports.

How does Apple's Find My network work?

We briefly explain Apple's offline finding system (aka PETS paper and Apple's accessory specification for more details. We provide a schematic overview (from our paper) and explain how we integrate the different steps in OpenHaystack below.

Find My Overview

Pairing (1)

To use Apple's Find My network, we generate a public-private key pair on an elliptic curve (P-224). The private key remains on the Mac securely stored in the keychain, and the public key is deployed on the accessory, e.g., an attached micro:bit.

Losing (2)

In short, the accessories broadcast the public key as Bluetooth Low Energy (BLE) advertisements (see firmware). Nearby iPhones will not be able to distinguish our accessories from a genuine Apple device or certified accessory.

Finding (3)

When a nearby iPhone receives a BLE advertisement, the iPhone fetches its current location via GPS, encrypts it using public key from the advertisement, and uploads the encrypted report to Apple's server. All iPhones on iOS 13 or newer do this by default. OpenHaystack is not involved in this step.

Searching (4)

Apple does not know which encrypted locations belong to which Apple account or device. Therefore, every Apple user can download any location report as long as they know the corresponding public key. This is not a security issue: all reports are end-to-end encrypted and cannot be decrypted unless one knows the corresponding private key (stored in the keychain). We leverage this feature to download the reports from Apple that have been created for our OpenHaystack accessories. We use our private keys to decrypt the location reports and show the most recent one on the map.

Apple protects their database against arbitrary access by requiring an authenticated Apple user to download location reports. We use our Apple Mail plugin, which runs with elevated privileges, to access the required authentication information. The OpenHaystack app communicates with the plugin while downloading reports. This is why you need to keep Mail open while using OpenHaystack.

How to track other Bluetooth devices?

In principle, any Bluetooth device can be turned into an OpenHaystack accessory that is trackable via Apple's Find My network. Currently, we provide a convenient deployment method of our OpenHaystack firmwares for a small number of embedded devices (see table below). We also support Linux devices via our generic HCI script. Feel free to port OpenHaystack to other devices that support Bluetooth Low Energy based on the our paper. Please share your results with us!

Platform Tested on Deploy via app Comment
Nordic nRF51 BBC micro:bit v1 Only supports nRF51288 at this time (see issue #6).
Espressif ESP32 SP32-WROOM, ESP32-WROVER Deployment can take up to 3 minutes. Requires Python 3. Thanks @fhessel.
Linux HCI Raspberry Pi 4 w/ Raspbian Should support any Linux machine.

Setup

Authors

References

  • Alexander Heinrich, Milan Stute, Tim Kornhuber, Matthias Hollick. Who Can Find My Devices? Security and Privacy of Apple's Crowd-Sourced Bluetooth Location Tracking System. Proceedings on Privacy Enhancing Technologies (PoPETs), 2021. 📄 Preprint.
  • Tim Kornhuber. Analysis of Apple's Crowd-Sourced Location Tracking System. Technical University of Darmstadt, Master's thesis, 2020.
  • Apple Inc. Find My Network Accessory Specification – Developer Preview – Release R3. 2020. 📄 Download.

License

OpenHaystack is licensed under the GNU Affero General Public License v3.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].