Samsung SMT-C7140 HD PVR: Decrypting recordings

This is general talk area for things that NOT RELATED WITH TV! Instead, about internal works like web site, forum, wiki, or talking, etc...
Post Reply

Flitskikker
Posts: 3
Joined: Thu Jul 25, 2013 7:02 pm

Samsung SMT-C7140 HD PVR: Decrypting recordings

Post by Flitskikker »

Hi all,

Intro
Recently I got a new tv subscription, which ships with an HD PVR; the Samsung SMT-C7140.
I did some research and I found out that there's no support for FTP or reading the HDD so I can view the recordings on my pc, due to "copyright issues". Other brands do allow this (such as Humax), but I don't want to spend additional money on that.
Thanks to a member from another forum (if you read this: thanks again!), I managed to get some progress, namely I'm able to get the recordings from the device, but I cannot play them. I'll write up what I have below. I am hoping that you, with all the experience from RE'ing Samsung TVs, are able to help me by identifying this device's way of storing recordings (like BD players use D series techniques) so I can watch them on my pc.

Accessing the storage
The device has a built-in media library, with a basic file browser, and supports reading from USB devices. Besides FAT, it supports EXT and XFS partitions.
Thus, using a Ubuntu VM, I formatted a USB drive as EXT3 and added a symlink to / (root). I can now access the device's internal storage and copy files to my USB drive using the media library file browser. It appears the device is running on a custom version of Linux.

Connectivity
The device is connected to my network using a Wi-Fi dongle. I did a quick port scan, but nothing seems to be open, unfortunately.

Stored recordings
The storage of the recordings seems to be divided in three sections:
  • One file with an overview of all recordings
  • Recording metadata
  • Raw recording files
I've made a short recording for this write-up, for which you can find the link at the bottom of this post.

Recording overview
These are stored in a (partly Polish) XML file as /mnt/system/ccht.xml.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<KeszItems Stamp="1374660770" >
<Plik F="/hdd/goss4#rec#.tv" N="Teen Cribs" D="38" Date="1374667890" Ch="MTV" VP="xmlTVRC:" W="False" />
</KeszItems>
Each recording is stored as a "Plik" (= file) tag with the following attributes:
F: Folder path to metadata
N: Name of recorded show
D: Duration in seconds
Date: Timestamp of recording
Ch: Recorded channel name
VP: Video protocol?
W: Unknown (always False for me)

Recording metadata
These are stored in a folder called /hdd/XXXXX#rec#.tv with XXXXX being 5 alphanumeric characters, or ".ts" for the timeshift buffer. The folder contains the following (extension-less) binary files (I don't have RE experience, so not everything is known to me):
md: Some index as header, contains metadata (show info) and paths to raw recording files
mga: Contains the same metadata, followed by some index or checksums
mga1: Unknown, some checksum? The same for all my recordings so far

Strangely enough, some metadata are inside the show info (e.g. "Weekly news ov ENG erview").

Raw recording files
The raw recording files are stored in /mnt/hdd/.vfs/X/X/X/XXXXXXXX with X being a random letter between A and M. Because of this deeply nested structure and random names, finding recording files is not that easy.

From the "md" file, one can find the files for a specific recording. For my short recording, they are:
.vfs/f/a/e/hfglblfe
.vfs/g/d/g/cjbafbcf
.vfs/e/g/b/ekmikead
.vfs/f/c/i/fiddflek
.vfs/k/j/k/ebjlbgfe

The first file is ~25 MB and contains the video. All the other files seem to be index files, except the forth one, which contains the show info metadata (three times, strangely enough. Probably previous and next show, which were the same show because of a marathon).
When I remove the 512 bytes empty header from the large file, I can "play" it with VLC. Here's the media info:

Image

However, the video is blockery, there is no audio (or completely distorted) and the supposed subtitles don't work. I suppose it's encrypted with DRM.

Image

I've tried DRMDecrypt with the checksum(?) from "mga1", but it just says "OK" and spits out a zero-bytes file.

Firmware
I've created a partial firmware dump using the media library. However, not every folder could be copied successfully because of too many subfolders, files and symlinks that the device tries to copy everytime again (device keep saying "Please wait" forever and goes into stand-by eventually), or a copy error.
Everything except /dev, /sys and /proc should be complete. Maybe it can help you figuring out what this device does and uses. If you need a file from those three folders, let me know and I can copy the specific file instead of the whole folder.
Actually, I didn't test if I can copy files TO the internal storage. Maybe I can (and install a FTP client?). But there doesn't seem to be a port open so I can't execute commands for now.

Links

Code: Select all

Recording: https://mega.co.nz/#!W9JSWQqD!SbPBIRR1Cui4hldu_zU3JjRK1b9nllvmgm-rZ8FFaqk

Storage dump: https://mega.co.nz/#!G0Q0hKQI!cCA1B1WuQKP89K5hIPi0YiqdXUxD_c_thpDQhGCACGM
So...
The main thing I'm keen to find out is how to play the recordings on my pc. I can write simple tools that can read the .vfs file names from the metadata files, but figuring out the index, metadata and decryption are things that are way above my head. That's way I've come to this forum to see if there are experts here that can find out how the video files are encrypted. Maybe it's the same technique used for a TV that has been investigated thoroughly already.

I really hope you can help me out with this.
Thanks a lot in advance! :D
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Samsung SMT-C7140 HD PVR: Decrypting recordings

Post by juusso »

What is release year of this tv and what is firmware upgrade link on samsung page? Thanks
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
Flitskikker
Posts: 3
Joined: Thu Jul 25, 2013 7:02 pm

Re: Samsung SMT-C7140 HD PVR: Decrypting recordings

Post by Flitskikker »

It's not a TV but a set top box with PVR:
Image

But there are probably a lot of similarities between this device and Samsung's TV series.

I think the release date of this device is around July 2010. There are no firmware downloads on the Samsung website, but you can find a dump in my first post. If you a specific file from the device, let me know and I'll copy it for you.

However, I did found this on Samsung's Open Source site:
http://www.samsung.com/global/business/ ... -C7140.zip

Please note, if applicable, I have the SMT-C7140B variant, which appears to be specially made for my subscription provider. In the files I've copied, the company name is also visible in the file paths (/DEV/Companyname_SMT_C7140/sources...) and in some of the method names, so there may be some differences.

Here is some additional info about my device:
Firmware version: 1.01/1119
Software version: 015.002.627
It doesn't have an RS-232 port.

I hope you will be able to help me further. :)

Thanks in advance! :D

Cheers,
Flitskikker
mit1989
Posts: 1
Joined: Thu May 08, 2014 10:14 pm

Re: Samsung SMT-C7140 HD PVR: Decrypting recordings

Post by mit1989 »

I've got the exact same problem. Anyone got a solution yet?
Flitskikker
Posts: 3
Joined: Thu Jul 25, 2013 7:02 pm

Re: Samsung SMT-C7140 HD PVR: Decrypting recordings

Post by Flitskikker »

mit1989 wrote:I've got the exact same problem. Anyone got a solution yet?
I couldn't get it working, so I returned the PVR to the cable company and bought a Humax IHDR-5200c myself, from which you can just grab the recordings (unencrypted) using FTP.

Problem solved for me, but good luck if you find anything. :)

Post Reply

Return to “General”