<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>shapeshifter.se &#187; verimatrix</title>
	<atom:link href="http://www.shapeshifter.se/tag/verimatrix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shapeshifter.se</link>
	<description>Mostly miscellaneous technical mumbo-jumbo.</description>
	<lastBuildDate>Mon, 11 Jul 2011 14:19:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Behind the scenes of Telias IPTV</title>
		<link>http://www.shapeshifter.se/2008/04/01/behind-the-scenes-of-telias-iptv/</link>
		<comments>http://www.shapeshifter.se/2008/04/01/behind-the-scenes-of-telias-iptv/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 21:30:37 +0000</pubDate>
		<dc:creator>fli</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[iptv]]></category>
		<category><![CDATA[kreatel]]></category>
		<category><![CDATA[streaming]]></category>
		<category><![CDATA[telia]]></category>
		<category><![CDATA[verimatrix]]></category>

		<guid isPermaLink="false">http://www.shapeshifter.se/?p=36</guid>
		<description><![CDATA[I ceased messing around with this a long time ago as I no longer have the iptv box in my possession
Well, not really behind the scenes. But these are my findings of how Telias IPTV works. The original reason behind this is that I would like to stream the channels to my computers.
The base of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I ceased messing around with this a long time ago as I no longer have the iptv box in my possession</strong></p>
<p>Well, not really behind the scenes. But these are my findings of how Telias IPTV works. The original reason behind this is that I would like to stream the channels to my computers.</p>
<p>The base of it all is a series of multicasted UDP streams in the range 239.16.16.0/24, including both the actual channels and box configuration/firmware. The program guide is more or less a normal web side accessed over HTTP.</p>
<p>The hardware involved is a Zyxel <span class="contentbold">Prestige 660H Triple Play and the Motorola/Kreatel 1510 STB. To connect to the IPTV service using a normal network one have to hook up the IPTV-port of the Zyxel modem directly to a computer. Sniffing the traffic to/from the STB can be done by simply bridging two interfaces and using the box as normal. It&#8217;s also possible to enable the IPTV service on one of the unused ports by reconfiguring the modem (to get two output ports).<br />
</span></p>
<p><!-- WSA: rules for context 'adsense-post-top' did not apply --></p>
<p><span id="more-36"></span></p>
<h3>Getting an IP-address</h3>
<p>The DHCP request to Telias server must contain the following option, otherwise, their server won&#8217;t respond.</p>
<blockquote><p>Option(60) Vendor-class-identifier XX XX XX XX XX</p></blockquote>
<p>The XX-string is a 5 byte value that is rumored to be some sort of serial number. I haven&#8217;t found any hard evidence of this as my value doesn&#8217;t match any of those on the box. The following should be enough configuration (dhclient.conf) of the ISC DHCP client to send the correct option.</p>
<blockquote><p>send vendor-class-identifier XX:XX:XX:XX:XX;</p></blockquote>
<p>Once the interface has been bound to an address the connection should work just like a normal Telia ADSL connection, the PTR record of the address is a subdomain to digitaltv.telia.com.</p>
<h3>Boot sequence of the Kreatel/Motorola 1500 box</h3>
<p>During the boot sequence (after DHCP) the box joins the multicast group 239.16.16.202 which distributes the initial configuration over something called infocast2, UDP port 5555.  Among other things the local time and a xml file containing  a  &#8220;portal URL&#8221; which is http://iptvlogin.telia.se/iptvgui/initial.html this page displays the initial &#8220;hour glass&#8221; one sees when booting the box.</p>
<p>Next, depending on the revision of the box it will download its firmware based on the configuration file, they  point out further multicast groups to join. The following was valid during writing</p>
<p><strong>kreatel-ip-stb-rev-4, kreatel-ip-stb-rev-6, kreatel-ip-stb-rev-11</strong></p>
<blockquote><p>bc_kernel_addr 239.16.16.205:5555<br />
bc_kernel_name software_1500<br />
bc_root_addr 239.16.16.205:5555<br />
bc_root_name software_1500<br />
bc_splash_addr 239.16.16.204:5555<br />
bc_splash_name splash-data_mipsel</p></blockquote>
<p><strong>kreatel-ip-stb-rev-9, kreatel-ip-stb-rev-13, kreatel-ip-stb-rev-15</strong></p>
<blockquote><p>bc_kernel_addr 239.16.16.209:5555<br />
bc_kernel_name software_1500_secure<br />
bc_splash_addr 239.16.16.210:5555<br />
bc_splash_name splash-data_mipsel_secure</p></blockquote>
<p>What do you know, seems like the box is based on a MIPS CPU (not that surprising)</p>
<blockquote><p>software_1500: ELF 32-bit LSB executable, MIPS, version 1 (SYSV), statically linked, not stripped</p></blockquote>
<p>The firmware &#8220;software_1500_secure&#8221; just identifies as &#8220;data&#8221; and has the first 3 bytes set to &#8220;SEC&#8221;, encrypted ELF file perhaps?</p>
<p>This data (configuration and firmware) can be extracted with the <a href="http://sourceforge.net/projects/infocast2tools/">Infocast2Tools</a>. The package contains a server and a client. Simply start the client with the multicast address of interest and start the box.</p>
<h3>Streaming TV to VLC</h3>
<p>Viewing a channel is as simple as joining the correct multicast group, unfortunately,  some channels are encrypted/scrambled. All channels are streamed over UDP/5555 using ISO/IEC 13818 MPEG-2.</p>
<p>Viewing is as simple as</p>
<blockquote><p>vlc udp://@239.16.16.1:5555</p></blockquote>
<p>The following channels are currently not scrambled (Swedish)</p>
<ul>
<li>239.16.16.1 &#8211; SVT1</li>
<li>239.16.16.2 &#8211; SVT2</li>
<li>239.16.16.21 &#8211; TV4</li>
<li>239.16.16.35 &#8211; canal+ sport? (I&#8217;m not sure which channel this actually is)</li>
<li>239.16.16.44 &#8211; Telia/Comhem info</li>
<li>239.16.16.45 &#8211; Telia/Comhem info</li>
<li>239.16.16.46 &#8211; Telia/Comhem info</li>
<li>239.16.16.47 &#8211; Telia/Comhem info</li>
<li>239.16.16.65 &#8211; Disney channel</li>
<li>213.16.16.100 &#8211; Cartoon Network</li>
</ul>
<h3>Scrambled channels</h3>
<p>Not the whole stream is scrambled, but only individual sub-frames. These have the &#8220;Transport Scrambling Control&#8221; field in the ISO/IEC 13818 header set to 2 (User defined).</p>
<p>The box does not utilize a CA card, instead it has some software solution which I believe is VeriMatrix VCAS system for IPTV. During packet analysis I found that the box does a few TCP connections to hyca.iptv.telia.com (213.64.59.103) on ports 12697, 12698, 12699 and 12700. These connections turned out to be SSL connections involving two certificates issued by CA@Verimatrix.com for VCI.XXXX@TeliaSonera.com and  SUBCA.YYYY@TeliaSonera.com (XXXX/YYYY are integer strings, I don&#8217;t know if they are unique yet, I guess not).</p>
<blockquote><p>Certificate (pkcs-9-at-emailAddress=CA@Verimatrix.com,id-at-commonName=Verimatrix ROOT CA,id-at-organizationalUnitName=VCAS,id-at-organizationName=Verimatrix,id-at-localityName=San Diego,id-at-stateOrProvinceName=CA,id-at-countryName=US)</p></blockquote>
<p>The Verimatrix website describes a &#8220;Video Content Authority System&#8221; that utilizes public/private keys, my guess is that ones identification code or control code is sent to their system over this channel and a decryption key is returned which can be used to decrypt the scrambled frames.</p>
<p><strong>Figuring out what to send and which decryption method that is used (the VeriMatrix web page talks about AES) is the key to stream scrambled channels to a normal computer or to a HTPC.</strong></p>
<p>Further studies of their product sheets/white papers reveals that each channel stream gets its own encryption key. If this really is the case, the authorization key one receives from Telia when signing up for the service (the key one has to enter into the STB to be able to use it) can only be used to control which encryption keys that are sent from the their key server to the STB.</p>
<p>Update: Seems I was partially right and partially wrong about the TCP connections. The connections to 12697 and 12699 are SSL connections, however the connections to 12698 and 12700 are not.</p>
<p><p style="text-align: center">
<script type="text/javascript"><!--
google_ad_client = "pub-7253244077368468";
/* 468x60, created 5/24/08 */
google_ad_slot = "5533244126";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shapeshifter.se/2008/04/01/behind-the-scenes-of-telias-iptv/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>

