The instructions below DO NOT WORK with the new protocol version 1155.
See VMcam – Part II for updated information.
On the local fiber network, my ISP is providing IPTV streams which can be viewed with the help of their proprietary box called Amino. However, the problem with the Amino is that its interface is horrible and the box in general is just plain slow.
Time to find a solution for this and sniff some traffic on this thing. I quickly found out that the streams it uses are UDP multicast, but unfortunately they did seem to be encrypted. Luckily we have a solution for that and it’s called VMcam. VMcam is a small program which connects to the provider’s key server pretending to be the dreaded Amino in order to obtain the decryption keys for the IPTV streams. Here’s a short explanation on how to set it up, including some small hurdles I had to pass before it worked.
First of all you will have to obtain the program itself. You can either get the source from GitHub or https://jeweet.net/repo/source or you can choose to install a compiled version from the jeweet.net debian repo (amd64 only at the time of writing). Compiling your own binary from source is as easy as executing the following commands.
$ git clone https://github.com/macm00v/vmcam.git
$ cd vmcam
$ make && make install
Now you should have your vmcam binary in /usr/local/bin and you just have to set it up for proper use. To accomplish this, you should create /etc/vmcam.ini and adjust the following values to your need.
CACHE_DIR=[Cache directory, default /var/cache/vmcam] DEBUG_LEVEL=[Debug level] AMINOMAC=[MAC address of your Amino, format 010203040506] VCASSERVERADDRESS=[VCAS address] VCASSERVERPORT=[VCAS port] VKSSERVERADDRESS=[VKS address] VKSSERVERPORT=[VKS port] COMPANY=[Company name] KEY_INTERVAL=[Key update interval in seconds] NEWCAMD_PORT=[Newcamd listening port, default 15050, 0 to disable] CS378X_PORT=[CS378x listening port, default 15080, 0 to disable] LISTEN_IP=[Address to listen for Newcamd/CS378x connections, default 0.0.0.0 (all interfaces)] USERNAME=[Newcamd/CS378x username] PASSWORD=[Newcamd/CS378x password] DES_KEY=[DES key for Newcamd]
Now, pay special attention to the AMINOMAC and the various VKS and VCAS options. If you don’t know what to put here you can find out by sniffing the connections your Amino makes when it is connected to your ISP’s IPTV network. It will first connect to the VCAS server on two subsequent ports, followed by a connection to the VKS server on another port. In your config file, VCASSERVERPORT should be set to the very first port in the sequence and VKSSERVERPORT should be the third port number.
Note that from this point forward you should be connected to the network on which the IPTV streams are provided. This may require a special configuration of your network interface and DHCP client to mimic the Amino’s behaviour, which is outside the scope of this article.
The COMPANY option is a bit tricky to find out if you don’t know where to look. You can find it in plaintext in the packets captured from the Amino as a part of the following sequence:
Of course <COMPANY> here is your company name, <TIMESTAMP> is the current date and time (format: d/m/Y H:M:S) and <AMINOMAC> should be obvious.
The rest of the options should be pretty straightforward, but make sure that the cache directory exists and that the user that will be running vmcam has write permissions on it.
Now on some (if not all) setups, the encryption used on the key servers is terribly outdated, so newer versions of libssl will simply refuse to connect. This can be worked around by overriding the libssl library used by vmcam to an older version which supports DH keys smaller than 768 bits. Once you have this library, you should run vmcam as follows:
After setting this all up correctly, you should have a running softcam for your IPTV streams. You can connect either via Newcamd or CS378x to obtain the keys and use them to decode the streams in your favourite streaming server or DVR.
The addresses of the streams can be obtained either by sniffing traffic from the Amino while cycling through all the channels or by analyzing the original Amino interface data which is referenced in the DHCP lease message you will get when connecting to the IPTV network.
-Updated config file example to match the latest vmcam version
-Changed the port configuration part (thanks timmtim)
-New way to obtain the company name