SlideShare ist ein Scribd-Unternehmen logo
1 von 74
Downloaden Sie, um offline zu lesen
SECURITY
VULNERABILITIES OF
DIGITAL VIDEO
BROADCAST CHIPSETS
Adam Gowdiak
Security Explorations

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
INTRODUCTION
About Security Explorations
ī‚¨
ī‚¨

ī‚¨
ī‚¨

ī‚¨

Security start-up company from Poland
Provides various services in the area of security and
vulnerability research
Commercial and Pro Bono research projects
Came to life in a result of a true passion of its founder for
breaking security of things and analyzing software for security
defects
Our ambition is to conduct quality, unbiased, vendor-free and
independent security and vulnerability research

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
INTRODUCTION
Presentation Goal
ī‚¨

ī‚¨

ī‚¨

Continuation of our research in a digital satellite TV
area
Educate about security risks associated with less
known technologies and platforms such as those used
in a digital satellite TV ecosystem
Warn about security risks associated with
ī‚¤
ī‚¤
ī‚¤

closed ecosystems such as digital satellite TV
insecurely implemented proprietary hardware components
3rd party security evaluation processes
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
INTRODUCTION
DISCLAIMER
ī‚¨

ī‚¨

ī‚¨

ī‚¨

Information provided in this presentation is for educational
purposes only
Security Explorations neither promotes, nor encourages the acts
of a digital satellite TV piracy
Any use of the information provided in this presentation for
illegal purposes is strictly prohibited
In case of legal actions taken against Security Explorations, the
following web pages will be updated
http://www.security-explorations.com/en/legal-threats.html

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Why bother about content security ?
ī‚¨

Pay TV piracy remains a major concern for channels
and operators
it leads to financial losses for the European pay TV
industry
ī‚¤ it substantially damages the image of transmitters and
content rights holders
ī‚¤ it reduces the allure and payback of investing in the
industry
ī‚¤ it hurts the industry and its innovation capabilities
ī‚¤

ī‚¨

Signal theft estimated to be more than $2.1 billion
at the end of 2011for Asia region alone (CASBAA)
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Security of a premium content
ī‚¨

Paid, premium content broadcasted in encrypted form
ī‚¤
ī‚¤
ī‚¤

ī‚¨

Scrambling at the TS or PES level
ī‚§ transport_scrambling_control bit of MPEG TS packet
Common Scrambling Algorithm (CSA) and its derivatives
ī‚§ Shared 64-bit secret key (Control Word)
Dedicated security chipsets for decryption

Key components in the security system
ī‚¤

ī‚¤

Subscriber’s smartcard
ī‚§ holds information about subscriber’s access rights to programming
ī‚§ releases decryption keys to the set-top-box if access to a given
service is granted
Set-top-box
ī‚§ Conducts decryption of a scrambled content with the use of a
received decryption key
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Security of a premium content (2)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Control Words (CW)
ī‚¨

64-bit secret keys used to descramble encrypted MPEG
streams
ī‚¤

ī‚¨
ī‚¨

Unique to each programming
Generated automatically by the content provider
ī‚¤
ī‚¤

ī‚¨

Audio, video and data

Changed every ~10s
Odd and even keys for uninterrupted programming reception
ī‚§ Current and next key

Broadcasted in encrypted form to client devices (set-top-boxes)
ī‚¤
ī‚¤

carried in entitlement control messages (ECM)
encrypted with the use of asymmetric crypto (i.e. RSA)
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Entitlement Control Messages (ECM)
ī‚¨

ī‚¨

ECM messages contain private conditional access information
such as Control Words
ī‚¤ Broadcasted by the means of a dedicated MPEG stream
ī‚¤ Message format specific to CAS vendor
PID of MPEG stream carrying ECM messages denoted by
CA_descriptor
ī‚¤

ī‚¤

If elementary stream is scrambled, a CA descriptor shall be
present for the program containing that elementary stream
Usually present in TS_program_map_section
ī‚§ MPEG table_id = 0x02
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Conditional Access System (CAS)
ī‚¨
ī‚¨

It protects the content by requiring certain criteria to be
met before granting access to the content
Subscriber’s smartcard holds information about
subscriber’s access rights to a given programming
ī‚¤

ī‚¨

what programming / program packages a subscriber is
entitled to watch

Only authorized client devices (paying subscribers) can
decrypt MPEG streams for premium content
ī‚¤

ī‚¤

Set-top-box device asks the smartcard to decrypt encrypted
Control Word (ECM message)
The smartcard makes sure that access to the content can be
granted and releases the plaintext value of a Control Word

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
CAS architecture (set-top-box side)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Threats to the model
ī‚¨

ī‚¨

Premium content is encrypted and broadcasted to
all subscribers with the use of same crypto key
(Control Word)
One rogue subscriber with access to all premium
content can share Control Word keys with others
over the Internet
illegal reception / distribution of premium programming
aka signal theft
ī‚¤ Control Words sharing
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
CAS with chipset pairing
ī‚¨

Control Words unique for each pair of a subscriber
(smartcard) / client device (set-top-box)
ī‚¤
ī‚¤

ī‚¤

ī‚¨
ī‚¨

smart cards can be used only with secure devices
the link between the smart card and the client device is
secured
illegal content redistribution is prevented (no more CW
sharing)

Chipset pairing has a form of a cryptographic function
It is usually implemented in a silicon chip (DVB chipset)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
CAS with chipset pairing (set-top-box side)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Pairing function
ī‚¨

ī‚¨

A function that cryptographically ties a set-top-box
device and a subscriber’s smartcard

Control Words pairing key (CWPK)
Unique to each subscriber
ī‚¤ Assigned to it at the time of activating a given user’s
digital satellite TV subscription
ī‚¤ Usually, a function of a unique DVB chipset’s key
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Conax CAS with chipset pairing
ī‚¨

Conax AS is one of the major CAS providers for the
Pay TV industry
ī‚¤

ī‚¨

More than 350 installations in 80 countries world-wide

CAS implemented in software and hardware
Partnership with set-top-box vendors
ī‚¤ Partnership with many DVB chipset vendors to implement
chipset pairing functionality
ī‚§ STMicroelectronics, Broadcom, Renesas Electronics, â€Ļ
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Conax security evaluation
ī‚¨

Mandatory, comprehensive evaluation of all qualified
chipsets run at independent, world-leading security
laboratories
ī‚¤

ī‚¤

All set-top-boxes and DVB chipsets implementing Conax CAS
with chipset pairing undergo rigorous security evaluation
process
Official scoring assigned to set-top-boxes and DVB chipsets
and certified in writing by Conax CSO
ī‚§ „0 represents no security and 9 corresponds to the security
level of Conax smart cards”

Source: http://www.conax.com/en/solutions/clientdevicesecurity/
Conax Security Department (09-Jan-2012)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DIGITAL SATELLITE TV
Conax security certification

Source: Neotion company website

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DVB CHIPSETS
Introduction
ī‚¨

ī‚¨

DVB chipsets implement the core functionality related to
the handling of MPEG transport streams and A/V data
such as:
ī‚¤ MPEG transport filtering and descrambling (incl.
chipset pairing function)
ī‚¤ audio and video decoding
ī‚¤ graphics display
ī‚¤ communication interfaces
ī‚¤ memory interfaces
For security and efficiency reasons, they are usually
implemented as a single chip (system-on-chip or SoC)
ī‚¤

Multiple processor cores for various functions
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DVB CHIPSETS
STMicroelectronics implementation
ī‚¨

STi7100 single-chip, high-definition STB decoder

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DVB CHIPSETS
STMicroelectronics implementation (2)
ī‚¨

STi7111 single-chip, high-definition STB decoder

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
DVB CHIPSETS
STMicroelectronics STB H.264 generations

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
Security challenges
ī‚¨

Implementation of a chipset pairing function in a
proprietary silicon chip makes it far more difficult to
reverse engineer and break
no target software for the static analysis / reverse
engineering or runtime interception
ī‚¤ undocumented interfaces
ī‚¤ unknown implementation of the pairing function
ī‚¤ unknown crypto algorithm and keys (their sizes, byte
order, etc.)
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
How come ?
ī‚¨

ī‚¨

ī‚¨

Tedious analytical and reverse-engineering work
By gathering and gluing together many pieces of
information (clues), it was possible not only to
discover the operation and implementation of
investigated DVB chips, but also find security
weaknesses in them
The tools
Without custom reverse engineering tools we would not
be able to successfully complete most of our projects
ī‚¤ This is especially valid for SE-2011-01 project
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
Common approach (chips documentation)
ī‚¨

Data briefs available from st.com (STi710x, STi7111,
STM7710, etc.)
ī‚¤
ī‚¤

Generic chip architectures
Processor cores
ī‚§ ST40 32-bit superscalar RISC CPU

ī‚§ Dual ST231 CPU cores for audio and video decoding
ī‚¤

Transport subsystem
ī‚§ Programmable Transport Interface(PTI)
– PID filtering, Demultpilexing, Descrambling

ī‚¤

ī‚§ Transport Stream Merger (TSM) and router
FDMA controller
ī‚§ PES parsing and start code detection
ī‚§ Routing elementary streams to A/V buffers

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
Common approach (discovering core device drivers)
ī‚¨
ī‚¨

Device drivers implementing Control Words operations
Static / binary analysis
ī‚¤ Inspecting libraries and device driver code / symbols
ī‚¤ Figuring out code dependencies
ī‚§ Call and link graphs

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
Common approach (pinning down CW API calls)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
Helpful CAS system implementation
ī‚¨

Non-HD prepaid satellite TV service (TNK)
available along the main Platform ‘N’
Different set-top-box decoders
ī‚§ Technisat, ...
ī‚¤ Conax CAS smartcards
ī‚¤

ī‚¨

A few services available to both SAT TV platforms
Shared audio / video streams (same broadcast)
ī‚¤ Separate conditional access information
ī‚§ separate ECM streams
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
Helpful CAS system implementation (2)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING DVB CHIPSETS
Helpful CAS system implementation (3)
ī‚¨
ī‚¨

Parallel Conax CAS without chipset pairing
The plaintext values of encrypted Control Words

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7100 CHIPSET
Device drivers’ functionality and operation
ī‚¨

Detailed analysis of GSECHAL’s DecryptSCK function
ī‚¤

ī‚¤

ī‚¤

The meaning of configuration data
ī‚§ SecureMode = 1
ī‚§ UsingAES = 0
Memory mapped I/O registers
ī‚§ CONFIG
ī‚§ STATUS
ī‚§ COMMAND
ī‚§ DATA
Implementation of direct chip programming commands
ī‚§ gSecWaitForComplete, gSecDataRead,
gSecDataWrite,
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7100 CHIPSET
Reconstruction of a chip’s programming sequences

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7100 CHIPSET
GSEC keys memory
ī‚¨

Secure storage area for Control Word keys
0x6100 offset from the chip’s base addr
ī‚¤ Unavailable for reading / writing
ī‚§ Read operation always returns ZEROs
ī‚§ Write operation does not disrupt the descrambling
process
ī‚¤

ī‚¨

The arguments to the DecryptSCK command
include the index of the key slot to load with 0x10
bytes (key data)
ī‚¤

Device driver code makes sure that this index is within the
0x00-0x31 bounds
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7100 CHIPSET
Security vulnerability
ī‚¨

The ability to extract plaintext values of Control
Words
the chip needs to be programmed manually by issuing
commands directly to its I/O mapped registers
ī‚¤ index of the DecryptSCK command needs to be
greater than 0x31
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7100 CHIPSET
Security vulnerability (formula)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7100 CHIPSET
Security vulnerability (SoC location)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Introduction
ī‚¨

Different design brings more challenges
ī‚¤

ī‚¤

ī‚¨

STTKDMA chip component
One DecryptKey IOCTL for key related operations
ī‚§ Control Words
ī‚§ Pairing Key (CWPK)
ī‚§ AES keys

Easier reverse engineering
ī‚¤

Modular architecture of ITI2850ST/ ITI2849ST set-top-boxes’ OS
distribution
ī‚§ Many dedicated user level libraries
– Conax CA, Crypto operations, NAND encryption, STB configuration, â€Ļ

ī‚§ Text XML configuration files
– Conax CA client settings
ī‚¤
ī‚¤

Support for crypto DMA operations
Kernel symbols via /proc/kallsyms (680KB+)
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Dedicated key memories
ī‚¨

Separate memory mapped chip regions for AES
and Control Word keys
Deduced with the help of kernel and user level library
symbols
ī‚¤ Code / data symbols associated with accesses to chip’s
I/O memory
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
CCORE library
ī‚¨
ī‚¨

The library used for crypto DMA operations
Reverse engineering the meaning of CCORE library/
chips configuration bits and input / output arguments
ī‚¤

Manual analysis of data propagation
ī‚§ libstd_drv_ccore.so API -> STTKDMA device driver
API -> chip’s configuration registers
– DMA CONFIG
– TKD CONFIG

ī‚¤

ī‚¨

Analysis of STTKDMA code writing to configuration registers
ī‚§ resetAES_NOT_TDES

Custom AES / TDES Java subroutines
ī‚¤

Verification of CCORE results

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
The existence of a chip specific SCK key
ī‚¨

Initial hints in STi7100 GSECHAL device driver
ī‚¤

ī‚¨

Confirmed at a time of the analysis of a set-top-box
boot loader code (SH4 emulator)
ī‚¤

ī‚¨

DecryptSCK command

The use of SCK key to decrypt the boot loader code
ī‚§ No initialization of the usual key registers
ī‚§ Different chip configuration bits

Used by a device driver from a software upgrade OS
distribution
ī‚¤

The use of SCK key for NAND encryption
ī‚§ parm=nand_crypt_use_sck_key:Use SCK key
instead of default ADB key for NAND
encryption
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Firmware data / code for STi7111 chip
ī‚¨

Hints in sttkdma_core_user.ko module
ī‚¤

ī‚¤

ī‚¤

ī‚¨

Code symbols
ī‚§ st_tkdma_loader
ī‚§ st_tkdma_loader_checksum
Data symbols
ī‚§ tkdma_fw_address_1
ī‚§ tkdma_fw_address_2
Writing data / code to STi7111 chip’s I/O space
ī‚§ 5944 code bytes
ī‚§ 1156 data bytes

Firmware code implementing unknown processor
instructions
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
SLIM Core processor
ī‚¨
ī‚¨

