update WhatsApp Xtract v2.1 – Iphone & Android Forensics [Full Disclosure]

v2.1 (updated by Fabio Sangiacomo and Martina Weidner – May 7th, 2012)
– improved install pyCrypto.bat
– added easy drag and drop possibility with whatsapp_xtract_drag’n’drop_database(s)_here.bat
– (Android Version) added support to fix corrupted android whatsapp database (needs sqlite3, for windows sqlite3.exe is contained in the archive)
– (Android Version) removed wrong extraction of owner in android version
– (Iphone Version) information from Z_METADATA table will be printed to shell
– (Iphone Version) fixed bug in support of older Iphone whatsapp databases

How to use: 
You need to copy the whatsapp database.

##On Android, either get this file:

(crypted database on SD card, can be created by starting backup from whatsapp advanced settings: settings – more – Backup Chats)

or these files:
/data/data/com.whatsapp/databases/msgstore.db and wa.db
(for this you need root access. detailed instructions in the bottom of this file. the advantage is that the corresponding contact names of phone numbers will be displayed.)

##On IPhone, get this file:

(You can use an Iphone Backup Tool to get the file, e.g. I-Twin or Iphone Backup Extractor. Make sure to create an unencrypted backup with Itunes, as these tools can’t handle encrypted backups. Another possibility are forensic tools like UFED Physical Analyzer.)

Extract this archive (Whatsapp_Xtract….zip) to a certain folder on your computer, e.g. C:WhatsApp.

Copy the database(s) to e.g. C:WhatsApp (on Android, you simply copy the whole folder WhatsApp on SD card to your computer e.g. to C:WhatsApp and then copy the database file from C:WhatsAppDatabases to C:WhatsApp)

You need Python and (for Android msgstore.db.crypt decryption) the PyCrypto library

The easiest way is to install ActivePython (on Windows choose 32bit/x86 version even if you have 64bit windows):
It’s available for Windows, Linux and Mac. However in my HowTo, I focus on Windows.

and then run install pyCrypto.bat (contained in this archive)

Now run whatsapp_xtract_android.bat or whatsapp_xtract_android_crypted.bat or whatsapp_xtract_iphone.bat

OR simply drag and drop the database file(s) to whatsapp_xtract_drag’n’drop_database(s)_here.bat

OR whatsapp_xtract_console.bat and then manually specify the input file with one of these commands:


For Android DB:
python whatsapp_xtract.py msgstore.db -w wa.db
OR (if wa.db is unavailable)
python whatsapp_xtract.py msgstore.db
OR (for crypted db)
python whatsapp_xtract.py msgstore.db.crypt

For iPhone DB: (-w option is ignored)
python whatsapp_xtract.py ChatStorage.sqlite
Once finished, your browser will open and show the chats.
The resulting file size of the .html file will be slightly bigger than the size of the .db database.


Whatsapp_Xtract_V2.1_2012-05-10-2.zip (~ 835 KB)
install pyCrypto.bat
folder: data
samples of needed input files and Media folder

Some Additional Information


You also can open the “msgstore.db” and “wa.db” using SQLite Database Browser ( http://sqlitebrowser.sourceforge.net/ ).
However it is much more confusing and the messages are ordered by date, not by conversations. Also you won’t see the smileys and media files…



If you want to watch the videos, audios and images, you can click on the thumbnails and media links. Popups should open displaying the media.
However, online media files are available only for the last ~ 3 weeks.
But you still can open the offline media files, they are linked as well.
For this it is necessary to copy the folder “Media” from /sdcard/Whatsapp (Android) or net.whatsapp.WhatsApp (Iphone) to the certain folder of your computer where this tool is installed.



If you want to have the contact names displayed and not only phone numbers, then (Android version only) you need the file wa.db from the internal storage.

For that you need to get access to the folder
For that you need root access.
For rooting, the tool Superoneclick Root might be useful:

Then you can copy the files “msgstore.db” and “wa.db” to your computer by

– using the App RootExplorer (first copy to SD, then mount phone to computer)
– or using adb: open cmd and type “adb pull /data/data/com.whatsapp/databases/msgstore.db C:Whatsapp” (replace C:Whatsapp by the location of the certain folder of your computer)
– or using the app Titanium Backup. Use Titanium Backup to backup the full whatsapp application together with its data, copy the backup from the folder “TitaniumBackup” on the SD card to your PC, then extract the files “wa.db” and “msgstore.db” that you will find inside the Titanium Backup archive “com.whatsapp-[Date]-[some digits].tar.gz” to the certain folder.
– or using some app like AirDroid or Webkey to access files over wifi using the PC webbrowser

Download : Whatsapp_Xtract_V2.1_2012-05-10-2.zip(834 KB)
Find other version |
Read more in here : http://code.google.com/p/hotoloti/ – http://blog.digital-forensics.it