9

How can I decrypt an encrypted "Titanium Backup" backup using standard (Linux) tools?

Example:

Wi-Fi serves as a practical example, many other uses may apply to the solution I'm looking for.

If I quickly want to access backed-up Wi-Fi credentials from my Linux box, I know a fast way. With encrypted backups, I'm currently out of luck.

That's my quick & dirty way on how to do it without encryption so far:

me@local:~$ adb shell  
root@android:/ # cd /sdcard/TitaniumBackup/  
root@android:/sdcard/TitaniumBackup # ls *W*46.*gz  
com.keramidas.virtual.WIFI_AP_LIST-20120622-105046.tar.gz  
root@android:/sdcard/TitaniumBackup # gunzip -c *W*46.*gz | grep -C1 MyAccessPoint      
network={  
  ssid="MyAccessPoint"  
  psk="supersecrecretpassphrase"  

Some details on the company's site: https://www.titaniumtrack.com/kb/titanium-backup-kb/titanium-backup-cryptography.html

0

5 Answers 5

6

I have found a working solution on GitHub: https://github.com/phyber/TiBUdecrypter

1. Install/upgrade dependencies (on Ubuntu)

apt-get install python2.7
pip install --upgrade docopt
pip install --upgrade six
pip install --upgrade PyCrypto

2. Get script from GitHub

3. Decrypt a backup

python2.7 tibudecrypt.py com.keramidas.virtual.XML_WIFI_AP_LIST-20140711-012128.xml.gz
2

There are no standard tools as of now yet. TiB uses their own format which they kindly shared with me when I asked them the same above question.

In fact someone needs to write it still. It could be done in Java or even using bash + openssl only.

4
  • Is it public, or do I need to ask them myself, if I want it too? I had a look at the encrypted files, but gave up as I couldn't figure out exactly how it's encrypted. I could write something in python (CLI only)
    – user13391
    Commented Jun 27, 2012 at 5:50
  • It belongs to SO, that's why I didn't post it here. You can see their answer here plus.google.com/101760059763010172705/posts/MQBmYhKDex5
    – ce4
    Commented Jun 27, 2012 at 10:23
  • Thanks, it's really helpful. I'm kind of stuck because python doesn't seem to have a usable way to decrypt PKCS8 certificates, so I'll have to use openssl. Anyway, I'll ping you once I have something working.
    – user13391
    Commented Jun 27, 2012 at 15:14
  • I'll go for the (harder) bash+openssl thing once I find time. PS, python has an openssl package: packages.python.org/pyOpenSSL
    – ce4
    Commented Jun 27, 2012 at 15:27
1

I wrote an implementation in PHP:

https://github.com/bhafer/TitaniumBackupDecrypt

Usage:

php TitaniumBackupDecrypt <.tar.gz file>
1

2023 updated answer for OS with Python3:

  1. Download: https://github.com/half-duplex/titanium-decrypt/archive/refs/heads/main.zip
  2. Extract to any folder

Install requirements:

python -m venv venv
. venv/bin/activate && \
python -m pip install -Ur requirements.txt

Decrypt archive:

. venv/bin/activate
python tdecrypt.py my-encrypted-backup.tar.gz
0

According to the Titanium Backup Knowledge Base, TB backs up with public/private key encryption. If you have the private key, you should be able to access (decrypt) the backup file. The easiest way to do this seems to me to be via TB itself, and then perhaps re-save it as non-encrypted.

1
  • This link is also included in my original question, but it doesn't answer it. There's only some vague info about 'assymetric (rsa) and symmetric (aes) encryption'. That's not sufficient information. PS: I have an open ticket at titaniumtrack.com about this whole question. Let's see what they answer.
    – ce4
    Commented Jun 24, 2012 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .