Set-Top Box Anti-Piracy Code Neutralized By Hack
While legal IPTV platforms exist online, the acronym is also closely associated with services providing access to unlicensed live TV feeds.
These services can be easily accessed via a PC, tablet, or mobile phone, but many are accessed via Android-type set-top boxes. Another option is to use the MAG range of set-top devices available from Ukraine-based Infomir.
The company strongly disassociates itself from such infringing uses and in support of that announced last December that following complaints from rightsholders, it would prevent users from accessing allegedly-infringing portals.
“Upon receiving complaints from a copyright holder, Infomir is obliged to restrict access from its devices to any portal suspected of copyright infringement. The restriction will be maintained until the issue with the copyright holder is resolved,” the company said.
News of this action, or at least its effects, spread quickly among many IPTV users. Customers of several unlicensed services reported that portal URLs (the domain names used by devices to access IPTV services) had been blocked on their MAG devices and were no longer accessible.
Some providers changed their portal URLs in response but that was always destined to become a game of whac-a-mole. However, right from the beginning it seemed that MAG devices themselves contained the solution and it didn’t take long before that was confirmed.
In a post to Reddit, an unnamed developer using a ‘throwaway’ account revealed how he’d defeated the blocking system.
“I’ve spent the last few days digging around with [network analysis tool] Wireshark + custom firmware to see how this was working, and it turns out it’s quite simple and can be removed from all current firmware on all models that I’ve tested (250/254/256/322/324),” he wrote.
“We *could*, as people currently are, keep changing portal URLs – but this is not sustainable and as the box is phoning home on every boot, is more than likely just making it easier for Infomir to just re-block on the next wave of updates to the blacklist.”
The full breakdown is available on Reddit and indeed other places elsewhere but speaking with TorrentFreak the developer offered to put some more meat on the bones.
‘Thr0wawayicus’ told TF that when connected to the Internet, MAG devices use encryption to access a URL on Infomir’s servers. This results in the creation of a file called dls.backup on the local device.
“The encrypted communication is made up of an HTTPS connection to the mentioned URL,” he said.
“I can only guess at the contents but at minimum, it contains the data that is saved as dls.backup, although I can’t rule out that it potentially also reports the portal URLs you’re using back to Infomir to build up their database for potential future blocks,” he postulated.
‘Thr0wawayicus’ says that left him with two tasks – patch the browser present in MAG devices (or block the hosts file to prevent access to the blacklist), or erase the dls.backup file to prevent cached lookups.
He told TF that deleting the file is probably fine since it likely has no other purpose than to block URLs – it didn’t exist in any firmware prior to the latest releases and is referred to internally as a “domain list file”.
While some technically-minded people will be able to follow the detailed instructions available online (we’ve published just the very bare bones here for reporting purposes), ‘Thr0wawayicus’ has also put in a lot of work to streamline the process.
MAG devices are designed to accept custom firmware. In fact, Infomir provides all the tools that users need to compile their own. ‘Thr0wawayicus’ says that he used these tools to create custom ‘anti-blocking’ firmware variants for popular MAG devices. These have been placed on file-hosting platforms and torrents for public consumption.
“The firmware was built with the officially available tools, from source files Infomir release specifically for the purpose of building custom firmware,” he explained.
“There are no license terms prohibiting you from editing the filesystem as needed. It’s no less legal than stopping say a Chinese WiFi camera from phoning home.”
While that might possibly be the case, we aren’t linking to modified firmware here. That being said, ‘Thr0wawayicus’ reveals that he spent considerable amounts of time putting them together.
“Reverse engineering the issue took me around a day. The longest part of the process which took a couple of days after that was the building and testing of all the individual firmware files for each model of the MAG to automate the process of disabling the check in a manner which would require no special intervention or technical knowledge from the end user,” he revealed.
“The time spent waiting for flashes to complete (because I had to go back and forth between the official firmware and mine for testing) probably made up the majority of those two days.”
The developer said he was motivated to bypass the portal blocking present in these devices because he isn’t comfortable with an equipment manufacturer dictating what people can and cannot do with their devices.
As previously highlighted, Infomir previously stated they are simply carrying through with their obligations to block allegedly-infringing content as required under both US and European law.
“Our policy is to comply with the EU and US legislation on copyright and take into account best practices in the area of handling of copyright infringement reports,” the company told TF.
“In particular, we only process the reports of copyright infringement that contain all the elements of notification envisaged by the DMCA.”
Infomir also added that it filters for false or abusive claims and provides all blocked providers with the opportunity to oppose a copyright infringement report. In the event of a dispute, the company said it would request a court order to maintain access restriction to a blocked portal.
Infomir informs TorrentFreak that its products are aimed at professional IPTV service providers and the company strives to maintain high standards of hardware and software.
“All the tools we provide to our customers are designed to be used solely by legitimate service providers,” says Infomir Legal Counsel Vladislav Larionov.
“We understand that there might be ways to circumvent any restriction system on any device, be it set-top box, smart TV, tablet, smartphone etc. To ensure high enough level of reliability of the restriction system, we get it in line with the recommendations of anti-piracy associations we cooperate with.”