EnMicroMsg.db-Password-Cracker icon indicating copy to clipboard operation
EnMicroMsg.db-Password-Cracker copied to clipboard

Dose not work on my database in Feb. 2018

Open ian-droid opened this issue 6 years ago • 3 comments

  • Mobile: Xiaomi 5 (Gemini) / MIUI 9 International.
  • WeChat: 6.6.2

Apparently I'd made a crippled Titanium backup of WeChat, and WeChat reports DB repairing is required when restored after a failed OTA upgrade of MIUI 9.

Since WeChat can't have the DB fully repaired, I decided to fix/dump it manually. I tried the crack_enmicromsg_db_(C_version).py against the db file on both my Laptop (i7-7700, Ubuntu 18.04) and AWS free tiny (Ubuntu 16.04.4 LTS) in the next week (mostly overnight work, resumed by editing pass_start manually). But it has no result.

From a study on Internet near the end of that process, I got the IMEI of my very old phone from systeminfo.cfg / compatibleinfo.cfg and find out the cipher key. The key can be used with tools like sqlcipher , SQLiteStudio(Windows), but when I re-run the crack_enmicromsg_db_(C_version).py from close pass_start, it can not found the key.

Not sure whether it's my problem and where is wrong, just file the issue for the record.

ian-droid avatar Mar 08 '18 21:03 ian-droid

@elflix It may result from any one of the four bytes (describing page size, write version, and read version) the c program checks being altered accidentally. You could double check with the python version, which should be more robust.

chg-hou avatar Apr 06 '18 03:04 chg-hou

@chg-hou The Python version found the key (C version failed) and dumped the correct output_db.db, but DB Browser for SQLite can't use the key to decrypt the original database. Any idea how to solve the problem?

jameswhqi avatar Oct 17 '18 09:10 jameswhqi

@jameswhqi Starting from wechat 7.x, they change the write/read byte in the header. I have updated the codes and now both C and python version could work well. DB Browser for SQLite uses different cipher settings than wechat. Please use the output_db.db directly or use other modified version of DB Browser for SQLite.

chg-hou avatar Apr 12 '19 11:04 chg-hou