Giter Club home page Giter Club logo

signal_for_android_decryption's Introduction

Signal for Android backup decryption tool

This repository contains an (unofficial) tool which decrypts backup files produced by the Signal Android app.

What this tool is not:

  • This tool does not export the backup data into a ready-to-use format, it simply decrypts the SQLite database and binary blobs within the backup file and leaves the rest up to you to work out.
  • This tool does not support backup files produced by the iOS Signal app.
  • This is not an official product from the Signal team. It depends on internal implementation details gleaned by reading the source code of the Signal for Android app. While it appeared to work circa January 2021, this tool may break in the future.

For a walk-through of the Signal for Android backup format, see this article on my website. If you just want to get going; keep reading!

Dependencies

This tool is designed to run under Python 3.7+.

You can install the required Python dependencies as follows:

$ pip install -r requirements.txt

Optionally, you may rebuild the Protocol Buffer Python module:

$ protoc -I=. --python_out=. Backups.proto

Usage

Generate a backup using the Signal app (see the Signal support pages for details). Be very careful to write down the generated passphrase correctly. If you have a large number of photographs and videos within any of your groups the backup process can take several hours.

You can then decrypt the backup file as follows:

$ python decrypt_backup.py path/to/signal.backup path/to/output/dir

The tool will prompt you for your backup passphrase (spaces are optional) and then extract the backup file into the specified output directory.

The backup will be decrypted into the directory you specified. The extracted files are organised as follows:

  • database.sqlite: A dump of the SQLite database used by the signal app. This database is home to all of backed up messages and metadata aside from media files. The contents of this database are implementation defined and it is up to you to work out how to extract the information you want.
  • preferences.json: A JSON file containing the 'preference' data encoded by the backup. Despite the existance of this file, most application preferences are stored in the SQLite database.
  • key_value.json: A JSON file containing the 'key-value' data encoded by the backup.
  • attachments/*.bin: Binary files attached to messages sent or received (e.g. photos and videos). These are named based on their unique_id as used in the database. To infer the correct file extension you'll need to lookup the MIME type in the database or guess based on the contents of the file.
  • stickers/*.bin: Binary files containing sticker graphics used in chats. See also: attachments.
  • avatars/*.bin: Binary files containing avatars images given to contacts and groups. See also: attachments.

A final obvious warning: all decrypted files are...unencrypted(!). You should make sure to only perform decryption on a trusted device backed by sufficiently secure storage for your needs.

signal_for_android_decryption's People

Contributors

brainy avatar mossblaser 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.