Skip to content
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

Add native support for iTunes encrypted backups #1023

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

threeplanetssoftware
Copy link
Contributor

Good evening!

This PR is an initial shot at adding support for encrypted iTunes backups directly in iLEAPP, instead of needing to use an external tool to unpack it first. Python is certainly not my preferred daily driver language, so I'm more than open to hearing improvements you'd like to see before merging. That said, I'm also plenty happy for someone else to run with this, it was just a quick Saturday night feature push to clear my head of another technical hurdle I was stuck on.

This includes new command line line switches to either receive the password (--itunes_passcode) or prompt for it (--prompt_for_passcode). It changes the iTunes FileSeeker to automatically identify if the file is encrypted by reading Manifest.plist, handle decrypting the Manifest.db, building the set of protection classes that will unwrap encryption keys, and decrypting files as they get copied out. These changes try to be as nice as possible to RAM and CPU by only grabbing additional details if the folder is actually encrypted, for example. It also sets a default of None to the function arguments it added, so no current calls should need to be updated.

This does NOT yet touch the GUI which still needs a way to prompt for the password. Because FileSeeker detects the encrypted backups automatically, once there is a way to put a passcode into the GUI, it should be minimal changes to make that work, as well.

Having run a comparison between an encrypted and unencrypted backup from the same device (unfortunately, not from the same time, so there are some differences between them) showed largely similar results. The encrypted backup too 5.45 seconds of processing time and the unencrypted took 3.12, so for large devices total time might chew up a bit with all the decryption, but it is hard to say exactly how much since the extra 2 seconds includes a million-round PBKDF2 iteration and it may be once that overhead is done the files are nearly instantaneous.

Appreciate any feedback you have. Would be happy to work on this as I have spare time, or see someone make edits to it directly to get it merged.

… line switches to either receive the password or prompt for it, changes to the iTunes FileSeeker to handle decrypting the Manifest.db and files as they get copied out. Does NOT yet touch the GUI which still needs a way to prompt for the password.D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant