jsharkey13 / iphone_backup_decrypt

Decrypt an encrypted iOS backup created by iTunes on Windows or MacOS
Other
247 stars 41 forks source link

the code is not accepting the pasword #2

Closed lobra07 closed 4 years ago

lobra07 commented 4 years ago

Traceback (most recent call last): File "extract.py", line 9, in backup.extract_file(relative_path=RelativePath.CALL_HISTORY, File "D:\iphone data\iphone_backup_decrypt-master\iphone_backup_decrypt-master\src\iphone_backup_decrypt\iphone_backup.py", line 233, in extract_file decrypted_data = self.extract_file_as_bytes(relative_path) File "D:\iphone data\iphone_backup_decrypt-master\iphone_backup_decrypt-master\src\iphone_backup_decrypt\iphone_backup.py", line 198, in extract_file_as_bytes self._decrypt_manifest_db_file() File "D:\iphone data\iphone_backup_decrypt-master\iphone_backup_decrypt-master\src\iphone_backup_decrypt\iphone_backup.py", line 134, in _decrypt_manifest_db_file self._read_and_unlock_keybag() File "D:\iphone data\iphone_backup_decrypt-master\iphone_backup_decrypt-master\src\iphone_backup_decrypt\iphone_backup.py", line 106, in _read_and_unlock_keybag self._unlocked = self._keybag.unlockWithPassphrase(self._passphrase) File "D:\iphone data\iphone_backup_decrypt-master\iphone_backup_decrypt-master\src\iphone_backup_decrypt\google_iphone_dataprotection.py", line 80, in unlockWithPassphrase passphrase_round1 = pbkdf2_hmac('sha256', passphrase, self.attrs[b"DPSL"], self.attrs[b"DPIC"], 32) KeyError: b'DPSL'

jsharkey13 commented 4 years ago

@lobra07: This error seems to be in the Google-written code, trying to extract the salt from the backup Keybag. It's not (yet) an issue with the passphrase.

Is the backup definitely encrypted, and not just plain? How recently was the backup created, and from what version of iOS?

lobra07 commented 4 years ago

the backup is done 30 days ago and the ios is the most recent one ,,, i dont know if its encrypted or not but it seems encrypted

mmhobi7 commented 4 years ago

I'm having this issue and my backup is definitely encrypted. IOS 13.1 created 3 months ago.

EDIT: jk it works on encrypted backups (and encrypted backups only)

soundsk commented 1 year ago

Having this same issue. Any idea on how to fix it? Thanks!

jsharkey13 commented 1 year ago

Is the backup definitely encrypted? You can easily check in iTunes itself; go to Edit -> Preferences -> Devices and it will list all of the backups on your PC. If the backup is encrypted it will have a padlock 🔒 icon next to its name and the date it was updated.

If it does not have a padlock, this code will not work - but you also do not need it to: the files are either there unencrypted anyway and can just be copied by hand and renamed to open them; or the files are not included because they aren't added to unencrypted backups (like health and password data).

soundsk commented 1 year ago

Cheers jsharkey13 These are relatively old backups (a few years old) I have in a NAS running OMV. I think I encrypted all my backups and running the file command on the files in the folders doesn't yield any recognisable file formats. I just tried using the iOSbackup python lib on the same backup, with a password and it seems to be extracting files.

jsharkey13 commented 1 year ago

So long as you have something working! That iOSbackup tool is based on the same code this is, and I fixed a bug in it a few years back; I think it's a slightly more user-friendly tool than this library.

soundsk commented 1 year ago

Thanks! Thing is I have a couple more backup folders, and in the other one I've tried, neither yours or iosbackup is working! I'll keep digging! Thanks again for the quick replies!