I am analysing an embedded system running QNX on armle, uname -a
identifies it as:
QNX mmx 6.5.0 2012/06/20-13:49:13EDT nVidia_Tegra2(T20)_Devlite_Boards armle
Firmware updates come with a file called metainfo2.txt
which always ends with a signature block, eg:
[Signature]
signature1 = "a73e111de512e09bad2dc08eff685a38"
signature2 = "4fc032192a20fd1e242ad64af5b509a7"
signature3 = "6a7432f754aff0d6b74a7ec2072cbb11"
signature4 = "e91f68f569508b77712d1869edd6d0b9"
signature5 = "923eb77ba815dba8e44d5e09412cdf2e"
signature6 = "830518f3b38d48df892a3a0c65cc67f1"
signature7 = "09e5e0f5f06ce0376d032ab21051510f"
signature8 = "3dab7f75fcdf54a96d8aa7f3c617f76d"
This looks like it's a RSA encryption and is used to determine if the file contents were changed. I think it's a hash of a particular section of the file: MetafileChecksum = "ec5afd6459c3579ebed8841cc41fe17bb61b814d"
I found a folder with public keys which has a subfolder name MetainfoKey and contains likely the public key, a 288 byte file:
C0 F3 89 EE C7 B6 6C 9D C7 36 50 8F F8 8A EB 1F
B1 13 94 2E AD 02 08 14 D0 8D 29 E8 68 F1 4B 20
86 BC D7 DD CC BA 75 59 F9 99 E7 6D 24 61 96 60
BB E1 74 34 DA 59 98 80 87 F2 A9 9C D4 65 B1 FF
42 35 22 B7 8C B0 DE 46 3A 66 96 13 D3 56 DF A9
E8 6E 0E 2E 0B 6D AB 5D E8 91 31 C5 A0 72 7A EA
B1 76 72 78 AB 10 1D CD 9C 3C FC 10 26 70 5C 1D
AB 3B F5 3B F5 0A FA FB 3F 52 DA 2C EB 0B EE 57
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03
83 0A CD 65 56 FC 2F B4 7B 1B 67 43 12 E3 4E 7A
0A AD 1E DF BA 7E B2 79 D9 51 3A DB 10 16 61 48
13 1B BA 9C 85 2A B7 01 91 49 16 65 62 94 61 6B
B1 A9 B8 F8 46 2E BC 20 6D E5 7F 53 AF EF 00 00
53 AB 8E 4F 63 29 BF 00 B0 ED 45 E8 E9 20 67 8E
F6 7A F8 BC CB 7B 4D CF 88 01 59 BB CB F1 B1 04
D4 A1 C0 57 70 AA D7 38 E8 BD 9A 28 4E 94 99 5C
B7 96 49 28 5A C4 04 9C 6B 57 8F C5 4F 74 6A C9
My objective is to be able to change metainfo2.txt
and a possible method could be to replace the public key with a new one but I need to understand how the signature section is used to verify the file contents. I am looking for answer or pointers on how to achieve this...