Giter Site home page Giter Site logo

0xholdhand / wechat-decipher-macos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nalzok/wechat-decipher-macos

0.0 0.0 0.0 21 KB

DTrace scripts to extract chat history from WeChat on macOS

License: MIT License

JavaScript 57.32% Python 4.28% DTrace 38.40%

wechat-decipher-macos's Introduction

WeChat Deciphers for macOS

This project is grouped into three directories

  • The directory macos/ holds DTrace scripts for messing with WeChat.app on macOS.
    • eavesdropper.d prints the conversation in real-time. It effectively shows database transactions on the fly.
    • dbcracker.d reveals locations of the encrypted SQLite3 databases and their credentials. Since it can only capture secrets when WeChat.app opens these files, you need to perform a login while the script is running. Simply copy & paste the script output to invoke SQLCipher and supply the respective PRAGMAs.
  • In pcbakchat/ you can find scripts to parse WeChat's backup files.
    • gather.d gathers several pieces of intel required to decrypt the backup.
  • In devel/ resides utilities for further reverse engineering. They are intended for hackers only, and the end-users of this project are not expected to use them.
    • xlogger.d prints the log messages going to /Users/$USER/Library/Containers/com.tencent.xinWeChat/Data/Library/Caches/com.tencent.xinWeChat/2.0b4.0.9/log/*.xlog. I made this script destructive to overwrite the global variable gs_level.
    • protobuf_config.py describes the protobuf format used by the backup files for protobuf-inspector.
    • __handlers__/ contains some handlers to be used with frida-trace.
    • init.js contains the helper function for frida-trace.

Dependencies

Since dtrace(1) is pre-installed on macOS, no dependencies are required to run the scripts. However, you may need to disable SIP if you haven't done that yet. In addition, you'll need SQLCipher to inspect the databases discovered by dbcracker.d.

For some scripts in devel, you will also need Frida and a (preferably jailbroken) iOS device.

Usage

For DTrace scripts, launch WeChat and run

sudo $DECIPHER_SCRIPT -p $(pgrep -f '^/Applications/WeChat.app/Contents/MacOS/WeChat')

replace $DECIPHER_SCRIPT with macos/dbcracker.d, macos/eavesdropper.d, pcbakchat/gather.d, or devel/xlogger.d.

The stuff in pcbakchat/ is a little involved. See usage.md for more details.

Will Tencent ban my WeChat account?

Hopefully not. Most processing is done offline on the macOS client, and the overhead of DTrace should be negligible, so there is little chance they will catch you.

Version Information

The production of these scripts involved an excess amount of guesswork and wishful thinking, but at least it works on my machine :)

Device Type: MacBookPro14,1
System Version: Version 10.14.6 (Build 18G8022)
System Language: en
WeChat Version: [2021-04-02 17:49:14] v3.0.1.16 (17837) #36bbf5f7d2
WeChat Language: en
Historic Version: [2021-03-29 20:23:50] v3.0.0.16 (17816) #2a4801bee9
Network Status: Reachable via WiFi or Ethernet
Display: *(1440x900)/Retina

wechat-decipher-macos's People

Contributors

nalzok avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.