Support AirDrop authentication by using extracted secrets (fixes #53)

This commit is contained in:
Milan Stute
2020-12-02 10:16:28 +01:00
parent c926eaf710
commit 51246b89dd
2 changed files with 9 additions and 3 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
[![Language grade](https://img.shields.io/lgtm/grade/python/github/seemoo-lab/opendrop?label=code%20quality)](https://lgtm.com/projects/g/seemoo-lab/opendrop/context:python)
*OpenDrop* is a command-line tool that allows sharing files between devices directly over Wi-Fi. Its unique feature is that it is protocol-compatible with Apple AirDrop which allows to share files with Apple devices running iOS and macOS.
Currently (and probably also for the foreseeable future), OpenDrop only supports sending to Apple devices that are discoverable by *everybody* as the default *contacts only* mode requires [Apple-signed certificates](https://www.apple.com/certificateauthority/pdf/Apple_AAI_CPS_v6.1.pdf).
~~Currently (and probably also for the foreseeable future), OpenDrop only supports sending to Apple devices that are discoverable by *everybody* as the default *contacts only* mode requires [Apple-signed certificates](https://www.apple.com/certificateauthority/pdf/Apple_AAI_CPS_v6.1.pdf).~~
We support contacts-only devices by using extracted AirDrop credentials (keys and certificates) from macOS via our [keychain extractor](https://github.com/seemoo-lab/airdrop-keychain-extractor).
## Disclaimer
+7 -1
View File
@@ -120,8 +120,14 @@ class AirDropConfig:
logger.info("Key file or certificate does not exist")
self.create_default_key()
# TODO extract record data from a sample exchange
self.record_file = os.path.join(self.key_dir, "validation_record.cms")
self.record_data = None
if os.path.exists(self.record_file):
logger.debug("Using provided Apple ID Validation Record")
with open(self.record_file, "rb") as f:
self.record_data = f.read()
else:
logger.debug("No Apple ID Validation Record found")
def create_default_key(self):
logger.info("Create new self-signed certificate in {}".format(self.key_dir))