Giter VIP home page Giter VIP logo

tvt-firmware-decryptor's Introduction

tvt-firmware-decryptor

This tool helps you decrypt and unpack new firmware upgrade files for TVT DVRs, versions 1.3.x and 1.4.x. Those files have the fls extension.

While this works for 1.4.2, it might not work for newer versions (and I'd actually expect it not to work, since currently TVT is using RSA keys incorrectly, see notes)

Required packages

If you want to unpack that firmware for some reason, you probably already have all the needed things, congrats! :)

But being more specific, to simply decrypt the file, you need Python 3 with PyCrypto.

To unpack the file, you also need:

  • git to fetch squashfs-tools
  • gcc, make, patch, libxz etc to build it
  • binwalk to extract the squashfs file

Let's go

git clone https://github.com/zb3/tvt-firmware-decryptor
cd tvt-firmware-decryptor

and simply

./unpack.sh FIRMWARE_FILE

or to only decrypt:

python3 decryptor.py FIRMWARE_FILE [OUTPUT_FILE]

Notes about repackaging

This tool doesn't contain any repackaging logic, my aim was only to unpack the firmware. But analysing decryptor.py will of course help a bit.

At first glance it appears that the firmware is signed with a RSA key, but actually what's embedded in the binary is the private key, see decryptor.py for more info.

Besides, the file has a checksum somewhere, but I didn't analyse that. For this you'd need to analyse the UpgradeTool binary in the unpacked filesystem.

Squashfs note

TVT replaced the XZ stream header magic with

E2 74 56 74 00 50 4B 47 B3 E3 00

and the XZ stream footer magic with

05 C5 00 74 56 74 5E

tvt-firmware-decryptor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mcw0 p2p-sys

tvt-firmware-decryptor's Issues

Good stuff!

Thanks, this made my day today!

Just FYI, this still working in late 2023. Not only for TVT, but also for their OEM.

Thanks for your work, much appreciated!

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.