Page 1 of 1

Decoding smk/cmk

Posted: Sun Jan 06, 2013 2:38 pm
by dec0ding
I have discovered AES keys to decrypt all SMK files from samsung SDK emulator 2012.
You need openssl binaries.
Copy "C:\Program Files (x86)\Samsung\Samsung TV SDK(3.5.2)\Emulator\Emulator2012_v3.5\commonlib" to your location and then run decryptall.cmd

Code: Select all

-- decryptsmk.cmd ---
set INFILE=%1
set OUTFILE=%~dpn1
set OPENSSL=C:\openssl-win64\bin\openssl.exe
"%OPENSSL%" aes-128-cbc -d -K 84AA59959849F6DDD4823B90F7913902 -iv 1DA76DE2A0EE55C0DBCCEDA772E3684D -nopad -in "%INFILE%" -out "%OUTFILE%"
-- decryptsmk.cmd ---

Code: Select all

--- decryptall.cmd ---
set DSMK=%~dp0decryptsmk.cmd
for /R %%f in (*.smk) do "%DSMK%" "%%f"
--- decryptall.cmd ---

Decrypted files have padding at the end. Count of bytes to be stripped from the end inside the last byte of decrypted file.

cmk files are encrytped with RSA. private RSA key inside the TV somewhere inside exeDSP.
need to go there and dig for it.

Re: Decoding smk/cmk

Posted: Sun Jan 06, 2013 2:45 pm
by juusso
Hi! Interesting stuff! Perhaps we need to move this post to
viewtopic.php?f=48&t=4994 ?

Waiting for further research results :)

Re: Decoding smk/cmk

Posted: Sun Jan 06, 2013 2:53 pm
by dec0ding
Oh, looks like i'm inventing the wheel :)
I spent some time in IDA to crack wps.dll to find SMK keys and was really prepared to dump exeDSP process from my UE40EH or GDB it inside the shell
Keys in your topic work well
Thanx !

Re: Decoding smk/cmk

Posted: Sun Jan 06, 2013 2:54 pm
by juusso
Thank you and welcome! Glad to know someone is working on it ;)
We have a lot of delicious here, just need to check time to time. Don`t stop to debug exeDSP, this kind of research is most wanted :roll: