Broadcasting encryption or systematic #FAIL? Phil



Similar documents
Attacks on Pay-TV Access Control Systems. Markus G. Kuhn Computer Laboratory

ADVANCED IC REVERSE ENGINEERING TECHNIQUES: IN DEPTH ANALYSIS OF A MODERN SMART CARD. Olivier THOMAS Blackhat USA 2015

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Side Channel Analysis and Embedded Systems Impact and Countermeasures

CryptoFirewall Technology Introduction

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

Chapter I Model801, Model802 Functions and Features

EV-8000S. Features & Technical Specifications. EV-8000S Major Features & Specifications 1

What is LOG Storm and what is it useful for?

Reverse engineering hardware for software reversers: studying an encrypted external HDD

Monitoring Conditional Access Systems

Horst Görtz Institute for IT-Security

2.0 Command and Data Handling Subsystem

MANUAL FOR RX700 LR and NR

Atmel s Self-Programming Flash Microcontrollers

Secure My-d TM and Mifare TM RFID reader system by using a security access module Erich Englbrecht (info@eonline.de) V0.1draft

Chapter 13. PIC Family Microcontroller

PUF Physical Unclonable Functions

Atmel Norway XMEGA Introduction

DVCrypt Conditional Access System

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

Sample Project List. Software Reverse Engineering

PCM Encoding and Decoding:

An On-chip Security Monitoring Solution For System Clock For Low Cost Devices

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

The Programming Interface

MXMedia CipherStream. Preliminary Assessment. Copyright 2012 Farncombe 1.0. Author: T F

sndio OpenBSD audio & MIDI framework for music and desktop applications

RVS Seminar Deployment and Performance Analysis of JavaCards in a Heterogenous Environment. Carolin Latze University of Berne

