sohsatoh / ReProvision-Reborn

On-device signing utility for iOS
GNU Affero General Public License v3.0
100 stars 13 forks source link

Wrong entitlements in v0.7.0 #1

Closed RuyeNet closed 3 years ago

RuyeNet commented 3 years ago

Wrong certificate used in v0.7.0

Steps to reproduce the behavior: 1.Go to 'iPhone Setting – General – Description File' 2.Click on the description file generated by ReProvision-Reborn

Expected behavior At ReProvision-Reborn version 0.6.x,The certificate name is“iPhone Developer:example@example.com”, But At ReProvision-Reborn version 0.7.0,The certificate name is“Apple Development:example@example.com”. This will cause unc0ver to fail to jailbreak,It throws an error like this “An error occurred while verifying the entitlements of our application. This build was signed improperly. Please install the build with official methods from https://unc0ver.dev and try again.” I think there is a problem with the certificate used for the signature.

Screenshots correct

Error: Reducted as it contains a e-mail address associated with apple id

Device (please complete the following information):

sohsatoh commented 3 years ago

The cert should have absolutely nothing to do with how it works with u0. The problem is caused by entitlements and that will be fixed. If you even remove it and sign u0 with v0.6.x RR, the jailbreaking process with u0 should still fail. Just in case, please try that and report the result.

RuyeNet commented 3 years ago

The cert should have absolutely nothing to do with how it works with u0. The problem is caused by entitlements and that will be fixed. If you even remove it and sign u0 with v0.6.x RR, the jailbreaking process with u0 should still fail. Just in case, please try that and report the result.

I used two devices to test again and got the following results: Use the 0.6.x version to sign unc0ver, and the jailbreak is successful; Use the 0.7.0 version to sign unc0ver, and the jailbreak fails. Error alert:“ An error occurred while verifying the entitlements of our application. This build was signed improperly. ”

sohsatoh commented 3 years ago

Thanks! It is probably because of the entitlements are embedded in provisioning profile on the Apple server. Could you try these instructions?

  1. Uninstall u0 from profile menu (the screen in the pic you attached)
  2. Open ReProvision and logout from your Apple ID
  3. Login with another Apple ID
  4. Sign and Install u0 from IPA
RuyeNet commented 3 years ago

Thanks! It is probably because of the entitlements are embedded in provisioning profile on the Apple server. Could you try these instructions?

  1. Uninstall u0 from profile menu (the screen in the pic you attached)
  2. Open ReProvision and logout from your Apple ID
  3. Login with another Apple ID
  4. Sign and Install u0 from IPA
  | Apple ID A | Apple ID B | Apple ID C | Apple ID D -- | -- | -- | -- | -- RR v0.6.2 on iPhone 11 | Success | Success | Success | Success RR v0.7.0 on iPhone 11 | Failed | Failed | Failed | Failed RR v0.6.2 on iPhone 11 Pro Max | Success | Success | Success | Success RR v0.7.0 on iPhone 11 Pro Max | Failed | Failed | Failed | Failed

I tried the following methods:

1.Uninstall u0 from profile menu

2.Tried 4 Apple IDs on two devices

3.Download the ipa file from u0 official website, and then use RR to sign

But the problem still exists.

As you said,the problem is caused by entitlements.(unc0ver threw this error)

When there is a problem, the profile menu will start with "Apple Development:" instead of "iPhone Developer:".

Since the release of Reprovision Reborn, I have been using it on two devices, and this problem appeared after updating to v0.7.0.

I also downgraded to RR v0.6.2 and the problem was solved.

After many attempts, it is determined that the problem is caused by RR v0.7.0.

sohsatoh commented 3 years ago

Thank you for the information. I tried with my Apple ID, but u0 does not show any alerts. Seems like I have to look for people who can test the new debug build. D626578E-7883-4E75-88EB-5BF20D05BC49 2821370A-D229-4562-9AEB-FD2E33E0E340

RuyeNet commented 3 years ago

Like this, Don't care about the version of u0 in the picture, I also tried u0 v6.2.0, the same error. 6EF2EB8D-30C0-4B2F-AD80-70098D9DFE37

RuyeNet commented 3 years ago

Thank you very much. In order to avoid this problem, I have downgraded RR to v0.6.2, maybe we should wait for others to report this problem.

Steppen-wolf commented 3 years ago

Same here! iOS 14.2 iPhone XR Unc0ver 6.1.1 Back to Reprovision v0.6.2 solved this trouble.

Tx for your work!

sohsatoh commented 3 years ago

@Ruyenet Could you check the entitlements of u0 signed by RR v0.6.2 and v0.7.0 using ldid?

Command: ldid -e <the path of the binary of u0 on iOS>

RuyeNet commented 3 years ago

@Ruyenet Could you check the entitlements of u0 signed by RR v0.6.2 and v0.7.0 using ldid?

Command: ldid -e <the path of the binary of u0 on iOS>

Of course, please wait some time.

RuyeNet commented 3 years ago

Doesn't seem to make a difference.


RR 0.6.2

iPhone-11-Pro-Max:~ root# ldid -e /private/var/containers/Bundle/Application/CBAA10A3-49CD-45E9-B19E-B45193230FE2/unc0ver.app/unc0ver 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>Reducted.science.xnu.undecimus.Reducted</string>
    <key>com.apple.developer.team-identifier</key>
    <string>Reducted</string>
    <key>keychain-access-groups</key>
    <array>
        <string>Reducted.*</string>
    </array>
</dict>
</plist>

RR0.7.0

iPhone-11-Pro-Max:~ root# ldid -e /private/var/containers/Bundle/Application/B9B34011-3EC0-4543-BBEF-5C2637114BFB/unc0ver.app/unc0ver 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>Reducted.science.xnu.undecimus.Reducted</string>
    <key>com.apple.developer.team-identifier</key>
    <string>Reducted</string>
    <key>keychain-access-groups</key>
    <array>
        <string>Reducted.*</string>
    </array>
</dict>
</plist>
RuyeNet commented 3 years ago

I execute ldid on the iPhone terminal. Is my operation correct? IMG_1640

sohsatoh commented 3 years ago

@Ruyenet Thanks, that information is really useful! Could you try installing v0.8.0, uninstall and re-install (re-sign) u0, and run the same command? (This is debug build so not for release) https://github.com/sohsatoh/ReProvision-Reborn/releases

Anyway, is il***@ilove.top is your apple paid developer account? If so, the issue is probably caused by this commit. https://github.com/sohsatoh/ReProvision-Reborn/commit/a134df06b4b7eeb8b4c3aaee089f41506a8cf9de

RuyeNet commented 3 years ago

All my Apple IDs are free accounts, and the signature is only valid for 7 days. I did not purchase any developer accounts.

RuyeNet commented 3 years ago

I tested with v0.8.0 on two devices and the problem has been resolved. Thanks for your work!

sohsatoh commented 3 years ago

Great to hear that! Thanks for testing!