-
Notifications
You must be signed in to change notification settings - Fork 89
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
Failed fetch key bag #36
Comments
Hi. For some reason we can't retrieve the key bag. Either it's not there or we have a coding error. Are you able to restore the backup to a phone at all? Or have you had success with any other iCloud backup recovery tools? |
I've tried it with iSkysoft and the files downloaded but there was issues with Data Protection encryption. |
Ok, other software has the same issue so there could be a problem with the backup itself. Without the key bag you cannot decrypt files with Data Protection. I've largely stopped working on this project at present but I will keep a note of this. |
Closing ticket. I've not been able to reproduce the issue. As stated earlier if other software is also having problems then it's probably an issue with the backup itself. |
Thanks for you quick reply, the one more thing is backupProperties is empty that contains plists with some information i.e SnapshotFactory - -- from() - snapshot: Snapshot{snapshotID=S:23DFE195-E332-481F-B0F6-D70777B0BF48, backupProperties=Optional.empty} still i can see list of devices with available backups but when i select any backup it throws exception i.e keyBagClient() - IOException: com.github.horrorho.inflatabledonkey.exception.BadDataException KeyBagFactory, no key bag data
|
Thank you for the update. I've looked through the relevant code again and it's unclear to me what the issue might be. It's possible that there are alternate key bag protocol/s that I'm unaware of. As of yet I've been unable to replicate this error. Could you give me the name of the backup solution that you used and also double check that it recovers the offending files in question without corruption, i.e. HomeDomain Library/Preferences/com.apple.mobilenotes.plist. There are some tools that do not report all errors and silently drop files. Also if you could kindly navigate to: logger.debug("-- keyBag() - responses: {}", responses); to logger.error("-- keyBag() - responses: {}", responses); Re-compile and run. This will print out as an error the raw server response to our key bag requests. If you could let me know what these look like, a representative sample of one or two should be fine. Once the above step is complete, we can also look at the raw server snapshot response. For this please follow the instructions here. This mod will dump out the server response and then halt the program. The field "currentKeybagUUID" would be of particular importance. |
Hi, here is output from KeyBagClient.java i.e
and here is output from DeviceClient.java
Thanks, |
Thank you! It appears the key bag information is there but we are unable to decrypt it. recordField {
identifier {
name: "keybagData"
}
value {
type: 20
bytesValue: "\003j\343\000\250\026\350\f\302x# many more..."
}
}
recordField {
identifier {
name: "secret"
}
value {
type: 20
bytesValue: "\003j\343\000\333\322\313$\236\313\355b\256\026\373............"
}
}
} The decryption process is somewhat convoluted and I need additional logging statements to see what is going wrong. If you would kindly take a fresh copy of InflatableDonkey and replace the following files with their gist counterparts: InflatableDonkey-master/src/main/java/com/github/horrorho/inflatabledonkey/pcs/zone/PZAssistantLight InflatableDonkey-master/src/main/java/com/github/horrorho/inflatabledonkey/data/backup/KeyBagFactory Recompile and run. I need to see these error statements including the raw data values. Even though in isolation they don't mean much, it would be prudent to email the results to me at horrorhorrorho@gmail.com rather than posting them here. As an additional security measure you can change your iCloud password after generating these. |
Thank you! |
I think it's linked to my issue |
Ok! I believe I have found the problem. In short, InflatableDonkey only allows one key per service and drops superfluous keys. This behaviour is problematic as some backups have multiple keys per service, particularly when multiple devices are present. I'll need to fix and test the offending code which may take a few days. @asifmehmoood Thank you for the assistance! @Louti Although possibly related, I suspect it doesn't fully explain issue #41. |
Welcome! and Thanks to get some time form you busy schedule :) |
Ok! I've pushed a new build. I've been playing around with it for a couple of days and it's seems to have solved the issue. |
Thank you! Thanks 👍 |
@asifmehmoood Wonderful! Again thank you for your assistance. I'll go ahead and close this ticket. |
Hey,
I have an bug that with occurs when downloading from the any domain except for CameraRollDomain. iOS 9.2
Sample output looks like:
12:53:34.488 [main] WARN c.g.h.inflatabledonkey.KeyBagManager - -- keyBagClient() - IOException: com.github.horrorho.inflatabledonkey.exception.BadDataException KeyBagFactory, no key bag data 12:53:34.494 [main] WARN c.g.h.inflatabledonkey.KeyBagManager - --fetchKeyBag() - failed to fetch key bag: K:987KUL+uS4CC6p2PkXitRQ== 12:53:35.260 [ForkJoinPool-1-worker-0] WARN c.g.h.i.file.KeyBlobCurve25519Unwrap - -- doUnwrap() - no public key for protection class: 3 12:53:35.262 [ForkJoinPool-1-worker-0] WARN c.g.h.i.file.FileAssembler - -- decrypt() - failed to unwrap encryption key
Thank you for the help and your hard work on this project.
The text was updated successfully, but these errors were encountered: