Hakowanie telewizora Samsung – Seria 7
Napisał Aiv w kategorii Hacking, tags: Linux, samsung, tv, xorSamsung wypuścił na rynek telewizory LCD – Seria 7. Podczas aktualizacji firmware bardziej zainteresowani użytkownicy mogli zauważyć, że w pakiecie aktualizacyjnym mamy pliki/katalogi:
MicomCtrl crc ddcmp rc.local run.sh.enc image image/appdata.img.enc image/exe.img.enc image/info.txt image/serial_temp image/validinfo.txt image/version_info.txt
Plik rc.local jasno pokazuje, że mamy do czynienia z systemem Linuxowym. Pliki crc, ddcmp, MicomCtrl to wykonywane plik systemu Linux:
crc: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped ddcmp: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped MicomCtrl: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
Plik run.sh.enc (jak sama nazwa wskazuje) jest zakodowany. Szybka analiza pliku i kilka prób pokazało, że jest to kodowanie XOR kluczem: T-CHU7DEUC. Później okazuje się, ze klucz ten zapisany jest w kilku miejscach (nazwa archiwum, plik info.txt). Plik można zdekodować pisząc mały program, albo użyć gotowego rozwiązania, jakim jest program xor-enc z pakietu xor-analyze (http://www.habets.pp.se/synscan/programs.php?prog=xor-analyze)
Tym samym kluczem możemy zdekodować pozostałe pliki.
Plik appdata.img to obraz systemu plików Squashfs. Używając oprogramowania unswuashfs (http://squashfs.sourceforge.net/) możemy rozpakować plik, bez potrzeby montowania go w systemie.
Plik exe.img to obraz systemu plików FAT16 stworzony przez bibliotekę libfat. Można go bezpośrednio podmontować pod linuxem, komendą mount -t vfat -o loop exe.img katalog.
Poniżej zamieszczam listing plików znalezionych w ww. obrazach.
appdata.img:
APPDATA_IMG_VER Demo Demo/frc_120-2.bmp Demo/frc_120.bmp Demo/frc_240-2.bmp Demo/frc_240.bmp Demo/pdp_100.bmp Demo/pdp_1080.bmp Font Font/TTX.ttf Font/mheg.pfr Font/mhegnz.pfr Font/shadow.ttf Images_960x540 Images_960x540/AppList Images_960x540/AppList/appList_logo.bmp Images_960x540/ContentsManager Images_960x540/ContentsManager/InfoMsgBox.bmp Images_960x540/ContentsManager/InfoMsgBox_476x283.bmp Images_960x540/ContentsManager/InfoMsgBox_477x100.bmp Images_960x540/ContentsManager/InfoMsgBox_477x154.bmp Images_960x540/ContentsManager/InfoMsgBox_517x183.bmp Images_960x540/ContentsManager/InfoMsgBox_udn.bmp Images_960x540/ContentsManager/arrow_bottom.bmp Images_960x540/ContentsManager/arrow_top.bmp Images_960x540/ContentsManager/bg Images_960x540/ContentsManager/bg/sub_management_bg.bmp Images_960x540/ContentsManager/btn_focus.bmp Images_960x540/ContentsManager/btn_n.bmp Images_960x540/ContentsManager/button sel.bmp Images_960x540/ContentsManager/button.bmp Images_960x540/ContentsManager/charge.bmp Images_960x540/ContentsManager/charge_ko.bmp Images_960x540/ContentsManager/check_bg.bmp Images_960x540/ContentsManager/check_select.bmp Images_960x540/ContentsManager/copy box.bmp Images_960x540/ContentsManager/down_dim.bmp Images_960x540/ContentsManager/down_normal.bmp Images_960x540/ContentsManager/download.bmp Images_960x540/ContentsManager/free.bmp Images_960x540/ContentsManager/free_ko.bmp Images_960x540/ContentsManager/helpicon_B.bmp Images_960x540/ContentsManager/helpicon_Y.bmp Images_960x540/ContentsManager/helpicon_exit.bmp Images_960x540/ContentsManager/helpicon_return.bmp Images_960x540/ContentsManager/icon_information.bmp Images_960x540/ContentsManager/information box4.bmp Images_960x540/ContentsManager/information box5.bmp Images_960x540/ContentsManager/listpopup_bottom.bmp Images_960x540/ContentsManager/listpopup_focus.bmp Images_960x540/ContentsManager/listpopup_middle.bmp Images_960x540/ContentsManager/listpopup_top.bmp Images_960x540/ContentsManager/loading_alpha_01.bmp Images_960x540/ContentsManager/loading_alpha_02.bmp Images_960x540/ContentsManager/loading_alpha_03.bmp Images_960x540/ContentsManager/loading_alpha_04.bmp Images_960x540/ContentsManager/loading_alpha_05.bmp Images_960x540/ContentsManager/loading_alpha_06.bmp Images_960x540/ContentsManager/loading_alpha_07.bmp Images_960x540/ContentsManager/loading_alpha_08.bmp Images_960x540/ContentsManager/loading_alpha_09.bmp ...
exe.img:
$rfs_log.lo$ Comp_LIB Comp_LIB/libavformat.so.52 Comp_LIB/libavcodec.so.51 Comp_LIB/libavutil.so.49 Comp_LIB/libptp.so Comp_LIB/libusb.so EXE_IMG_VER Factory.dat InfoLink InfoLink/lib InfoLink/lib/libmms.so InfoLink/lib/libFLVDemux.so InfoLink/lib/libPlApp.so InfoLink/lib/libHttp.so InfoLink/lib/libPCMOutput.so InfoLink/lib/libPl.so InfoLink/lib/libMP3Transform.so InfoLink/lib/libPlaybackEngine.so InfoLink/lib/libFileInput.so InfoLink/lib/libJi.so InfoLink/lib/libFFMpeg.so InfoLink/lib/libHttpInput.so InfoLink/lib/libCore.so InfoLink/lib/libRTMPInput.so InfoLink/lib/libHttpsInput.so InfoLink/lib/unzip InfoLink/lib/libMMFCore.so InfoLink/lib/libPhnd.so InfoLink/lib/libRTPInput.so InfoLink/lib/fontlist.info InfoLink/lib/libGCF.so InfoLink/lib/libTD.so InfoLink/lib/libAe.so InfoLink/lib/remoconfig.info InfoLink/lib/libTDImage.so InfoLink/lib/config.info InfoLink/lib/libMMSInput.so InfoLink/lib/libVideoOutput.so InfoLink/lib/libSDAL.so InfoLink/lib/widget.info InfoLink/lib/libglib-2.0.so InfoLink/lib/libAdi.so InfoLink/lib/keyconfig.info InfoLink/lib/libJs.so InfoLink/lib/libExtention.so InfoLink/lib/libWsal.so InfoLink/lib/plugin.info InfoLink/lib/libSui.so JadeTarget JadeTarget.cfg LifeScenario ReleaseInfo SpecialItemNumber.txt YWidget_LIB YWidget_LIB/libmms.so YWidget_LIB/libFLVDemux.so YWidget_LIB/libPCMOutput.so YWidget_LIB/libMP3Transform.so YWidget_LIB/libPlaybackEngine.so YWidget_LIB/libGeneDebug.a YWidget_LIB/libFileInput.so YWidget_LIB/libFFMpeg.so YWidget_LIB/libHttpInput.so YWidget_LIB/libYahooSDLHWAcceleration.so YWidget_LIB/libRTMPInput.so YWidget_LIB/libHttpsInput.so YWidget_LIB/libMMFCore.so YWidget_LIB/libz.so YWidget_LIB/libRCE.a YWidget_LIB/libRTPInput.so YWidget_LIB/libGCF.so YWidget_LIB/libTD.so YWidget_LIB/libYahooTimeManager.so YWidget_LIB/libPluginTvOEM.so YWidget_LIB/libTDImage.so YWidget_LIB/libMMSInput.so YWidget_LIB/libVideoOutput.so YWidget_LIB/libGDM.a YWidget_LIB/libSDAL.so YWidget_LIB/libglib-2.0.so ddr_margin edid edid/09L-P2-1920x1080-A1-2.ddc edid/GRU-ALLNH6-1.ddc edid/GRU-ALLNH7-1.ddc edid/GRU-ALLNH5-1.ddc edid/09P-P2-1920x1080-A1-2.ddc edid/GRU-ALLNH8-1.ddc exeDSP game_lib game_lib/libSDL_image.so game_lib/libungif.so game_lib/libpngGP.so game_lib/libGPlayerPorting.so game_lib/libsmpeg.so game_lib/libSDL_mixer.so game_lib/libSDL.so memalloc prelink.conf rc.local rc.local.rfs samdrv.ko value.bin
Ww. informacje zostały sprawdzone na tym archiwum. W przypadku innych paczek z firmware, istnieje duże prawdopodobieństwo, że hasło będzie zapisane w tych samych miejscach.
Być może już wkrótce opiszę ciekawe modyfikację oprogramowania telewizora Samsung Series 7.
Wpisy (RSS)
fajne znalezisko
można sobie zrobić skórkę do telewizora
linux is everywhere nawet w telewizorze
Skórka jak skórka. Jakby wsadzić Operę lub Firefoxa to by było coś.
No i jak tam temat? Czy zbliża się to „wkrótce”?
Ciekawe czy można do takiego linkuxa włożyć np. Firefoxa (jak pisałprzedpiszca) i obsługę klawiatury pilotem. To byłoby niezłe.
))
Albo Thunderbirda czy klienta torrentowego
Komputer byłby niepotrzebny
Mój „dostęp do tego tv” jedzie na wakacje
a ostatnie próby zdumpowanie telewizora nie udały się z racji braku czasu (ale pewien postęp jest).
Zakładając, że udało by się wgrać swojego kernela, to podłączenie klawiatury na usb to nie był by problem.
Z firefoxem może być trochę gorzej, bo ekran jest obsługiwany przez inny procesor.
Na razie zmierzamy do zdumpowania telewizora, żeby można było uruchomić go na emulatorze i pobawić się w „offline”.
Ja równolegle prowadzę inny projekt (związany nawet z łamaniem samsunga), o którym pewnie niedługo napisze coś więcej – uruchomienie Linuxa na telefonie Sony Ericsson X1i (znany też jako HTV Venus albo HTV Kovsky)
No to czekamy na nowinki
czy ten sofcik będzie równiez na ….B7000 ?
Z tego co widziałem dekompresja firmware działa na wszystkich TV z Serii 7 i 8.
Pewnie starsze TV, w których można zaktualizować firmware też opierają się o te same zasady.
No to czekamy, czekamy
Serdecznie pozdrawiam
Prof2k
Hi Mariusz,
what you have discovered sounds really interesting!
It’d be great to see, if one could get a telnet deamon started and then logon via the Network interface.
Curiously watching this thread
Regards
dynamic1969
Hi Mariusz,
Thank you for sharing what you figured out. Today Samsung has released updated firmware for the LE40B650T2P variant (= 650 with CI+) as well.
Unfortunately it uses a new encryption scheme.The files have a ‘.sec’ extension instead of ‘.enc’ and start with the string ‘Salted’.
Searching exeDSP of the T-CHU7DEUC firmware for this string shows that the new method already has been built into that version.
Maybe with disassembling exeDSP we can find out the new scheme as well, but it won’t be trivial.
Also it looks like the updates have been digitally signed, so enhancing the firmware with a telnetd for example won’t be easy
Regards,
Bastiaan
@b457144n first ideas:
last 3 chars of sec files are the same – 256
if you read 256 chars before this value you got some other value (possible in hex). Maybe it’s checksum, maybe not
Assume that tv need to know kthe ey, key must be stored in firmware package or hardcoded in tv.
Hi,
telnet access on the Samsung UE46B70xx is now possible and confirmed to be working.
Check out following Thread ( posting 86 onwards ) for a high level description of approach taken: http://www.avsforum.com/avs-vb/showthread.php?p=16849932
Same concept should be possible on other recent models of Samsung LCD/LED TVs.
Next steps are to get a toolchain/buildroot established … let’s see what all is possible
Regards
dynamic
@mariusz,
yes, I’m afraid that those last 256 chars may be some digital signature. exeDSP has stuff like ‘ SWUDsaVerify’ and ‘error readpubkey’
It looks like a lot of parameters related to this are stored in files under /mtd_rwarea/secureSWU/. Also /mtd_rwarea/secpub.key looks interesting. Now to get access to them….
@dynamic1969,
thanks for the link. Looks like the make serious progress. Unfortunately their work is not usable for my TV yet, but maybe it can help breaking the new encryption scheme as well.
BTW do you have telnet access to your TV already? In that case, could you post a tarball of /mtd_rwarea? Thanks!
Bastiaan
@b457144n:
Yes, I have telnet access to the device. Have put the desired tar-file here … http://c2a2b2.com/arm_samsung and also included the „ls -alR” output.
Unforunately secureSWU is empty and there is also no secpub.key in mtd_rwarea.
As far as I can see this directory is only ( mounted or filled ) filled during a secure Update process, which we need to still find out.
As mariusz is saying, the key must be available somewhere in the FW … but where.
Regards
dynamic1969
@dynamic1969:
thanks for the tarball. Pity it does not contain the secureSWU stuff.
It would be interesting to see what exeDSP does when you try to feed it a fake secure update for T-CHL7DEUC. Have you ever killed and restarted exeDSP? Is that possible? In that case running it with strace would get us a lot of information.
Regards,
Bastiaan
@b457144n
I eventually got a serial console working on the 7 Series.
The good thing about this is, that it should also work equally on other devices ( also those where we were not yet able to decrypt OpenSSL encrypted FW ).
See http://www.avsforum.com/avs-vb/showthread.php?p=16964905#post16964905 for further details on the HOWTO.
With the console access, there are many simple ways to directly alter the ( already decrypted ) FW
Hope this helps!
Regards
dynamic
mailto: dynamic1969@gmail.com
I just wanted to tell, that samsung has published source code of used GPL utils in their visual display – check it out:http://www.samsung.com/global/opensource/. IMO Specially interesting is http://www.samsung.com/global/opensource/files/LE46A956.zip which provides e-mail (korean), how opensource is handled in Samsung.