Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with make #2

Open
lucasromeiro opened this issue Feb 18, 2023 · 2 comments
Open

problem with make #2

lucasromeiro opened this issue Feb 18, 2023 · 2 comments

Comments

@lucasromeiro
Copy link

Hello, I have a problem with the MAKE command step.

This error occurs, I followed as described, is there something wrong?

image

@lucasromeiro
Copy link
Author

Hello everyone, this happened in the first step to get the keys:

image

I continued the tutorial normally, but when I run the make command I get this error:

image

Can someone help me?

My MAC is a MacStudio with M1 Max and MAC OS 13.1 (22C65) (ventura).

Please, help...

@Eco-Gaming
Copy link

Eco-Gaming commented Apr 9, 2023

If anyone is still having this problem, here are the steps I did (working as of 2023-04-09):
(All of this was done with System Integrity Protection turned off, however it probably also works without disabling it)

  • turn your Apple Account into a (free) Developer Account using this guide

    • for this to work you have to install Xcode on the Mac that you're planning to extract the keys from, so it has to be running macOS 1.13 (Ventura) or later
      (this can also be done with an older Mac using OpenCore, I did it on a 2012 MacBook Pro)
    • after adding your account to Xcode, click on "Manage Certificates..." in the bottom right, click the + sign and select Apple Development
      -> this will create the certificate that we will export later
  • the airdrop-keychain-extractor didn't work for me, so I had to manually export the certificates:

    • open Keychain Access
    • under the Keychain "login" there should be a Certificate with the name "Apple Development: <your-apple-id> (<numbers>)"
    • right click this certificate and select "Export ...", using the file format .p12 (you can set any export password, you will need this later)
      -> this file contains your certificate and your private key
    • you can now extract the certificate and private key using openssl, by running the following commands in the same directory as the certificate file (when prompted, enter the passwort you set earlier):
      • openssl pkcs12 -in certificate.p12 -out certificate.pem -clcerts -nokeys for the certificate
      • openssl pkcs12 -in certificate.p12 -out keys.pem -nocerts -nodes for the private key
  • I couldn't figure out where the Apple ID Validation Records are stored, but I ran across a project showing that they are transferred while sending out AirDrop requests, so I made a very crude modification to opendrop, similar to the opendrop branch mentioned in the project above:
    (I did this part on my MacBook Pro, however this may also work using OpenWirelessLink on a Linux machine)

    • start by downloading opendrop:
      git clone https://github.com/seemoo-lab/opendrop.git
      cd opendrop
      
    • now modify opendrop/util.py by adding the following line at the top:
      import plistlib
      
    • then add the following to opendrop/server.py on line 223, it should come at the end of def handle_discover(self):, after self.wfile.write(discover_answer_binary):
      discover_request = plistlib.loads(post_data)
      validation_record = discover_request["SenderRecordData"]
      f = open ("validation_record.cms", "x")
      f.write(str(validation_record))
      f.close()
      
      This is a very scuffed way of writing the validation record of the first device opendrop finds to a file in the opendrop directory, it will error out as soon as the file is created.
      There are definitely better solutions for this, but this works so ¯\_(ツ)_/¯
    • you can now run pip3 install . to install opendrop
    • then open the airdrop sharing prompt for any file (or link, text, etc.) on another Apple device, like an iPhone and run opendrop receive
    • as soon as you start getting errors you can press CTRL+C to stop the program, as this should mean that the validation record was saved to a file
      • I also had to open AirDrop in Finder and set it to discoverable by everyone for this step to work
    • your validation record should now be saved in the opendrop root folder, with the filename validation_record.cms
      (The file has a lot of weird characters in it, but it seems to work with GoOpenDrop so I didn't investigate further)
  • now that you have all your keys and certificates, you can use them for GoOpenDrop (I didn't test them with opendrop, but they will probably work with that too)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants