Friday, May 16, 2014

pflupg-tool : unpack Philips SmartTV firmware

pflupg-tool is an unpacking tool for Philips SmartTV firmware (Fusion platform). If your firmware is encrypted, you have to provide the corresponding public key (public exponent + modulus).

You can add public keys in pflupg.h file:
#define PUBLIC_KEYS_CNT 2
// { name, public exponent e (hex string), modulus n (hex string)}
static const char *public_keys[PUBLIC_KEYS_CNT][3] = {
{"my_key_1", "010001", "AABBCCDD"},
{"my_key_2", "010001", "010E020F"}
};


Usage: ./pflupg <upg_filename> [key_name]
2 keys available :
* my_key_1
* my_key_2

Source code can be found on GitHub. You'll need Libgcrypt library to compile it.

1 comment:

  1. I got errors compiling it on ubuntu:
    cc -lgcrypt -o pflupg pflupg.o
    pflupg.o: In function `decrypt_upg_signature':
    pflupg.c:(.text+0x173): undefined reference to `gcry_mpi_scan'
    pflupg.c:(.text+0x18a): undefined reference to `gcry_strerror'

    Need to change makefile to move libs at the end.
    cc -o pflupg pflupg.o -lgcrypt

    ref: http://stackoverflow.com/questions/1517138/trying-to-include-a-library-but-keep-getting-undefined-reference-to-messages

    ReplyDelete