IST FP6 PROSYD EU project (http://www.prosyd.org)
Paragraph 2.3 of Deliverable D1.4/1 gives some
information about the SLIM Core Processor
ī‚¤ a collaboration between ST UK and OneSpin after the
spin-off from Infineon
ī‚¤ lightweight processor with 27 instructions and a 4-stage
pipeline
ī‚¤ processor special features: a coprocessor interface;
circular buffer operation; a STOP instruction
ī‚¤ instructions opcode names: ADD - BRA - CPI - JAB - LD LDF - NOP - RPT - STI -STF - STOP – SUBC.
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
JMP instruction format
ī‚¨

OpenDuckbox project (http://gitorious.org/openduckbox-project-sh4)
GNU source code for SLIM Core Generic driver
ī‚¤ slim_boot_core function leaks information about the
format of one Slim Core instruction (JMP)
ī‚§ memory addressing (by word number)
ī‚§ instruction opcode width
ī‚¤

// Init imem so every instruction is a jump to itself
for (n = 0; n < core->imem_size / 4; n++)
SLIM_IMEM(core, n) = 0x00d00010 | (n & 0xf) |
((n & 0xfff0) << 4);
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Finding patterns in SLIM Core code

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Reverse engineering SLIM Core instructions
ī‚¨

Discovery of SLIM Core instruction opcodes
Exploited the ability to change the operation of SLIM
Core firmware in runtime
ī‚§ Overwriting chip’s memory loaded with firmware code
ī‚§ should secure crypto chip allow for it ?
ī‚¤ Replacement of an arbitrary instruction from the code
path of GetPublicID function
ī‚¤ Analysis of the instruction’s execution effect to memory
and registers
ī‚§ Discovery of load / store instructions format
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Reverse engineering SLIM Core instructions (2)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Reverse engineering SLIM Core instructions (3)
ī‚¨

JMP and LOAD/STORE instructions sufficient to
discover the meaning of all other instructions
ī‚¤

JMP from firmware to user’s code path
ī‚§ STORE the contents of registers (firmware context)
– LOAD user’s environment (contents of registers)
– EXECUTE unknown SLIM Core instruction opcode
– STORE user’s environment (contents of registers)

ī‚§ LOAD the contents of registers (firmware context)
ī‚¤ JMP back to firmware code path
ī‚¨

The need to properly handle conditional jumps
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Reverse engineering SLIM Core instructions (4)
ī‚¨

One instruction opcode at a time
LOAD / STORE instructions
ī‚¤ MOV instructions
ī‚¤ CMP instructions
ī‚¤ Conditional branching instructions
ī‚¤ Computational instructions
ī‚¤ Other instructions (bit extraction, manipulation)
ī‚¤ RPT instruction
ī‚¤

ī‚¨

Scope limited to unknown opcodes from firmware
code
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Reverse engineering SLIM Core instructions (5)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
SLIM Core disassembler
ī‚¨

Final disassembly dump of Slim Core firmware code
1400+ instructions disassembled
ī‚¤ ~11 instruction opcodes not recognized
ī‚§ Not relevant from the analysis point of view
ī‚¤

ī‚¨

Sufficient data for firmware analysis
Discovery of separate dispatching for DMA and all TKD
operations
ī‚§ Semi-threads (context-switching)
ī‚¤ Discovery of a key initialization subroutine
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Tracing SLIM Core firmware
ī‚¨

ī‚¨

The goal was to locate SLIM Core instruction sequences
implementing DecryptKey functionality
Tracer implementation
ī‚¤

SLIM core part
ī‚§ Custom code on the GetPublicID function path
–
–
–

ī‚¤

Binary instrumented instruction copied from a currently traced
code location
SLIM Core instruction executed in the original registers context
Heavy use of the SLIM core disassembler

Java part
ī‚§ Logging
ī‚§ SLIM Core syncing and control code
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Tracing SLIM Core firmware (output log)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Tracing SLIM Core firmware (DecryptKey code)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Internal crypto core (TKD) commands
ī‚¨

Static analysis of SLIM Core firmware disassembly
ī‚¤

Discovery of internal chip commands

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
TKD inspector
ī‚¨

Discovery of the meaning of TKD commands by the means of
executing special SLIM Core instruction sequence

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
TKD inspector (playing with the commands)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
TKD commands format

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
TKD commands format (key operations explained)
ī‚¨

TKD CMD 0x00ff0000
Setting encrypted Control Word Pairing Key (CWPK)
ī‚¤ Interpreted as decryption (always) of register input
(0xff) with SCK key (0x00) and storing the result at a key
slot 0x00
ī‚¤

ī‚¨

TKD CMD 0x20ff0001
Setting encrypted Control Word
ī‚¤ Interpreted as decryption (0x01) of register input (0xff)
with SCK key (0x00) and storing the result at a key slot
0x20
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Security vulnerability #1 (step 1)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Security vulnerability #1 (step 2)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Security vulnerability #1 (formula)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Security vulnerability #2 (step 1)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Security vulnerability #2 (step 2)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Security vulnerability #2 (formula)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
STi7111 security vulnerabilities (SoC location)

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
BREAKING STi7111 CHIPSET
Control Word Pairing Key
ī‚¨

ī‚¨

Issue 18 makes use of the encrypted value of the
chipset pairing key (CWPK)
CWPK key sent by the operator at the time of
activating user’s subscription
ī‚¤

ī‚¨

Encrypted CWPK key bytes returned by the Conax card in
response to EMM message

For ITI2850ST and ITI2849ST set-top-boxes encrypted
CWPK key encrypted again and cached in a file
ī‚¤
ī‚¤

/mnt/flash/secure/7/0
libstd_cai_client_conax7.so API for decryption
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
PROOF OF CONCEPT CODE
Implemented functionality
ī‚¨

Access to information about cryptographic keys
Plaintext Control Words (STi7100)
ī‚¤ Plaintext Control Words and plaintext CWPK (STi7111)
ī‚¤

ī‚¨

ī‚¨

Control Words sharing via network between
arbitrary decoders protected with Conax
conditional access method and chipset pairing
Video on Demand ECM decryption and sharing of
programming protected with Conax conditional
access method with chipset pairing
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
PROOF OF CONCEPT CODE
Control Words sharing (aka. signal theft)
ī‚¨

Sharing of the crypto keys used to descramble digital satellite
TV programming

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
PROOF OF CONCEPT CODE
Push VOD sharing
ī‚¨

Sharing of the crypto keys used to descramble VOD
movies
ī‚¤

ī‚¤
ī‚¤

Obtaining Control Word for arbitrary movie during the rental
period
ī‚§ VOD movies rented for 48 hours period
ī‚§ Encrypted MPEG data pushed into set-top-boxes
ī‚§ ECM messages accompanying movies files
Sharing Control Words after the rental period
Using plaintext CW values to descramble the movie
ī‚§ The use of key memory beyond index 0x32 on STi7100
ī‚§ The use of CWPK to reencrypt Control Word on STI7111

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
SUMMARY
STi7100 / STi7111 security vulnerabilities
ī‚¨

How come the issues were not discovered before the
market release ?
STMicroelectronics a major silicon vendor
ī‚§ #1 in Europe , #7 in the world (source: Wikipedia)
ī‚¤ Conax security evaluation of STB / CAM / DVB chipset
solutions
ī‚§ Final scoring of STi7100/STI7111 not disclosed to
Security Explorations
ī‚¤

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
SUMMARY
Vulnerabilities Impact
ī‚¨

ī‚¨

No information from STMicroelectronics (DVB chipsets
vendor) in response to the impact inquiry questions
ī‚¤ All your inquiries, as listed below, are pointing
towards confidential information and as such can not
be disclosed by ST to you or to others.
Jan-17-2011, STMicroelectronics in an email to
Security Explorations
Impact estimation upon publicly available data

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
SUMMARY
Vulnerabilities Impact (2)
ī‚¨

Cumulative MPEG-2 & MPEG-4 Shipments in 2008
ī‚¤ 541 millions of units
ī‚§ Set-top-boxes, digital television sets, DVD / Bluray players

ī‚¨
ī‚¨

STMicroelectronics #1 in H.264 market (68% of market share
in 2008)
Customers from Europe, Middle East and Africa, Asia-Pacific
and the Americas
ī‚¤
ī‚¤
ī‚¤
ī‚¤

ī‚¤

DishTV (India)
DirectTV (USA)
Platforma N, Cyfrowy Polsat (Poland)
BSkyB (UK)
â€Ļ

Source: Multimedia, Philippe Lambinet, STMicroelectronics

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
SUMMARY
Final Words
ī‚¨

First successful attack against the implementation of a
Conax conditional access system with chipset pairing
ī‚¤
ī‚¤

ī‚¨

Security based on a complex, secret functionality
embedded in a silicon is a dangerous concept
ī‚¤

ī‚¨

ī‚¨

Pay TV piracy possible in the environment of hacked digital
satellite TV set-top-boxes
Security of dedicated DVB chipsets broken

Security through Obscurity ?

The need to improve security and evaluation processes
by silicon and CAS vendors
The need to tighten set-top-boxes security relying on
vulnerable DVB chipsets
HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
FINAL
Q&A

THANK YOU
contact@security-explorations.com

HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands

Weitere ähnliche Inhalte

Ähnlich wie security vulnerabilities of dvb chipsets

Workshop 16 october 2015 paris
Workshop 16 october 2015 parisWorkshop 16 october 2015 paris
Workshop 16 october 2015 parisMarcel Hartgerink
 
Your CODESYS Applications, Protected and Licensed
Your CODESYS Applications, Protected and LicensedYour CODESYS Applications, Protected and Licensed
Your CODESYS Applications, Protected and Licensedteam-WIBU
 
CommTech Talks: Challenges for Video on Demand (VoD) services
CommTech Talks: Challenges for Video on Demand (VoD) servicesCommTech Talks: Challenges for Video on Demand (VoD) services
CommTech Talks: Challenges for Video on Demand (VoD) servicesAntonio Capone
 
Removing Security Roadblocks to IoT Deployment Success
Removing Security Roadblocks to IoT Deployment SuccessRemoving Security Roadblocks to IoT Deployment Success
Removing Security Roadblocks to IoT Deployment SuccessMicrosoft Tech Community
 
Enhance your pay-TV business model-CABSAT 2010
Enhance your pay-TV business model-CABSAT 2010Enhance your pay-TV business model-CABSAT 2010
Enhance your pay-TV business model-CABSAT 2010Verimatrix
 
Conditional Access Systems
Conditional Access SystemsConditional Access Systems
Conditional Access SystemsNamith CM
 
Verimatrix-Comvenient Acquisition 3-31-11
Verimatrix-Comvenient Acquisition 3-31-11Verimatrix-Comvenient Acquisition 3-31-11
Verimatrix-Comvenient Acquisition 3-31-11Verimatrix
 
An Introduction to castLabs
An Introduction to castLabs An Introduction to castLabs
An Introduction to castLabs JamesHynard1
 
Design and Implementation of HDMI Transmitter
Design and Implementation of HDMI TransmitterDesign and Implementation of HDMI Transmitter
Design and Implementation of HDMI TransmitterIJERA Editor
 
Symposium on Securing the IoT - Security is the future of IoT - mbed
Symposium on Securing the IoT - Security is the future of IoT - mbedSymposium on Securing the IoT - Security is the future of IoT - mbed
Symposium on Securing the IoT - Security is the future of IoT - mbedAustin Blackstone
 
Embedded devices - Big opportunities in tiny packages
Embedded devices - Big opportunities in tiny packagesEmbedded devices - Big opportunities in tiny packages
Embedded devices - Big opportunities in tiny packagesteam-WIBU
 
sasikumarj_resume
sasikumarj_resumesasikumarj_resume
sasikumarj_resumeSasi Kumar
 
VEDLIoT at Stockholm Tech Live 2022
VEDLIoT at Stockholm Tech Live 2022VEDLIoT at Stockholm Tech Live 2022
VEDLIoT at Stockholm Tech Live 2022VEDLIoT Project
 
Single set of tools for a rich user experience to Live Streaming
Single set of tools for a rich user experience to Live StreamingSingle set of tools for a rich user experience to Live Streaming
Single set of tools for a rich user experience to Live StreamingChampion InfoMetrics Pvt Ltd.
 

Ähnlich wie security vulnerabilities of dvb chipsets (20)

Workshop 16 october 2015 paris
Workshop 16 october 2015 parisWorkshop 16 october 2015 paris
Workshop 16 october 2015 paris
 
Your CODESYS Applications, Protected and Licensed
Your CODESYS Applications, Protected and LicensedYour CODESYS Applications, Protected and Licensed
Your CODESYS Applications, Protected and Licensed
 
CDE Marketplace: SQR Systems
CDE Marketplace: SQR SystemsCDE Marketplace: SQR Systems
CDE Marketplace: SQR Systems
 
Aquila Broadcast Premium Video Compression
Aquila Broadcast Premium Video CompressionAquila Broadcast Premium Video Compression
Aquila Broadcast Premium Video Compression
 
CommTech Talks: Challenges for Video on Demand (VoD) services
CommTech Talks: Challenges for Video on Demand (VoD) servicesCommTech Talks: Challenges for Video on Demand (VoD) services
CommTech Talks: Challenges for Video on Demand (VoD) services
 
Removing Security Roadblocks to IoT Deployment Success
Removing Security Roadblocks to IoT Deployment SuccessRemoving Security Roadblocks to IoT Deployment Success
Removing Security Roadblocks to IoT Deployment Success
 
My Profile
My ProfileMy Profile
My Profile
 
Enhance your pay-TV business model-CABSAT 2010
Enhance your pay-TV business model-CABSAT 2010Enhance your pay-TV business model-CABSAT 2010
Enhance your pay-TV business model-CABSAT 2010
 
Conditional Access Systems
Conditional Access SystemsConditional Access Systems
Conditional Access Systems
 
Resume_Pratik
Resume_PratikResume_Pratik
Resume_Pratik
 
Verimatrix-Comvenient Acquisition 3-31-11
Verimatrix-Comvenient Acquisition 3-31-11Verimatrix-Comvenient Acquisition 3-31-11
Verimatrix-Comvenient Acquisition 3-31-11
 
An Introduction to castLabs
An Introduction to castLabs An Introduction to castLabs
An Introduction to castLabs
 
Iptv
IptvIptv
Iptv
 
Design and Implementation of HDMI Transmitter
Design and Implementation of HDMI TransmitterDesign and Implementation of HDMI Transmitter
Design and Implementation of HDMI Transmitter
 
Symposium on Securing the IoT - Security is the future of IoT - mbed
Symposium on Securing the IoT - Security is the future of IoT - mbedSymposium on Securing the IoT - Security is the future of IoT - mbed
Symposium on Securing the IoT - Security is the future of IoT - mbed
 
Embedded devices - Big opportunities in tiny packages
Embedded devices - Big opportunities in tiny packagesEmbedded devices - Big opportunities in tiny packages
Embedded devices - Big opportunities in tiny packages
 
sasikumarj_resume
sasikumarj_resumesasikumarj_resume
sasikumarj_resume
 
VEDLIoT at Stockholm Tech Live 2022
VEDLIoT at Stockholm Tech Live 2022VEDLIoT at Stockholm Tech Live 2022
VEDLIoT at Stockholm Tech Live 2022
 
Securing your Video Conferences: How to Minimize Risks of Hacking
Securing your Video Conferences: How to Minimize Risks of HackingSecuring your Video Conferences: How to Minimize Risks of Hacking
Securing your Video Conferences: How to Minimize Risks of Hacking
 
Single set of tools for a rich user experience to Live Streaming
Single set of tools for a rich user experience to Live StreamingSingle set of tools for a rich user experience to Live Streaming
Single set of tools for a rich user experience to Live Streaming
 

Mehr von Aniruddh Tyagi

whitepaper_mpeg-if_understanding_mpeg4
whitepaper_mpeg-if_understanding_mpeg4whitepaper_mpeg-if_understanding_mpeg4
whitepaper_mpeg-if_understanding_mpeg4Aniruddh Tyagi
 
BUC BLOCK UP CONVERTER
BUC BLOCK UP CONVERTERBUC BLOCK UP CONVERTER
BUC BLOCK UP CONVERTERAniruddh Tyagi
 
digital_set_top_box2
digital_set_top_box2digital_set_top_box2
digital_set_top_box2Aniruddh Tyagi
 
Discrete cosine transform
Discrete cosine transformDiscrete cosine transform
Discrete cosine transformAniruddh Tyagi
 
EBU_DVB_S2 READY TO LIFT OFF
EBU_DVB_S2 READY TO LIFT OFFEBU_DVB_S2 READY TO LIFT OFF
EBU_DVB_S2 READY TO LIFT OFFAniruddh Tyagi
 
ADVANCED DVB-C,DVB-S STB DEMOD
ADVANCED DVB-C,DVB-S STB DEMODADVANCED DVB-C,DVB-S STB DEMOD
ADVANCED DVB-C,DVB-S STB DEMODAniruddh Tyagi
 
haffman coding DCT transform
haffman coding DCT transformhaffman coding DCT transform
haffman coding DCT transformAniruddh Tyagi
 
quantization_PCM
quantization_PCMquantization_PCM
quantization_PCMAniruddh Tyagi
 
ECMG & EMMG protocol
ECMG & EMMG protocolECMG & EMMG protocol
ECMG & EMMG protocolAniruddh Tyagi
 
fundamentals_satellite_communication_part_1
fundamentals_satellite_communication_part_1fundamentals_satellite_communication_part_1
fundamentals_satellite_communication_part_1Aniruddh Tyagi
 
art_sklar7_reed-solomon
art_sklar7_reed-solomonart_sklar7_reed-solomon
art_sklar7_reed-solomonAniruddh Tyagi
 
en_302769v010101v
en_302769v010101ven_302769v010101v
en_302769v010101vAniruddh Tyagi
 

Mehr von Aniruddh Tyagi (20)

whitepaper_mpeg-if_understanding_mpeg4
whitepaper_mpeg-if_understanding_mpeg4whitepaper_mpeg-if_understanding_mpeg4
whitepaper_mpeg-if_understanding_mpeg4
 
BUC BLOCK UP CONVERTER
BUC BLOCK UP CONVERTERBUC BLOCK UP CONVERTER
BUC BLOCK UP CONVERTER
 
digital_set_top_box2
digital_set_top_box2digital_set_top_box2
digital_set_top_box2
 
Discrete cosine transform
Discrete cosine transformDiscrete cosine transform
Discrete cosine transform
 
DCT
DCTDCT
DCT
 
EBU_DVB_S2 READY TO LIFT OFF
EBU_DVB_S2 READY TO LIFT OFFEBU_DVB_S2 READY TO LIFT OFF
EBU_DVB_S2 READY TO LIFT OFF
 
ADVANCED DVB-C,DVB-S STB DEMOD
ADVANCED DVB-C,DVB-S STB DEMODADVANCED DVB-C,DVB-S STB DEMOD
ADVANCED DVB-C,DVB-S STB DEMOD
 
DVB_Arch
DVB_ArchDVB_Arch
DVB_Arch
 
haffman coding DCT transform
haffman coding DCT transformhaffman coding DCT transform
haffman coding DCT transform
 
tyagi 's doc
tyagi 's doctyagi 's doc
tyagi 's doc
 
quantization_PCM
quantization_PCMquantization_PCM
quantization_PCM
 
ECMG & EMMG protocol
ECMG & EMMG protocolECMG & EMMG protocol
ECMG & EMMG protocol
 
7015567A
7015567A7015567A
7015567A
 
Basic of BISS
Basic of BISSBasic of BISS
Basic of BISS
 
euler theorm
euler theormeuler theorm
euler theorm
 
fundamentals_satellite_communication_part_1
fundamentals_satellite_communication_part_1fundamentals_satellite_communication_part_1
fundamentals_satellite_communication_part_1
 
quantization
quantizationquantization
quantization
 
art_sklar7_reed-solomon
art_sklar7_reed-solomonart_sklar7_reed-solomon
art_sklar7_reed-solomon
 
DVBSimulcrypt2
DVBSimulcrypt2DVBSimulcrypt2
DVBSimulcrypt2
 
en_302769v010101v
en_302769v010101ven_302769v010101v
en_302769v010101v
 

KÃŧrzlich hochgeladen

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
đŸŦ The future of MySQL is Postgres 🐘
đŸŦ  The future of MySQL is Postgres   🐘đŸŦ  The future of MySQL is Postgres   🐘
đŸŦ The future of MySQL is Postgres 🐘RTylerCroy
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraÃējo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

KÃŧrzlich hochgeladen (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
đŸŦ The future of MySQL is Postgres 🐘
đŸŦ  The future of MySQL is Postgres   🐘đŸŦ  The future of MySQL is Postgres   🐘
đŸŦ The future of MySQL is Postgres 🐘
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

security vulnerabilities of dvb chipsets

  • 1. SECURITY VULNERABILITIES OF DIGITAL VIDEO BROADCAST CHIPSETS Adam Gowdiak Security Explorations HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 2. INTRODUCTION About Security Explorations ī‚¨ ī‚¨ ī‚¨ ī‚¨ ī‚¨ Security start-up company from Poland Provides various services in the area of security and vulnerability research Commercial and Pro Bono research projects Came to life in a result of a true passion of its founder for breaking security of things and analyzing software for security defects Our ambition is to conduct quality, unbiased, vendor-free and independent security and vulnerability research HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 3. INTRODUCTION Presentation Goal ī‚¨ ī‚¨ ī‚¨ Continuation of our research in a digital satellite TV area Educate about security risks associated with less known technologies and platforms such as those used in a digital satellite TV ecosystem Warn about security risks associated with ī‚¤ ī‚¤ ī‚¤ closed ecosystems such as digital satellite TV insecurely implemented proprietary hardware components 3rd party security evaluation processes HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 4. INTRODUCTION DISCLAIMER ī‚¨ ī‚¨ ī‚¨ ī‚¨ Information provided in this presentation is for educational purposes only Security Explorations neither promotes, nor encourages the acts of a digital satellite TV piracy Any use of the information provided in this presentation for illegal purposes is strictly prohibited In case of legal actions taken against Security Explorations, the following web pages will be updated http://www.security-explorations.com/en/legal-threats.html HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 5. DIGITAL SATELLITE TV Why bother about content security ? ī‚¨ Pay TV piracy remains a major concern for channels and operators it leads to financial losses for the European pay TV industry ī‚¤ it substantially damages the image of transmitters and content rights holders ī‚¤ it reduces the allure and payback of investing in the industry ī‚¤ it hurts the industry and its innovation capabilities ī‚¤ ī‚¨ Signal theft estimated to be more than $2.1 billion at the end of 2011for Asia region alone (CASBAA) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 6. DIGITAL SATELLITE TV Security of a premium content ī‚¨ Paid, premium content broadcasted in encrypted form ī‚¤ ī‚¤ ī‚¤ ī‚¨ Scrambling at the TS or PES level ī‚§ transport_scrambling_control bit of MPEG TS packet Common Scrambling Algorithm (CSA) and its derivatives ī‚§ Shared 64-bit secret key (Control Word) Dedicated security chipsets for decryption Key components in the security system ī‚¤ ī‚¤ Subscriber’s smartcard ī‚§ holds information about subscriber’s access rights to programming ī‚§ releases decryption keys to the set-top-box if access to a given service is granted Set-top-box ī‚§ Conducts decryption of a scrambled content with the use of a received decryption key HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 7. DIGITAL SATELLITE TV Security of a premium content (2) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 8. DIGITAL SATELLITE TV Control Words (CW) ī‚¨ 64-bit secret keys used to descramble encrypted MPEG streams ī‚¤ ī‚¨ ī‚¨ Unique to each programming Generated automatically by the content provider ī‚¤ ī‚¤ ī‚¨ Audio, video and data Changed every ~10s Odd and even keys for uninterrupted programming reception ī‚§ Current and next key Broadcasted in encrypted form to client devices (set-top-boxes) ī‚¤ ī‚¤ carried in entitlement control messages (ECM) encrypted with the use of asymmetric crypto (i.e. RSA) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 9. DIGITAL SATELLITE TV Entitlement Control Messages (ECM) ī‚¨ ī‚¨ ECM messages contain private conditional access information such as Control Words ī‚¤ Broadcasted by the means of a dedicated MPEG stream ī‚¤ Message format specific to CAS vendor PID of MPEG stream carrying ECM messages denoted by CA_descriptor ī‚¤ ī‚¤ If elementary stream is scrambled, a CA descriptor shall be present for the program containing that elementary stream Usually present in TS_program_map_section ī‚§ MPEG table_id = 0x02 HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 10. DIGITAL SATELLITE TV Conditional Access System (CAS) ī‚¨ ī‚¨ It protects the content by requiring certain criteria to be met before granting access to the content Subscriber’s smartcard holds information about subscriber’s access rights to a given programming ī‚¤ ī‚¨ what programming / program packages a subscriber is entitled to watch Only authorized client devices (paying subscribers) can decrypt MPEG streams for premium content ī‚¤ ī‚¤ Set-top-box device asks the smartcard to decrypt encrypted Control Word (ECM message) The smartcard makes sure that access to the content can be granted and releases the plaintext value of a Control Word HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 11. DIGITAL SATELLITE TV CAS architecture (set-top-box side) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 12. DIGITAL SATELLITE TV Threats to the model ī‚¨ ī‚¨ Premium content is encrypted and broadcasted to all subscribers with the use of same crypto key (Control Word) One rogue subscriber with access to all premium content can share Control Word keys with others over the Internet illegal reception / distribution of premium programming aka signal theft ī‚¤ Control Words sharing ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 13. DIGITAL SATELLITE TV CAS with chipset pairing ī‚¨ Control Words unique for each pair of a subscriber (smartcard) / client device (set-top-box) ī‚¤ ī‚¤ ī‚¤ ī‚¨ ī‚¨ smart cards can be used only with secure devices the link between the smart card and the client device is secured illegal content redistribution is prevented (no more CW sharing) Chipset pairing has a form of a cryptographic function It is usually implemented in a silicon chip (DVB chipset) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 14. DIGITAL SATELLITE TV CAS with chipset pairing (set-top-box side) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 15. DIGITAL SATELLITE TV Pairing function ī‚¨ ī‚¨ A function that cryptographically ties a set-top-box device and a subscriber’s smartcard Control Words pairing key (CWPK) Unique to each subscriber ī‚¤ Assigned to it at the time of activating a given user’s digital satellite TV subscription ī‚¤ Usually, a function of a unique DVB chipset’s key ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 16. DIGITAL SATELLITE TV Conax CAS with chipset pairing ī‚¨ Conax AS is one of the major CAS providers for the Pay TV industry ī‚¤ ī‚¨ More than 350 installations in 80 countries world-wide CAS implemented in software and hardware Partnership with set-top-box vendors ī‚¤ Partnership with many DVB chipset vendors to implement chipset pairing functionality ī‚§ STMicroelectronics, Broadcom, Renesas Electronics, â€Ļ ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 17. DIGITAL SATELLITE TV Conax security evaluation ī‚¨ Mandatory, comprehensive evaluation of all qualified chipsets run at independent, world-leading security laboratories ī‚¤ ī‚¤ All set-top-boxes and DVB chipsets implementing Conax CAS with chipset pairing undergo rigorous security evaluation process Official scoring assigned to set-top-boxes and DVB chipsets and certified in writing by Conax CSO ī‚§ „0 represents no security and 9 corresponds to the security level of Conax smart cards” Source: http://www.conax.com/en/solutions/clientdevicesecurity/ Conax Security Department (09-Jan-2012) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 18. DIGITAL SATELLITE TV Conax security certification Source: Neotion company website HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 19. DVB CHIPSETS Introduction ī‚¨ ī‚¨ DVB chipsets implement the core functionality related to the handling of MPEG transport streams and A/V data such as: ī‚¤ MPEG transport filtering and descrambling (incl. chipset pairing function) ī‚¤ audio and video decoding ī‚¤ graphics display ī‚¤ communication interfaces ī‚¤ memory interfaces For security and efficiency reasons, they are usually implemented as a single chip (system-on-chip or SoC) ī‚¤ Multiple processor cores for various functions HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 20. DVB CHIPSETS STMicroelectronics implementation ī‚¨ STi7100 single-chip, high-definition STB decoder HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 21. DVB CHIPSETS STMicroelectronics implementation (2) ī‚¨ STi7111 single-chip, high-definition STB decoder HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 22. DVB CHIPSETS STMicroelectronics STB H.264 generations HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 23. BREAKING DVB CHIPSETS Security challenges ī‚¨ Implementation of a chipset pairing function in a proprietary silicon chip makes it far more difficult to reverse engineer and break no target software for the static analysis / reverse engineering or runtime interception ī‚¤ undocumented interfaces ī‚¤ unknown implementation of the pairing function ī‚¤ unknown crypto algorithm and keys (their sizes, byte order, etc.) ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 24. BREAKING DVB CHIPSETS How come ? ī‚¨ ī‚¨ ī‚¨ Tedious analytical and reverse-engineering work By gathering and gluing together many pieces of information (clues), it was possible not only to discover the operation and implementation of investigated DVB chips, but also find security weaknesses in them The tools Without custom reverse engineering tools we would not be able to successfully complete most of our projects ī‚¤ This is especially valid for SE-2011-01 project ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 25. BREAKING DVB CHIPSETS Common approach (chips documentation) ī‚¨ Data briefs available from st.com (STi710x, STi7111, STM7710, etc.) ī‚¤ ī‚¤ Generic chip architectures Processor cores ī‚§ ST40 32-bit superscalar RISC CPU ī‚§ Dual ST231 CPU cores for audio and video decoding ī‚¤ Transport subsystem ī‚§ Programmable Transport Interface(PTI) – PID filtering, Demultpilexing, Descrambling ī‚¤ ī‚§ Transport Stream Merger (TSM) and router FDMA controller ī‚§ PES parsing and start code detection ī‚§ Routing elementary streams to A/V buffers HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 26. BREAKING DVB CHIPSETS Common approach (discovering core device drivers) ī‚¨ ī‚¨ Device drivers implementing Control Words operations Static / binary analysis ī‚¤ Inspecting libraries and device driver code / symbols ī‚¤ Figuring out code dependencies ī‚§ Call and link graphs HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 27. BREAKING DVB CHIPSETS Common approach (pinning down CW API calls) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 28. BREAKING DVB CHIPSETS Helpful CAS system implementation ī‚¨ Non-HD prepaid satellite TV service (TNK) available along the main Platform ‘N’ Different set-top-box decoders ī‚§ Technisat, ... ī‚¤ Conax CAS smartcards ī‚¤ ī‚¨ A few services available to both SAT TV platforms Shared audio / video streams (same broadcast) ī‚¤ Separate conditional access information ī‚§ separate ECM streams ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 29. BREAKING DVB CHIPSETS Helpful CAS system implementation (2) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 30. BREAKING DVB CHIPSETS Helpful CAS system implementation (3) ī‚¨ ī‚¨ Parallel Conax CAS without chipset pairing The plaintext values of encrypted Control Words HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 31. BREAKING STi7100 CHIPSET Device drivers’ functionality and operation ī‚¨ Detailed analysis of GSECHAL’s DecryptSCK function ī‚¤ ī‚¤ ī‚¤ The meaning of configuration data ī‚§ SecureMode = 1 ī‚§ UsingAES = 0 Memory mapped I/O registers ī‚§ CONFIG ī‚§ STATUS ī‚§ COMMAND ī‚§ DATA Implementation of direct chip programming commands ī‚§ gSecWaitForComplete, gSecDataRead, gSecDataWrite, HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 32. BREAKING STi7100 CHIPSET Reconstruction of a chip’s programming sequences HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 33. BREAKING STi7100 CHIPSET GSEC keys memory ī‚¨ Secure storage area for Control Word keys 0x6100 offset from the chip’s base addr ī‚¤ Unavailable for reading / writing ī‚§ Read operation always returns ZEROs ī‚§ Write operation does not disrupt the descrambling process ī‚¤ ī‚¨ The arguments to the DecryptSCK command include the index of the key slot to load with 0x10 bytes (key data) ī‚¤ Device driver code makes sure that this index is within the 0x00-0x31 bounds HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 34. BREAKING STi7100 CHIPSET Security vulnerability ī‚¨ The ability to extract plaintext values of Control Words the chip needs to be programmed manually by issuing commands directly to its I/O mapped registers ī‚¤ index of the DecryptSCK command needs to be greater than 0x31 ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 35. BREAKING STi7100 CHIPSET Security vulnerability (formula) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 36. BREAKING STi7100 CHIPSET Security vulnerability (SoC location) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 37. BREAKING STi7111 CHIPSET Introduction ī‚¨ Different design brings more challenges ī‚¤ ī‚¤ ī‚¨ STTKDMA chip component One DecryptKey IOCTL for key related operations ī‚§ Control Words ī‚§ Pairing Key (CWPK) ī‚§ AES keys Easier reverse engineering ī‚¤ Modular architecture of ITI2850ST/ ITI2849ST set-top-boxes’ OS distribution ī‚§ Many dedicated user level libraries – Conax CA, Crypto operations, NAND encryption, STB configuration, â€Ļ ī‚§ Text XML configuration files – Conax CA client settings ī‚¤ ī‚¤ Support for crypto DMA operations Kernel symbols via /proc/kallsyms (680KB+) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 38. BREAKING STi7111 CHIPSET Dedicated key memories ī‚¨ Separate memory mapped chip regions for AES and Control Word keys Deduced with the help of kernel and user level library symbols ī‚¤ Code / data symbols associated with accesses to chip’s I/O memory ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 39. BREAKING STi7111 CHIPSET CCORE library ī‚¨ ī‚¨ The library used for crypto DMA operations Reverse engineering the meaning of CCORE library/ chips configuration bits and input / output arguments ī‚¤ Manual analysis of data propagation ī‚§ libstd_drv_ccore.so API -> STTKDMA device driver API -> chip’s configuration registers – DMA CONFIG – TKD CONFIG ī‚¤ ī‚¨ Analysis of STTKDMA code writing to configuration registers ī‚§ resetAES_NOT_TDES Custom AES / TDES Java subroutines ī‚¤ Verification of CCORE results HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 40. BREAKING STi7111 CHIPSET The existence of a chip specific SCK key ī‚¨ Initial hints in STi7100 GSECHAL device driver ī‚¤ ī‚¨ Confirmed at a time of the analysis of a set-top-box boot loader code (SH4 emulator) ī‚¤ ī‚¨ DecryptSCK command The use of SCK key to decrypt the boot loader code ī‚§ No initialization of the usual key registers ī‚§ Different chip configuration bits Used by a device driver from a software upgrade OS distribution ī‚¤ The use of SCK key for NAND encryption ī‚§ parm=nand_crypt_use_sck_key:Use SCK key instead of default ADB key for NAND encryption HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 41. BREAKING STi7111 CHIPSET Firmware data / code for STi7111 chip ī‚¨ Hints in sttkdma_core_user.ko module ī‚¤ ī‚¤ ī‚¤ ī‚¨ Code symbols ī‚§ st_tkdma_loader ī‚§ st_tkdma_loader_checksum Data symbols ī‚§ tkdma_fw_address_1 ī‚§ tkdma_fw_address_2 Writing data / code to STi7111 chip’s I/O space ī‚§ 5944 code bytes ī‚§ 1156 data bytes Firmware code implementing unknown processor instructions HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 42. BREAKING STi7111 CHIPSET SLIM Core processor ī‚¨ ī‚¨ IST FP6 PROSYD EU project (http://www.prosyd.org) Paragraph 2.3 of Deliverable D1.4/1 gives some information about the SLIM Core Processor ī‚¤ a collaboration between ST UK and OneSpin after the spin-off from Infineon ī‚¤ lightweight processor with 27 instructions and a 4-stage pipeline ī‚¤ processor special features: a coprocessor interface; circular buffer operation; a STOP instruction ī‚¤ instructions opcode names: ADD - BRA - CPI - JAB - LD LDF - NOP - RPT - STI -STF - STOP – SUBC. HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 43. BREAKING STi7111 CHIPSET JMP instruction format ī‚¨ OpenDuckbox project (http://gitorious.org/openduckbox-project-sh4) GNU source code for SLIM Core Generic driver ī‚¤ slim_boot_core function leaks information about the format of one Slim Core instruction (JMP) ī‚§ memory addressing (by word number) ī‚§ instruction opcode width ī‚¤ // Init imem so every instruction is a jump to itself for (n = 0; n < core->imem_size / 4; n++) SLIM_IMEM(core, n) = 0x00d00010 | (n & 0xf) | ((n & 0xfff0) << 4); HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 44. BREAKING STi7111 CHIPSET Finding patterns in SLIM Core code HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 45. BREAKING STi7111 CHIPSET Reverse engineering SLIM Core instructions ī‚¨ Discovery of SLIM Core instruction opcodes Exploited the ability to change the operation of SLIM Core firmware in runtime ī‚§ Overwriting chip’s memory loaded with firmware code ī‚§ should secure crypto chip allow for it ? ī‚¤ Replacement of an arbitrary instruction from the code path of GetPublicID function ī‚¤ Analysis of the instruction’s execution effect to memory and registers ī‚§ Discovery of load / store instructions format ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 46. BREAKING STi7111 CHIPSET Reverse engineering SLIM Core instructions (2) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 47. BREAKING STi7111 CHIPSET Reverse engineering SLIM Core instructions (3) ī‚¨ JMP and LOAD/STORE instructions sufficient to discover the meaning of all other instructions ī‚¤ JMP from firmware to user’s code path ī‚§ STORE the contents of registers (firmware context) – LOAD user’s environment (contents of registers) – EXECUTE unknown SLIM Core instruction opcode – STORE user’s environment (contents of registers) ī‚§ LOAD the contents of registers (firmware context) ī‚¤ JMP back to firmware code path ī‚¨ The need to properly handle conditional jumps HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 48. BREAKING STi7111 CHIPSET Reverse engineering SLIM Core instructions (4) ī‚¨ One instruction opcode at a time LOAD / STORE instructions ī‚¤ MOV instructions ī‚¤ CMP instructions ī‚¤ Conditional branching instructions ī‚¤ Computational instructions ī‚¤ Other instructions (bit extraction, manipulation) ī‚¤ RPT instruction ī‚¤ ī‚¨ Scope limited to unknown opcodes from firmware code HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 49. BREAKING STi7111 CHIPSET Reverse engineering SLIM Core instructions (5) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 50. BREAKING STi7111 CHIPSET SLIM Core disassembler ī‚¨ Final disassembly dump of Slim Core firmware code 1400+ instructions disassembled ī‚¤ ~11 instruction opcodes not recognized ī‚§ Not relevant from the analysis point of view ī‚¤ ī‚¨ Sufficient data for firmware analysis Discovery of separate dispatching for DMA and all TKD operations ī‚§ Semi-threads (context-switching) ī‚¤ Discovery of a key initialization subroutine ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 51. BREAKING STi7111 CHIPSET Tracing SLIM Core firmware ī‚¨ ī‚¨ The goal was to locate SLIM Core instruction sequences implementing DecryptKey functionality Tracer implementation ī‚¤ SLIM core part ī‚§ Custom code on the GetPublicID function path – – – ī‚¤ Binary instrumented instruction copied from a currently traced code location SLIM Core instruction executed in the original registers context Heavy use of the SLIM core disassembler Java part ī‚§ Logging ī‚§ SLIM Core syncing and control code HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 52. BREAKING STi7111 CHIPSET Tracing SLIM Core firmware (output log) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 53. BREAKING STi7111 CHIPSET Tracing SLIM Core firmware (DecryptKey code) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 54. BREAKING STi7111 CHIPSET Internal crypto core (TKD) commands ī‚¨ Static analysis of SLIM Core firmware disassembly ī‚¤ Discovery of internal chip commands HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 55. BREAKING STi7111 CHIPSET TKD inspector ī‚¨ Discovery of the meaning of TKD commands by the means of executing special SLIM Core instruction sequence HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 56. BREAKING STi7111 CHIPSET TKD inspector (playing with the commands) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 57. BREAKING STi7111 CHIPSET TKD commands format HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 58. BREAKING STi7111 CHIPSET TKD commands format (key operations explained) ī‚¨ TKD CMD 0x00ff0000 Setting encrypted Control Word Pairing Key (CWPK) ī‚¤ Interpreted as decryption (always) of register input (0xff) with SCK key (0x00) and storing the result at a key slot 0x00 ī‚¤ ī‚¨ TKD CMD 0x20ff0001 Setting encrypted Control Word ī‚¤ Interpreted as decryption (0x01) of register input (0xff) with SCK key (0x00) and storing the result at a key slot 0x20 ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 59. BREAKING STi7111 CHIPSET Security vulnerability #1 (step 1) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 60. BREAKING STi7111 CHIPSET Security vulnerability #1 (step 2) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 61. BREAKING STi7111 CHIPSET Security vulnerability #1 (formula) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 62. BREAKING STi7111 CHIPSET Security vulnerability #2 (step 1) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 63. BREAKING STi7111 CHIPSET Security vulnerability #2 (step 2) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 64. BREAKING STi7111 CHIPSET Security vulnerability #2 (formula) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 65. BREAKING STi7111 CHIPSET STi7111 security vulnerabilities (SoC location) HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 66. BREAKING STi7111 CHIPSET Control Word Pairing Key ī‚¨ ī‚¨ Issue 18 makes use of the encrypted value of the chipset pairing key (CWPK) CWPK key sent by the operator at the time of activating user’s subscription ī‚¤ ī‚¨ Encrypted CWPK key bytes returned by the Conax card in response to EMM message For ITI2850ST and ITI2849ST set-top-boxes encrypted CWPK key encrypted again and cached in a file ī‚¤ ī‚¤ /mnt/flash/secure/7/0 libstd_cai_client_conax7.so API for decryption HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 67. PROOF OF CONCEPT CODE Implemented functionality ī‚¨ Access to information about cryptographic keys Plaintext Control Words (STi7100) ī‚¤ Plaintext Control Words and plaintext CWPK (STi7111) ī‚¤ ī‚¨ ī‚¨ Control Words sharing via network between arbitrary decoders protected with Conax conditional access method and chipset pairing Video on Demand ECM decryption and sharing of programming protected with Conax conditional access method with chipset pairing HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 68. PROOF OF CONCEPT CODE Control Words sharing (aka. signal theft) ī‚¨ Sharing of the crypto keys used to descramble digital satellite TV programming HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 69. PROOF OF CONCEPT CODE Push VOD sharing ī‚¨ Sharing of the crypto keys used to descramble VOD movies ī‚¤ ī‚¤ ī‚¤ Obtaining Control Word for arbitrary movie during the rental period ī‚§ VOD movies rented for 48 hours period ī‚§ Encrypted MPEG data pushed into set-top-boxes ī‚§ ECM messages accompanying movies files Sharing Control Words after the rental period Using plaintext CW values to descramble the movie ī‚§ The use of key memory beyond index 0x32 on STi7100 ī‚§ The use of CWPK to reencrypt Control Word on STI7111 HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 70. SUMMARY STi7100 / STi7111 security vulnerabilities ī‚¨ How come the issues were not discovered before the market release ? STMicroelectronics a major silicon vendor ī‚§ #1 in Europe , #7 in the world (source: Wikipedia) ī‚¤ Conax security evaluation of STB / CAM / DVB chipset solutions ī‚§ Final scoring of STi7100/STI7111 not disclosed to Security Explorations ī‚¤ HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 71. SUMMARY Vulnerabilities Impact ī‚¨ ī‚¨ No information from STMicroelectronics (DVB chipsets vendor) in response to the impact inquiry questions ī‚¤ All your inquiries, as listed below, are pointing towards confidential information and as such can not be disclosed by ST to you or to others. Jan-17-2011, STMicroelectronics in an email to Security Explorations Impact estimation upon publicly available data HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 72. SUMMARY Vulnerabilities Impact (2) ī‚¨ Cumulative MPEG-2 & MPEG-4 Shipments in 2008 ī‚¤ 541 millions of units ī‚§ Set-top-boxes, digital television sets, DVD / Bluray players ī‚¨ ī‚¨ STMicroelectronics #1 in H.264 market (68% of market share in 2008) Customers from Europe, Middle East and Africa, Asia-Pacific and the Americas ī‚¤ ī‚¤ ī‚¤ ī‚¤ ī‚¤ DishTV (India) DirectTV (USA) Platforma N, Cyfrowy Polsat (Poland) BSkyB (UK) â€Ļ Source: Multimedia, Philippe Lambinet, STMicroelectronics HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands
  • 73. SUMMARY Final Words ī‚¨ First successful attack against the implementation of a Conax conditional access system with chipset pairing ī‚¤ ī‚¤ ī‚¨ Security based on a complex, secret functionality embedded in a silicon is a dangerous concept ī‚¤ ī‚¨ ī‚¨ Pay TV piracy possible in the environment of hacked digital satellite TV set-top-boxes Security of dedicated DVB chipsets broken Security through Obscurity ? The need to improve security and evaluation processes by silicon and CAS vendors The need to tighten set-top-boxes security relying on vulnerable DVB chipsets HITBSecConf, May 24-25, 2012, Amsterdam, The Netherlands