how to extract and decrypt WeChat EnMicromsg.db on Android phone

One of my friend came to me with an Android phone. She saild somehting wrong with the hardware of her friend‘s phone, and her friend are eager to backup his data,especially  WeChat chat messages..unfortunatelly her friend forgot the accoutn/password to logon WeChat....What can I say..she is one of my best firend..I should do her a favor...

I took a look at this phone, and I found it "Rooted" already. That is a good news~ Some people root his/her phone in order to gain full access,but..guest what..There is an old saying:"Water is a boon in ther desert, but the drowning man cursed it". Rooted phones are easier to do physical extraction because Root privilege has been realeased. Those who try to operate full function of smartphones by Rooting his/her Android phone actually make smartphones more insecure..but to forensic guys, couldn‘t be better...

First I interviewed her to gather some basic info about the case. The scenario was that the version of WeChat is 6.0.1, but she had no WeChat account/password to logon to...That‘s all what I know about this case, and now I‘d like to explain what I‘m going to do.

1.Locate the WeChat EnMicromsg.db and export it to the forensics workstation you use.

2.Take a look at EnMicromsg.db..It‘s an encrypted database..we could not see what is inside..so we have to decrypt it...

3.Let me explian the encryption algorithm of WeChat EnMicromsg.db. The pragma key is the first 7 character of MD5(IMEI+WeChat UIN). That is it,very easy to calculate it. first figure out the IMEI,you have to options:

a. Dial *#06#

b. Take off back cover and battery and you could see some info including IMEI

4.Find out the WeChat UIN. UIN is the unique id# of WeChat account. The UIN is inside the file system_config_prfs.xml

5.Get the UIN value

6.Input the IMEI and UIN string,be carefully there is no need to add any symbol between these two string...Generate the MD5 value.. the key is the first 7 character as below: 9C751DC

7.Now the most import step. You need a tool - SQLCipher to decrypte the EnMicromsg.db with the pragma key we found. Since the SQLCipher is opensource, you could find some resource by searching the Gurdian Project on the internet. I show you the Windwos solution first. Notice that the version is 2.1

8. Use SQLCipher 2.1 to open EnMicromsg.db and input the pragam key

9.You could see the chat messages now...

10.You also could export those chat messages so you don‘t have to open database more often.

Finally, I encrypted the WeChat Enmicromsg.db for her. She‘s very happy with that. Couple days later I realized that it‘s her boy friend‘s smartphone...What a tradegy, I did not do it on purpose...Sorry buddy..Hope you will be alright this time...I think she will kill you if she found some ambigious chat messages in you phone..God bless you...

时间: 2024-09-30 20:02:25

how to extract and decrypt WeChat EnMicromsg.db on Android phone的相关文章

微信破解,解密?How To Decrypt WeChat EnMicroMsg.db Database?

原文地址:http://articles.forensicfocus.com/2014/10/01/decrypt-wechat-enmicromsgdb-database/ WeChat is a smartphone application where users can chat with their friends, share pictures, videos and audio chats. Users can also make free video calls and voice

直接利用Android手机破解微信加密数据库EnMicroMsg.db

※首先,简单介绍一下微信加密数据库EnMicroMsg.db的破解方法: 要先批评一下微信,居然用开源的数据库加密方式,这不是一破解一个准吗... 如果你的模拟器或者真机已经获得了root权限,就可以直接将记录聊天记录的数据库文件拷贝出来,数据库文件具体存放位置如下: 在/data/data/中: (题外话:android原生的模拟器root起来很复杂,推荐一款第三方模拟器:genymotion,很方便) ※我们拿到EnMicroMsg.db后,用常用的数据库管理软件打开,发现EnMicroMs

移动安全初探:窃取微信聊天记录、Hacking Android with Metasploit

在这篇文章中我们将讨论如何获取安卓.苹果设备中的微信聊天记录,并演示如何利用后门通过Metasploit对安卓设备进行控制.文章比较基础.可动手性强,有设备的童鞋不妨边阅读文章边操作,希望能激发大家对移动终端的安全兴趣. (文章内容存在一定攻击性,目的在于普及终端安全知识.提高安全意识,如有非法使用,后果自负) “如何获取Android.iPhone手机上的微信聊天记录? ” 0×00 条件: 安卓设备已获取root权限,安装SSHDroid(通过ssh.ftp连接手机) Apple设备越狱,安

DAC Usage2:通过Extract,Register 和 Upgrade DAC,实现DB Schema的Migration

一,Introduce Extract DAC 是从现存的DB中创建DAC,抽取DB Object的definition 和 与之相关的实例级别的元素,比如Login,以及Login 和User之间的关系. The extraction process creates a DAC package file that contains definitions of the database objects and their related instance-level elements. For

A look at WeChat security

原文地址:http://blog.emaze.net/2013/09/a-look-at-wechat-security.html TL;DR: Any (unprivileged) application installed on an Android phone can instruct WeChat to send an hash of your password to an external, attacker-controlled server. If you are a WeChat

凡聊过必留下痕迹-破解加密的WeChat数据库

有个朋友上门寻求协助,带着她朋友的朋友的手机,说是手机硬件有问题,想把手机内的资料都备份出来,尤其是WeChat的聊天内容…我跟她说,那iTool等工具不就可以帮上忙了吗?没想到她早就试过了, 说iTool根本找不到WeChat的数据库EnMicroMsg.db,看来她真的是很想取出数据哈~下足功夫了… 其实,取出WeChat数据库还不算是个问题,重点是在取出后,如何萃取出里头的聊天内容,因为WeChat在Android里可是默认加密的数据库哦~但朋友嘛,只好尽力而为,帮帮她喽~毕竟,”凡走过必

Android SQLite DB的封装

DbOpenHelper: package com.example.db_demo01.DB; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DbOpenHelper extends SQLiteOpenHelper { private static String

微信变声器(WeChat Voice)会是营销新利器吗

微信变声器(WeChat Voice)2.0 Android版开始内测了,时间从2015年5月20日 - 2015年6月20日,使用微信变声器改变你的声音,并分享给好友! 无论你是想装可爱还是恶搞,微信变声器一键帮你做到. make voice fun !本次更新内容主要有以下几点: 支持简体中文了(还有繁体中文和英文). 10多种变声效果,大叔.男神.女神.萝莉随便装. 录音和播放时,加入声波图效果. 除了发送微信好友.分享到朋友圈,还可以设为来电铃声.保存录音,或者分享到微博.QQ好友.QQ

Android微信数据导出

在Nexus 5(Android 4.4)+WeChat 5.4,和Nexus 5(Android 5.0)+Wechat 6.0上测试可用. 获取加密的sqlite3数据库EnMicroMsg.db 如果已经root过,可以下载/data/data/com.tencent.mm/MicroMsg/*/EnMicroMsg.db. 若没有root,则/data/data/com.tencent.mm下多数目录都不可读,可以使用下面的方法: 开启“开发人员选项”,选上“USB侦错” 电脑上执行ad