How To Hack A Satellite Receiver For Profit On A Pc Or Ipad (For A Pb) For A Pk (For An Ipad) For Free (For Pc) For Your Computer) For The First Time (For Your Computer Or

ET-BASE AVR ATmega64/128

Using AES 256 bit Encryption

Data recovery from a drive with physical defects within the firmware Service Area, unrecoverable using

WANPIPE TM. Multi-protocol WANPIPE Driver CONFIGURATION M A N U A L. Author: Nenad Corbic/Alex Feldman

Security in ST : From Company to Products

National CR16C Family On-Chip Emulation. Contents. Technical Notes V

Embedded Java & Secure Element for high security in IoT systems

AN974 APPLICATION NOTE

Embedded Software Development: Spottbillige Hardware + OSS = Zum Spielen zu Schade!

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Security testing of hardware product

Information Security Group (ISG) Core Research Areas. The ISG Smart Card Centre. From Smart Cards to NFC Smart Phone Security

Computer and Set of Robots

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Introducing AVR Dragon

Wireless ATA: A New Data Transport Protocol for Wireless Storage

Hacking Satellite TV receivers : Are those IoT devices secure?

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

High-Stability Time Adjustment with Real-Time Clock Module

1 / 25. CS 137: File Systems. Persistent Solid-State Storage

CSE 237A Final Project Final Report

How To Recognize Voice Over Ip On Pc Or Mac Or Ip On A Pc Or Ip (Ip) On A Microsoft Computer Or Ip Computer On A Mac Or Mac (Ip Or Ip) On An Ip Computer Or Mac Computer On An Mp3

Smart Card Technology Capabilities

SY system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

Secure application programming in the presence of side channel attacks. Marc Witteman & Harko Robroch Riscure 04/09/08 Session Code: RR-203

TWI module seems buggy in multi-master communications

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Real-Time DMB Video Encryption in Recording on PMP

A common weakness in RSA signatures: extracting public keys from communications and embedded devices

Breaking the Security of Physical Devices

Securing Host Operations with a Dedicated Cryptographic IC - CryptoCompanion

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Today. Important From Last Time. Old Joke. Computer Security. Embedded Security. Trusted Computing Base

SECURE IMPLEMENTATIONS OF CONTENT PROTECTION (DRM) SCHEMES ON CONSUMER ELECTRONIC DEVICES

Flash Corruption: Software Bug or Supply Voltage Fault?

Security in Near Field Communication (NFC)

Advances in Smartcard Security

Hardware Trojans Detection Methods Julien FRANCQ

Here is a demonstration of the Aqua Accelerated Protocol (AAP) software see the Aqua Connect YouTube Channel

Embedded devices as an attack vector

Introducing etoken. What is etoken?

Serial Communications

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

Continuity Monitoring of Audio, Video and Data in a Multi-Channel Facility David Strachan Evertz Microsystems, Ltd.

Acano solution. Security Considerations. August E

Using the Siemens S65 Display

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

Smart Cards a(s) Safety Critical Systems

STB- 2. Installation and Operation Manual

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

Safer data transmission using Steganography

How to hack your way out of home detention

Memory Basics. SRAM/DRAM Basics

Serial port interface for microcontroller embedded into integrated power meter

8-bit RISC Microcontroller. Application Note. AVR910: In-System Programming

Trigger-to-Image Reliability (T2IR)

Northrop Grumman M5 Network Security SCS Linux Kernel Cryptographic Services. FIPS Security Policy Version

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

Reviving smart card analysis

Digital Video Broadcasting Conditional Access Architecture

AVR Butterfly Training. Atmel Norway, AVR Applications Group

Computer Organization. and Instruction Execution. August 22

Digital Rights Management

1. Led IN. 2. Led OUT. 3. Led LINK During boot time During normal operation

Transcription:

WE 201 EK 2 42 Broadcasting encryption or systematic #FAIL?

SUMMARY Intro : Broadcasting something... 1984 : Discret 11 1995 : Syster 1996 2002 : Seca 1 2002 2008 : Seca 2 Conclusion 2/49

Broadcasting : For the masses Encrypted Stream Picture + sound Signaling 2 problems : Broadcast is for everyone No uplink 3/49

Crypted Stream Signaling Broadcasting : The receiver Session KEY Audio Video Unscrambled Audio Video Bad luck : RED and GREEN are UNIQUE for EVERYONE 4/49

Broadcasting: Secure device EEPROM Signaling (ECM) CPU Monthly key Session key CRYPTO ENGINE Bad luck2 : RED and GREEN are UNIQUE for EVERYONE 5/49

Broadcasting : Monthly update User key Signaling(EMM) CPU Rate, 1 per hour EEPROM Monthly key CRYPTO ENGINE The UNIQUE value per subscriber is an UPDATE key! 6/49

1984 The first pay-tv system in France : «DISCRET 11» 7/49

Discret 11 8/49

Discret 11 Vintage! 9/49

Discret 11 Main motivation? Challenge Fun $$$ And 10/49

Discret 11 #P0rn A porn movie broadcasted each first Saturday of the month 11/49

Discret 11 : The image The image, regarding to the timing aspect of each line. Next frame 3 differents lines 0 : need to wait 1804ns 1 : need to wait 902ns 2 : line on time 0 1 2 12/49

Discret 11 : First hack White line First implementation Voltage comparators, and live line timing adaptation. Black line Broadcast start the 4 November 1984. This implementation was published in December 1984 in a french electronic magazine! Not a perfect solution, sometime with black line, the hack didn't apply the correct delay. 13/49

Discret 11 : countermeasures Countermeasures to kill pirate decoder : All the line that must be late are cropped. 52 µs As only 52µs of signal is displayed, it did not disturb too much the viewer. 64 µs 14/49

Discret 11 : clone The EEPROM to clone for using the subscription of your friend. In 1984 it was secure, because no one own an EEPROM programmer Monthly update coupon Dump of the EEPROM 9306 FFFF A1AA A2AA FFFF A405 FFFF A6A8 FFFF FFFF A1AA A2AA A305 FFFF A566 A6AC FFFF 15/49

Discret 11 : full disclosure The full encryption scheme was discover by only looking the sequences of pictures. Each 6 frames the scrambling sequence restart 11 for 2^11 : the size of the delay table The monthly code is only the start point of the delay table. Ability to automatically find the monthly code. Important : today the original code in the official receiver have never been dumped! Nothing other than pictures was needed to break the system. 16/49

1995 Second pay-tv system in France : «SYSTER» 17/49

Syster : the decoder All the secret in the white KEY but... 18/49

Syster : the picture 19/49

Syster : picture more closer With SECAM one line have RED color information encoded, the next one the BLUE, and so. The line MIX done by the crypt system break this rules of RBRBRBRBRB lines. While monitoring the color of each lines it was possible to reconstruct each frame, without knonwing the real algorithm & session KEY. The decoder was build by Kudelski, but we add always bet it was designed for PAL system. Bad luck, it's SECAM in France They did not learn from the 1984 lesson! 20/49

Syster : bad dayz, but... The countermeasure had certainly ask a lot of brain at Kudelski engineer : find an encryption scheme who did not break the RBRBRBRB sequence. They manage in and kill all the pirate decoder. One point! But The white KEY as show all it's secret with a simple buffer overflow & code injection. Then, dump, learn, implement & so 21/49

1996-2002 Satellite broadcasting, Stage 1... «SECA 1» 22/49

SECA 1 First try for the provider in the wonderful satellite world with European broadcasting. All the cards broken with software bugs. All secrets known, thousands implementation of emulators. Revival and clone of official cards without much pain. All the different version of SECA 1's ROM had never secure anything more than a short period 23/49

2002-2008 Satellite broadcasting, Stage 2, «SECA 2» 24/49

SECA 2 : The black screen This time, a secure card... Let's share it! 25/49

SECA 2 : Share your card DVB norm born in 1993 : No connection between peers in 1993, but now-day it's a fact. Let's exploit the bad design! 26/49

SECA 2 : the DVB flows Time-line of DVB streaming t0 t1 Video 0 t2 Video 1 t3 Video 2... Signaling 0 Signaling 1 Signaling 2 Current Next KEY0 KEY1 KEY1 KEY2 Delay KEY2 KEY3... 10 seconds t0 : zap on a channel, ask KEY0 KEY1, use KEY0 t1 : use KEY1 and ask for KEY1 KEY2 10 secs to grab the next session key, an eternity... 27/49

SECA 2 : hardware for sharing Server side : a cheap ISO7816 smarcard reader and a TCP/IP session manager. Tips : a 3,57MHZ clock is the norm. But overclocking the card at 6.00MHZ is fine, faster zapping! 28/49

SECA 2 : hardware for sharing Client side : Modified rented receiver (JTAG) with extra code added to grab session KEY over a serial port + a PC or a Linux embedded device to run a session manager connected to internet. 29/49

SECA 2 : countermeasures An annoying feature : an extra encryption on the signaling datas. Usually AES is used and the signaling is decrypted by the receiver before sending ECM to the card. To solve this problem, needs to reverse the firmware of an official running set top box and extract the AES KEY needed to clean the ECM before send it to the card server. Until, no real countermeasures on card sharing. Nowadays a rate limit on a card : no ECM serial flow from different channels are allowed. Even a fast zapping can lock the card and need a RESET to run again. 30/49

SECA 2 : The smartcards 3 ROM : but all the reverse based on the V7.0 from Italia, because the dump was available. The studying of the 64KB ROM show no strong software bug, only the ability to write datas/instructions in EEPROM, but no way to jump in. Useful but not enough... So, let's go for the real stuff : Faults injection 31/49

SECA 2 : The microcontroller ATMEL 90SC6464C On the paper : «Secure Control» Black Hat 2008 say: «The most secure of the available OTS choices». Bad luck for us... Ok, but let's check this feature 32/49

SECA 2 : Glitches At 3.57MHZ : trying glitches on VCC and CLK, nothing other than reset even or sometime kill the card. At 800KHZ : no way with VCC, but random faults obtained with the CLK. At 1MHZ : same behavior. But we needs stability and reproduce the behavior 33/49

SECA 2 : THE glitch With CLK=1MHZ, glitch 50ns after the edge, pulse is 20ns wide. Works each time : skip an instruction. 34/49

SECA 2 : The CPLD Simulation of the CPLD core program Main function of the CPLD : the glitches generation 35/49

SECA 2 : The «unlooper» How it works : 100MHZ CLK= 10MHZ CPLD XC9536XL CLK=1MHZ + Glitches Ask for glitches CPU AT90S2313 I/O One single clock for all. Card CLK / CPU CLK ratio : 1/10 Enough for accurate cycles counting 36/49

SECA 2 : The «unlooper» 50ns, 20ns, means a clock of 100MHZ. Hard for hobbyists like us But this can be bought for a few bucks : Cut & strap few connections, replace the CPLD, remove IC slowing lines, the modded one is ready and stable : 37/49

SECA 2 : Synchronise it Synchronize the CPU & the card at the cycle. Need a reference point to start count cycles : when the last bit of the command is send, the CPU start to count. The ratio of 1/10 between card & CPU allow to be accurate and never miss a cycle. So, we are ready to hit an instruction, but how to count cycles?!? 38/49

SECA 2 : Count the cycle The needs of a simulator Manually count cycles is impossible : glitch an instruction after 55709 cycles can't be counted on our finger «AVR studio» help us on this point. But we needed to mod the instructions of the full ROM because AT90SC6464C is not supported. 39/49

SECA 2 : Random delay Another security feature : random delays in execution flow. 100% of the code in the card is non constant timing. Was a problem without the dump to reproduce behaviors; but with the dump, just need to skip the calls to the function. 40/49

SECA 2 : Stack manipulation ROM dump show us a nice function : A command (C1 B4) doing RAM copy. With the help of 5 glitches and special crafted parameters, this command can write in RAM any bytes. This can be used to override the return address in the stack and jump in EEPROM. 41/49

SECA 2 : List of the tools In our toolbox we have now : 1.Software bug to write 4x22 bytes in EEPROM. 2.Hardware (unlooper) to handle the card and hit any instruction in execution flow. 3.A AT90SC6464C simulator for ROM cycles count & running code. 4.Stack manipulation ability. 42/49

SECA 2 : THE attack! Scenario for running our own code : 1.Assemble and write the code EEPROM using the software bug. in 2.Use unlooper to send the glitches while sending C1 B4 command to jump in the EEPROM. 3.Get the result of our code as a legacy command would return values. 43/49

SECA 2 : Applications Benefits of running our code : 1.Dump every part of ROM/RAM/EEPROM for studying purpose, but also : Monthly key User management key 2.Replace any byte in EEPROM : Change RSA private key to avoid counter measures. Replace serial number, management key from a valid customer. 44/49

SECA 2 : Backdoor Now let's write our backdoor : Another nice feature is the ability for the provider to send upgraded code in the card. Using this feature allow us to run homebrew functions, but WITHOUT unlooper. With a simple ROM / RAM / EEPROM management backdoor, you have the full access with a simple ISO 7816 reader. 45/49

SECA 2 : Backdoor API : 133 bytes mandatory : Byte1 = FLASH or RAM Byte2:Byte3 = ADR Byte4 = LEN Byte5 = Write EEPROM or dump ROM or EEPROM Byte6:Byte133 = datas 46/49

SECA 2 : countermeasures Some try to hit cloned cards, but as we disallow the code upgrade ability (backdoor & RSA KEY), no way for the provider to gain again control! With our degree of management of the card, no countermeasures were really possible We 0nw U! 47/49

SECA 2 : Emulators As every secret was available, implementation of emulators in cheap smartcards with onboard fast enough RSA / SHA1 was possible with full autoupdate features. This time a strong countermeasure appears : The card wasn't based on a standard AT90SC6464C A modified version with a custom designed cryptoengine was used. Some basics functions were recovered by cryptanalysis (or unknown means), but the strong customs functions remind today undiscovered. They 0wn Us! 48/49

This is the end... To conclude : Beware of hobbyist with no means, time, determination and brains. Fun! The SECA 3 is not compromissed, give it a try? Questions? 49/49