Top Banner
Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant
48

Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Mar 18, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Hacking Satellite TV receivers : Are those IoT devices secure ?

Sofiane Talmat Security Consultant

Page 2: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Agenda

Introduction Many things going wrong Thank you

Page 3: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Why Satellite TV receivers ?

Page 4: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What is this all about ?

Page 5: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

TV encryption scheme

ECM : Entitlement Control Message

EMM : Entitlement Management Message

CW : Content encryption key This is what we

are looking for

Page 6: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Scrambling

CAS

EMM ECM

CW

Scrambler

Scrambled Stream

CAS: Conditional Access System

ECM: Entitlement Control Message

EMM: Entitlement Management Message

CW: Control word

Page 7: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Descrambling

STB

CAM

Smart Card

Descrambler

EMM

ECM

CW Scrambled

Stream

CAM: Conditional Access Module

STB: Set Top Box

To TV

Page 8: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What made the difference ? We used to have :

Proprietary STBs One service provider per STB

We now have : Open STBs Fully featured Linux boxes

Page 9: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Case study : Forever Nano Pro

Page 10: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

3.1 Services

Better than my graduation computer

Realtek RTL8201CP

10/100M

STi7111 (ST40-300@450 Mhz)

2x1 Gb DDR2 SDRAM

1x2Gb NAND flash

Tuner

CORERIVER CICore 1.0

GL850G USB 2.0 Hub

Forever Nano pro : ~150 USD

Page 11: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Recap

STi7111 processor (St40 CPU @450Mhz)

ROM=256MB

RAM= 256MB

10/100M Ethernet port

2 USB 2.0 ports

1 card reader

2 module reader (CI)

HDMI – RCA – SPDIF

Page 12: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Things getting easy

Page 13: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What could possibly go wrong ?

Page 14: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What bring STBs to IoT ?

Page 15: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What made the difference ?

We used to have : Proprietary STBs One service provider per STB

We now have : Open STBs Fully featured Linux boxes

Page 16: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Attack evolution

STB without CAS

Software emulator STB + CAS

Cloned smart cards CAM

Card Sharing

Protocol providers plugin Internet connectivity Satellite key sharing

Page 17: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Card sharing concept

Card Server

oscam, …

Client STB

ccam mgcamd

gbox …

Internet

ECM/EMM

CW

Page 18: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Components and Actors

Root Provider

Rseller Reseller

End User End User End user End user Plugins Plugins Plugins Plugins

Page 19: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Components and Actors

Root provider : Generally server hosted at home

Reseller : Generate keys and provide/install plugin

End user : Plugin running on STB

Cardsharing plugins installed on STBs: cccam, mgcamd, newcamd, gbox, etc.: UNKNOWN origin

Page 20: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What could possibly go wrong ?

Page 21: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Vulnerabilities ?

Page 22: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Root account without password

Any other users ?

Page 23: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Rooting the devices

Page 24: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

SH4 compiling options Install gcc for SH4:

Thanks to cross compiling tools

Qemu and SH4 debian image: SH4 vm

stLinux http://www.stlinux.com

Page 25: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant
Page 26: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Main processes

Everything runs as root

Page 27: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

No firewall

Page 28: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Iptables config start() {

echo Starting firewall: iptables. iptables-restore < /etc/firewall.conf

} save() {

iptables-save > /etc/firewall.conf } stop() {

echo Stopping firewall: iptables. save

}

Page 29: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

FTP config

Page 30: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Network Activity

Page 31: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What could reversing FRior service

Does it contain bugs ? : YES

Unauthenticated Check status, channel details, configure,… View and set alarms View and edit service status Manage streaming to remote IP More, more, more, ….

Page 32: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What could possibly go wrong ?

Page 33: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

System Updates

Page 34: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What about system update ?

Main firmware update Clear text protocol from internet No digital signature verification

Plugins and applications Clear text from internet No digital signature

Page 35: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Updated to the latest firmware

Page 36: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

However they do fix some bugs ….

Page 37: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Miscellaneous

Page 38: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Internet connectivity support

Integrated web browser No support for HTTPS

IPTV plugins applications Remote SQL Injection

Page 39: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

What could possibly go wrong ?

Page 40: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Put all this together

Page 41: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Overview

Internal Architecture and security Total Fail !

Cardsharing plugins installed on STBs: cccam/mgcamd/newcamd/gbox : UNKNOWN

DEVLOPERS and Untrusted

Firmware upgrade and patching: Total Fail !

Main Actors : Unknown, untraceable and untrusted

Page 42: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Number of devices

Number of cards haring subscribers :

~ 4 Millions in Algeria only / what about the world ?

End user :

Unaware

Page 43: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Manufacturers promoting card sharing

Free access to card sharing server for 394 days

Page 44: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Contacting vendor

Page 45: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Building a botnet Building the plugin :

Some C/C++ coding skills to build the plugin Thanks to cross compiling tools

Hosting the service : Either host a card sharing server Or become a reseller Throw that on internet

End users/Resellers: They will come for you

Page 46: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Demo of a Backdoor

Page 47: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

OOPS … Something went wrong.

Page 48: Hacking Satellite TV receivers : Are those IoT devices secure · 2019-03-23 · Hacking Satellite TV receivers : Are those IoT devices secure ? Sofiane Talmat Security Consultant

Thank you