iphone_backup_decrypt icon indicating copy to clipboard operation
iphone_backup_decrypt copied to clipboard

CBC padding error

Open gmattos opened this issue 1 year ago • 0 comments

After executing the attempt of WhatsApp decrypting database method, I got the error message as described below:

Traceback (most recent call last): File "", line 1, in File "C:\Users\GM\Downloads\iphone_backup_decrypt-master\src\iphone_backup_decrypt\iphone_backup.py", line 272, in extract_file decrypted_data = self.extract_file_as_bytes(relative_path, domain) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\GM\Downloads\iphone_backup_decrypt-master\src\iphone_backup_decrypt\iphone_backup.py", line 251, in extract_file_as_bytes return self.decrypt_inner_file(file_id=file_id, file_bplist=file_bplist) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\GM\Downloads\iphone_backup_decrypt-master\src\iphone_backup_decrypt\iphone_backup.py", line 193, in decrypt_inner_file return google_iphone_dataprotection.removePadding(decrypted_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\GM\Downloads\iphone_backup_decrypt-master\src\iphone_backup_decrypt\google_iphone_dataprotection.py", line 179, in removePadding raise Exception('Invalid CBC padding') Exception: Invalid CBC padding

Doing my troubleshooting research, I guess this error is related to the decryption process of whatsapp chatstorage.sqlite. I have successfully installed all dependencies except the fastpbkdf2, but as described in the readme file, it is optional to the code works.

I follow whatsapp development, and they have improved their encryption or security solutions yearly, unlike iTunes which doesn't change very often. Does this CBC padding error have a possible solution?

Also, can you please show a code example of how to decrypt Manifest.db?

Thank you for the interesting project!

gmattos avatar Jul 05 '24 19:07 gmattos