HyeongminSeo / iphone-dataprotection

Automatically exported from code.google.com/p/iphone-dataprotection
0 stars 0 forks source link

FAIL: keybag type > 3 #82

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Having problems when using the toolset on an iPad 3. The simplest way to 
reproduce the problem is through doing a backup, running the backup_tool.py 
script on it and then it fails with the following error message after the 
backup password is entered:

FAIL: keybag type > 3 : 1073741825

I know this implies I have put the password in incorrectly but I'm certain I 
haven't (I have done a number of verifications with fresh backups).

I see the same issue when trying to decrypt the keychain after applying the 
manual kernel patch.

Am I doing something wrong or is there no support for iPad 3s currently?

Original issue reported on code.google.com by awau...@gmail.com on 7 Nov 2012 at 2:45

GoogleCodeExporter commented 8 years ago
I should add I have confirmed the script is working against an iPad 2 and I am 
using a fresh download of the tools.

Original comment by awau...@gmail.com on 7 Nov 2012 at 2:51

GoogleCodeExporter commented 8 years ago
There is no support for iPad 3 on-device acquisition, but backups should be the 
same as other devices. Can you post the BackupKeyBag value from the 
Manifest.plist file in the backup folder ?
Thanks

Original comment by jean.sig...@gmail.com on 7 Nov 2012 at 8:46

GoogleCodeExporter commented 8 years ago
any update ?

Original comment by jean.sig...@gmail.com on 15 Dec 2012 at 12:46

GoogleCodeExporter commented 8 years ago
Yo! I ran into the same issue and it seemed the 'TYPE' was way bigger than 3, 
at 1073741825. According to keybag.py, BACKUP_KEYBAG = 1. 1073741825 is 2^30 + 
1, so I gussed that it was really 1 with an option OR'ed in. Try applying the 
following patch and see if it works. It did for me.

Abby

diff -r 930139479d08 python_scripts/keystore/keybag.py
--- a/python_scripts/keystore/keybag.py Sun Oct 28 12:32:15 2012 +0100
+++ b/python_scripts/keystore/keybag.py Sat Dec 22 19:46:06 2012 +0000
@@ -134,7 +134,10 @@
             if tag == "TYPE":
                 self.type = data
                 if self.type > 3:
-                    print "FAIL: keybag type > 3 : %d" % self.type
+                    if self.type == 1 | (1 << 30):
+                        self.type = 1
+                    else:
+                        print "FAIL: keybag type > 3 : %d" % self.type
             elif tag == "UUID" and self.uuid is None:
                 self.uuid = data
             elif tag == "WRAP" and self.wrap is None:

Original comment by abbygale...@yahoo.com on 22 Dec 2012 at 7:47

GoogleCodeExporter commented 8 years ago
This issue was updated by revision 69937ec16f59.

Original comment by jean.sig...@gmail.com on 30 Dec 2012 at 12:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks a lot, i just pushed some code to ignore the flags.

Original comment by jean.sig...@gmail.com on 30 Dec 2012 at 12:55

GoogleCodeExporter commented 8 years ago
Issue 112 has been merged into this issue.

Original comment by jean.sig...@gmail.com on 9 Jul 2013 at 11:26