SlideShare a Scribd company logo
1 of 47
Download to read offline
Implementation of MITM Attack on
           HDCP-Secured Links
                         bunnie / 28c3

      Twitter your comments @bunniestudios or #28c3


December 29, 2011 28c3       bunnie
What is HDCP?
 • High Definition Content Protection
      – Pixel-level encryption operating at the link layer
 • Cipher structure
      – Stream cipher capable of generating 24 bits of
        pseudorandom data per clock cycle
            • Two parallel 84-bit block functions per round
            • LFSR-based “key scheduler” that whitens block functions at the
              beginning of each horizontal line of pixels
            • Block functions initialized with publicly exchanged 64-bit initial
              vector (An) that evolves once during each vertical blanking
              interval

December 29, 2011 28c3                 bunnie
What is HDCP?
 • Key management
      – Distributed private keys with sort of key revocation
      – Public key is a “key selection vector” (KSV)
            • 40 bits (20 zeros and 20 ones)
      – Private key is a vector of 40 56-bit numbers
      – All private keys derived from a master key consisting of a
        40x40 matrix of 56-bit numbers
 • Master key can be directly computed from a
   collection of 40 unique private keys
      – The master key was revealed in September 2010

December 29, 2011 28c3                 bunnie
Why HDCP?
 • Encrypt video transmissions
      – Complements AACS, BD+ to create studio-to-screen
        cryptographic chain
 • Chain was broken long ago: AACS was the weakest
   link
      – HDCP master key leak is thus largely a “nop” from the
        content access standpoint
      – Strippers based on legitimate HDCP keys have long been
        available on the market; key revocation is largely
        ineffective

December 29, 2011 28c3         bunnie
So Why Implement HDCP MITM?
 • It’s about control
      – Broadcasters and studios control your screen
      – DMCA and other legal tricks make it illegal for you
        to modify content – on your own screen




December 29, 2011 28c3       bunnie
So Why Implement HDCP MITM?
 • HDCP restricts the implementation of
   legitimate content manipulation
      – Picture in picture
      – Content overlays
      – 3rd party filtering & image modification
 • As a result, there are few HDMI video mixing
   solutions that can operate on
   broadcast/movie content
December 29, 2011 28c3        bunnie
Goal
 • Consumer-side content remixing
      – Add web content to existing TV
      – Live comment & chat
 • “Over the top” advertising
      – Eliminate ads
      – Or replace ads with targeted ads
 • Interactive TV
      – Add interactive elements to broadcast TV
 • Compatibility with any TV

December 29, 2011 28c3         bunnie
How Do We Do It?




December 29, 2011 28c3          bunnie
December 29, 2011 28c3   bunnie
A’: Intercept and override EDID
 • HDMI uses an I2C bus (referred to as DDC) to
   communicate between video source & sink
 • Bus shared between two functions:
      – Monitor capability identification
      – HDCP key exchange




December 29, 2011 28c3       bunnie
Snoop & squash
 • Snooping: intercept key exchange
 • Squashing: force TV characteristics
      – The implementation can’t do all HDMI standards
      – Rewrite the EDID record on the fly to reflect only
        the standards NeTV supports, e.g. no 3D, etc.




December 29, 2011 28c3         bunnie
I2C snoop & override




December 29, 2011 28c3       bunnie
I2C snoop & override




December 29, 2011 28c3       bunnie
I2C snoop & override



 • Oversampled squash can modify data on the
   fly
      – Snoop address, and change only bits that need
        changing

December 29, 2011 28c3       bunnie
Hot Plug Override
 • Hot plug bus has a FET on it to simulate a
   plug/unplug event
      – Hot plug is an open-drain bus, so this is a safe and
        easy thing to do
      – Used to resynchronize state when necessary
      – Used to manipulate EDID state



December 29, 2011 28c3          bunnie
December 29, 2011 28c3   bunnie
B’, C’, D’: Intercept keys & sync cipher
 • Getting An, AKSV, BKSV accomplished with
   I2C snooper listening for specific addresses
 • Once key exchange is captured, private key
   vector and shared secret must be derived
      – Final byte write of AKSV is “trigger” to start
        authentication
      – FPGA fires interrupt to host linux system
      – udev event starts a helper program that does the
        math
December 29, 2011 28c3      bunnie
Computing Private Keys




 • Modular inner product of master key and public key
   vectors
      – HDCP master key K is 40x40 matrix of 56-bit numbers
      – AKSV, BKSV are 40-bit numbers consisting of 20 ones and 20 zeros
      – APK, BPK are 40-element vectors of 56-bit numbers

December 29, 2011 28c3             bunnie
Computing Shared Secret
                 BKSV · APK      = Km            AKSV · BPK    = Km

                 0       APK00                   1     BPK00
                 1       APK01                   0     BPK01
                 .                               .
                 .                 Km            .               Km
                 .                               .
                 1       APK38                   1     BPK38
                 0       APK39                   1     BPK39


 • Multiply KSVs by private keys to get 56-bit shared
   secret Km


December 29, 2011 28c3                  bunnie
Synchronize Ciphers
 • Plug An, Km into cipher
   hardware
 • Init key schedules
 • Evolve cipher state
   based on:
      –   Pixclock
      –   HSYNC
      –   VSYNC
      –   Data guardband timings
      –   All in plaintext

December 29, 2011 28c3             bunnie
Pixel-by-pixel synchronization
                                              NeTV
                                         NeTV UI       Tx-synchronized
                                          video         cipher stream




                                       XOR
                                                                                                          TV
Video source                                                                              cipher stream




                                  Swap encrypted pixels for
  Encrypted video                 alternate encrypted pixels                                                   Decrypted video
                    Video cable                                             Video cable


                                                                                               XOR




  December 29, 2011 28c3                                           bunnie
Synchronize Frame Buffers
 • Overlay pixels must be exactly timed to video
   pixels
 • Overlay comes from /dev/fb0 of attached linux
   computer
 • Challenges
      – linux interrupt jitter is too high (10’s to 100’s of us, i.e.
        thousands of pixels)
      – Local crystal oscillators drift over time (100’s of pixels per
        frame)
      – Ultimately, overlay “jitters” and “drifts” without tight
        synchronization

December 29, 2011 28c3            bunnie
Synchronize Frame Buffers
 • Technique #1: source graphics engine pixclock from
   video, not locally




December 29, 2011 28c3    bunnie
Synchronize Frame Buffers
 • Technique #1: source graphics engine pixclock from
   video, not locally
 • Technique #2: derive timing dynamically from video
   stream and set /dev/fb0 properties to match




December 29, 2011 28c3   bunnie
Synchronize Frame Buffers
 • Technique #1: source graphics engine pixclock from
   video, not locally
 • Technique #2: derive timing dynamically from video
   stream and set /dev/fb0 properties to match
 • Technique #3: start LCD DMA based on VSYNC
   start from video stream



December 29, 2011 28c3   bunnie
Synchronize Frame Buffers
 • Technique #1: source graphics engine pixclock from
   video, not locally
 • Technique #2: derive timing dynamically from video
   stream and set /dev/fb0 properties to match
 • Technique #3: start LCD DMA based on VSYNC
   start from video stream
 • Technique #4: add a few video lines’ elastic FIFO
   buffering to absorb VSYNC interrupt jitter

December 29, 2011 28c3   bunnie
Chroma Key
 • Chroma key reserves a specific color and
   substitutes its value for “transparent”
 • In this implementation, F0,00,F0 (a shade of pink) is
   the magic color
      – A comparator within the FPGA inspects every pixel and
        switches a mux


                         +                            =

                                          Image copyright © 2008, Blender Foundation / www.bigbuckbunny.org CC-BY-3.0

December 29, 2011 28c3           bunnie
HDMI Connector
            RGB to TMDS
              Serialize
                          bunnie
                          December 29, 2011 28c3
        TMDS to RGB
         Deserialize
HDMI Connector
Optimizations
 • Key caching
      – Every video source/sink pair has a constant shared secret
      – Km is cached after first computation to improve system
        robustness
 • EDID caching
      – More important because without EDID caching, users will
        see a double-blink of the screen
            • First blink is to measure the TV’s capabilities
            • Then we compute the intersection of the TV capabilities and
              NeTV capabilities
            • Second blink is to override the capabilities we don’t support

December 29, 2011 28c3                bunnie
The Bigger System Picture




                                           HDMI Connector
              HDMI Connector




December 29, 2011 28c3         bunnie
A Complete Open Stack
              Provisioning & update server (EC2)




                                                   OpenEmbedded/
               HTML/javascript widgets (github)




                                                      buildbot
                            Webkit
                  Angstrom distro (apps/tools)
               U-boot                Linux
                            FPGA (verilog)
                                 PCB
                                Plastics
December 29, 2011 28c3               bunnie
Application Environment
 • TV overlay apps are web pages
      – CSS configured to put “magic pink” as background
      – Apps are javascript/HTML programs
      – But you can extend to any infrastructure that can write to
        /dev/fb0 (SDL, Flash, etc.)
 • Our demo apps are open source and stored in a github
   repo
      – Updating apps consists of doing a git pull on the client
      – Configured to pull every reboot
 • Firmware updates served from EC2 infrastructure
      – Public AMI provided so you can make your own
      – More on this later

December 29, 2011 28c3               bunnie
HTTP API
 • Zeroconf solution for networked interaction with TV
      – API provides method to send events to NeTV
            • So, a smartphone can:
                  – Discover NeTV with Bonjour
                  – Send events (such as SMS) to the NeTV using HTTP GET
                  – NeTV renders these events on your TV
            • Also provides a method for file upload to enable photosharing to the TV
      – Fast, easy integration into “smarthome” environment
      – Example call:
        http://10.0.88.1/bridge?cmd=tickerevent&message=Hello%World&
        title=Hello%20World
      – Each API call can be restricted to just localhost for security


December 29, 2011 28c3                     bunnie
Turnkey Build System
 • Public Amazon EC2 instance with pre-built
   Angstrom distribution
      – Saves hours of effort downloading & building
        sources
      – Instance comes configured with local git repo and
        buildbot to manage builds
      – Built images configured to fetch updates from
        your own instance

December 29, 2011 28c3       bunnie
Launching an EC2 AMI




December 29, 2011 28c3      bunnie
Local cgit repo




December 29, 2011 28c3         bunnie
Auto-build triggers based on commits




December 29, 2011 28c3   bunnie
Distribute Finished Builds
 • Image once, auto-update forever




December 29, 2011 28c3     bunnie
Hardware is Open




December 29, 2011 28c3          bunnie
Plastics are Open




December 29, 2011 28c3          bunnie
Pr0n




December 29, 2011 28c3    bunnie
Schematics




December 29, 2011 28c3       bunnie
And PCB Layout




December 29, 2011 28c3         bunnie
A Complete Open Solution to HDCP MITM
 • Hardware
      – Schematics, PCB, industrial design, FPGA
 • Software
      – Complete, turn-key cloud-based build
        environment
            • Half an hour from start to production-grade
              deployment
 • Available at adafruit.com
   (http://www.adafruit.com/products/609)
December 29, 2011 28c3            bunnie
Recap: HDCP MITM Implementation
 • Complete HDCP MITM solution demonstrated
      –   Intercept key exchange on the fly
      –   Derive shared secrets & synchronize Tx ciphers
      –   Multiplex overlay video using chroma key
      –   Avoids decrypting data, therefore DMCA-safe
      –   Modifies EDID records to force compatibility
 • Enables video compositing functionality
      – Enables unconnected legacy TVs to now have connected TV
        capabilities
      – Enables you to modify your video content (stop/modify ads,
        show live internet commentary, etc.)
 • A completely open hardware/software stack

December 29, 2011 28c3               bunnie
Non-Infringing Use of HDCP Master Key!
 • Embodiment of a bona-fide, non-infringing and
   commercially useful application of the HDCP
   master key
 • Blurs the association of the HDCP master key with
   piracy
      – Prior to this exploit, the only application of the HDCP
        master key was to circumvent the encryption on
        copyrighted data
      – Now, there is a non-circumventing application for the
        HDCP master key

December 29, 2011 28c3           bunnie
Q&A




December 29, 2011 28c3    bunnie

More Related Content

Similar to A non-copyright circumventing application of the HDCP master key

H.265ImprovedCE_over_H.264-HarmonicMay2014Final
H.265ImprovedCE_over_H.264-HarmonicMay2014FinalH.265ImprovedCE_over_H.264-HarmonicMay2014Final
H.265ImprovedCE_over_H.264-HarmonicMay2014FinalDonald Pian
 
H 264 in cuda presentation
H 264 in cuda presentationH 264 in cuda presentation
H 264 in cuda presentationashoknaik120
 
Iain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson
 
Concerto conmoto
Concerto conmotoConcerto conmoto
Concerto conmotomskmoorthy
 
Transport methods in 3DTV--A Survey
Transport methods in 3DTV--A SurveyTransport methods in 3DTV--A Survey
Transport methods in 3DTV--A SurveyKevin Tong
 
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-ResolutionUltra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-ResolutionIntel® Software
 
Chapter 8 Video
Chapter 8 VideoChapter 8 Video
Chapter 8 Videoshelly3160
 
Building a Wireless Mesh Network Temperature Sensor
Building a Wireless Mesh Network Temperature SensorBuilding a Wireless Mesh Network Temperature Sensor
Building a Wireless Mesh Network Temperature Sensormichaelpigg
 
Encoding at Scale for Live Video Streaming
Encoding at Scale for Live Video StreamingEncoding at Scale for Live Video Streaming
Encoding at Scale for Live Video StreamingRay Adensamer
 
DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...
DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...
DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...Videoguy
 
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDNTech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDNnvirters
 
what_is_a_codec_2010
what_is_a_codec_2010what_is_a_codec_2010
what_is_a_codec_2010Justin Giles
 
FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...
FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...
FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...Alpen-Adria-Universität
 
DIC_video_coding_standards_07
DIC_video_coding_standards_07DIC_video_coding_standards_07
DIC_video_coding_standards_07aniruddh Tyagi
 
DIC_video_coding_standards_07
DIC_video_coding_standards_07DIC_video_coding_standards_07
DIC_video_coding_standards_07Aniruddh Tyagi
 
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張Unity Technologies Japan K.K.
 
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張Unite2017Tokyo
 

Similar to A non-copyright circumventing application of the HDCP master key (20)

H.265ImprovedCE_over_H.264-HarmonicMay2014Final
H.265ImprovedCE_over_H.264-HarmonicMay2014FinalH.265ImprovedCE_over_H.264-HarmonicMay2014Final
H.265ImprovedCE_over_H.264-HarmonicMay2014Final
 
H 264 in cuda presentation
H 264 in cuda presentationH 264 in cuda presentation
H 264 in cuda presentation
 
Iain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video Compression
 
Concerto conmoto
Concerto conmotoConcerto conmoto
Concerto conmoto
 
Transport methods in 3DTV--A Survey
Transport methods in 3DTV--A SurveyTransport methods in 3DTV--A Survey
Transport methods in 3DTV--A Survey
 
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-ResolutionUltra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
Ultra HD Video Scaling: Low-Power HW FF vs. CNN-based Super-Resolution
 
BLE Talk
BLE TalkBLE Talk
BLE Talk
 
Chapter 8 Video
Chapter 8 VideoChapter 8 Video
Chapter 8 Video
 
Building a Wireless Mesh Network Temperature Sensor
Building a Wireless Mesh Network Temperature SensorBuilding a Wireless Mesh Network Temperature Sensor
Building a Wireless Mesh Network Temperature Sensor
 
Encoding at Scale for Live Video Streaming
Encoding at Scale for Live Video StreamingEncoding at Scale for Live Video Streaming
Encoding at Scale for Live Video Streaming
 
Digital TV, IPTV
Digital TV, IPTVDigital TV, IPTV
Digital TV, IPTV
 
DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...
DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...
DYNAMIC REGION OF INTEREST TRANSCODING FOR MULTIPOINT VIDEO ...
 
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDNTech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDN
 
what_is_a_codec_2010
what_is_a_codec_2010what_is_a_codec_2010
what_is_a_codec_2010
 
HEVC Main Main10 Profile Encoding
HEVC Main Main10 Profile EncodingHEVC Main Main10 Profile Encoding
HEVC Main Main10 Profile Encoding
 
FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...
FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...
FaME-ML: Fast Multirate Encoding for HTTP Adaptive Streaming Using Machine Le...
 
DIC_video_coding_standards_07
DIC_video_coding_standards_07DIC_video_coding_standards_07
DIC_video_coding_standards_07
 
DIC_video_coding_standards_07
DIC_video_coding_standards_07DIC_video_coding_standards_07
DIC_video_coding_standards_07
 
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
 
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
【Unite 2017 Tokyo】スクリプタブル・レンダーパイプラインのカスタマイズと拡張
 

More from ada fruit

Toor con2010 - w0z
Toor con2010 - w0zToor con2010 - w0z
Toor con2010 - w0zada fruit
 
WHY DO OPEN SOURCE HARDWARE
WHY DO OPEN SOURCE HARDWAREWHY DO OPEN SOURCE HARDWARE
WHY DO OPEN SOURCE HARDWAREada fruit
 
How to start a kit company
How to start a kit companyHow to start a kit company
How to start a kit companyada fruit
 
Open source hardware - foo camp east 2010
Open source hardware - foo camp east 2010Open source hardware - foo camp east 2010
Open source hardware - foo camp east 2010ada fruit
 
Open source hardware and the web
Open source hardware and the webOpen source hardware and the web
Open source hardware and the webada fruit
 
open source hardware overview
open source hardware overviewopen source hardware overview
open source hardware overviewada fruit
 

More from ada fruit (6)

Toor con2010 - w0z
Toor con2010 - w0zToor con2010 - w0z
Toor con2010 - w0z
 
WHY DO OPEN SOURCE HARDWARE
WHY DO OPEN SOURCE HARDWAREWHY DO OPEN SOURCE HARDWARE
WHY DO OPEN SOURCE HARDWARE
 
How to start a kit company
How to start a kit companyHow to start a kit company
How to start a kit company
 
Open source hardware - foo camp east 2010
Open source hardware - foo camp east 2010Open source hardware - foo camp east 2010
Open source hardware - foo camp east 2010
 
Open source hardware and the web
Open source hardware and the webOpen source hardware and the web
Open source hardware and the web
 
open source hardware overview
open source hardware overviewopen source hardware overview
open source hardware overview
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

A non-copyright circumventing application of the HDCP master key

  • 1. Implementation of MITM Attack on HDCP-Secured Links bunnie / 28c3 Twitter your comments @bunniestudios or #28c3 December 29, 2011 28c3 bunnie
  • 2. What is HDCP? • High Definition Content Protection – Pixel-level encryption operating at the link layer • Cipher structure – Stream cipher capable of generating 24 bits of pseudorandom data per clock cycle • Two parallel 84-bit block functions per round • LFSR-based “key scheduler” that whitens block functions at the beginning of each horizontal line of pixels • Block functions initialized with publicly exchanged 64-bit initial vector (An) that evolves once during each vertical blanking interval December 29, 2011 28c3 bunnie
  • 3. What is HDCP? • Key management – Distributed private keys with sort of key revocation – Public key is a “key selection vector” (KSV) • 40 bits (20 zeros and 20 ones) – Private key is a vector of 40 56-bit numbers – All private keys derived from a master key consisting of a 40x40 matrix of 56-bit numbers • Master key can be directly computed from a collection of 40 unique private keys – The master key was revealed in September 2010 December 29, 2011 28c3 bunnie
  • 4. Why HDCP? • Encrypt video transmissions – Complements AACS, BD+ to create studio-to-screen cryptographic chain • Chain was broken long ago: AACS was the weakest link – HDCP master key leak is thus largely a “nop” from the content access standpoint – Strippers based on legitimate HDCP keys have long been available on the market; key revocation is largely ineffective December 29, 2011 28c3 bunnie
  • 5. So Why Implement HDCP MITM? • It’s about control – Broadcasters and studios control your screen – DMCA and other legal tricks make it illegal for you to modify content – on your own screen December 29, 2011 28c3 bunnie
  • 6. So Why Implement HDCP MITM? • HDCP restricts the implementation of legitimate content manipulation – Picture in picture – Content overlays – 3rd party filtering & image modification • As a result, there are few HDMI video mixing solutions that can operate on broadcast/movie content December 29, 2011 28c3 bunnie
  • 7. Goal • Consumer-side content remixing – Add web content to existing TV – Live comment & chat • “Over the top” advertising – Eliminate ads – Or replace ads with targeted ads • Interactive TV – Add interactive elements to broadcast TV • Compatibility with any TV December 29, 2011 28c3 bunnie
  • 8. How Do We Do It? December 29, 2011 28c3 bunnie
  • 9. December 29, 2011 28c3 bunnie
  • 10. A’: Intercept and override EDID • HDMI uses an I2C bus (referred to as DDC) to communicate between video source & sink • Bus shared between two functions: – Monitor capability identification – HDCP key exchange December 29, 2011 28c3 bunnie
  • 11. Snoop & squash • Snooping: intercept key exchange • Squashing: force TV characteristics – The implementation can’t do all HDMI standards – Rewrite the EDID record on the fly to reflect only the standards NeTV supports, e.g. no 3D, etc. December 29, 2011 28c3 bunnie
  • 12. I2C snoop & override December 29, 2011 28c3 bunnie
  • 13. I2C snoop & override December 29, 2011 28c3 bunnie
  • 14. I2C snoop & override • Oversampled squash can modify data on the fly – Snoop address, and change only bits that need changing December 29, 2011 28c3 bunnie
  • 15. Hot Plug Override • Hot plug bus has a FET on it to simulate a plug/unplug event – Hot plug is an open-drain bus, so this is a safe and easy thing to do – Used to resynchronize state when necessary – Used to manipulate EDID state December 29, 2011 28c3 bunnie
  • 16. December 29, 2011 28c3 bunnie
  • 17. B’, C’, D’: Intercept keys & sync cipher • Getting An, AKSV, BKSV accomplished with I2C snooper listening for specific addresses • Once key exchange is captured, private key vector and shared secret must be derived – Final byte write of AKSV is “trigger” to start authentication – FPGA fires interrupt to host linux system – udev event starts a helper program that does the math December 29, 2011 28c3 bunnie
  • 18. Computing Private Keys • Modular inner product of master key and public key vectors – HDCP master key K is 40x40 matrix of 56-bit numbers – AKSV, BKSV are 40-bit numbers consisting of 20 ones and 20 zeros – APK, BPK are 40-element vectors of 56-bit numbers December 29, 2011 28c3 bunnie
  • 19. Computing Shared Secret BKSV · APK = Km AKSV · BPK = Km 0 APK00 1 BPK00 1 APK01 0 BPK01 . . . Km . Km . . 1 APK38 1 BPK38 0 APK39 1 BPK39 • Multiply KSVs by private keys to get 56-bit shared secret Km December 29, 2011 28c3 bunnie
  • 20. Synchronize Ciphers • Plug An, Km into cipher hardware • Init key schedules • Evolve cipher state based on: – Pixclock – HSYNC – VSYNC – Data guardband timings – All in plaintext December 29, 2011 28c3 bunnie
  • 21. Pixel-by-pixel synchronization NeTV NeTV UI Tx-synchronized video cipher stream XOR TV Video source cipher stream Swap encrypted pixels for Encrypted video alternate encrypted pixels Decrypted video Video cable Video cable XOR December 29, 2011 28c3 bunnie
  • 22. Synchronize Frame Buffers • Overlay pixels must be exactly timed to video pixels • Overlay comes from /dev/fb0 of attached linux computer • Challenges – linux interrupt jitter is too high (10’s to 100’s of us, i.e. thousands of pixels) – Local crystal oscillators drift over time (100’s of pixels per frame) – Ultimately, overlay “jitters” and “drifts” without tight synchronization December 29, 2011 28c3 bunnie
  • 23. Synchronize Frame Buffers • Technique #1: source graphics engine pixclock from video, not locally December 29, 2011 28c3 bunnie
  • 24. Synchronize Frame Buffers • Technique #1: source graphics engine pixclock from video, not locally • Technique #2: derive timing dynamically from video stream and set /dev/fb0 properties to match December 29, 2011 28c3 bunnie
  • 25. Synchronize Frame Buffers • Technique #1: source graphics engine pixclock from video, not locally • Technique #2: derive timing dynamically from video stream and set /dev/fb0 properties to match • Technique #3: start LCD DMA based on VSYNC start from video stream December 29, 2011 28c3 bunnie
  • 26. Synchronize Frame Buffers • Technique #1: source graphics engine pixclock from video, not locally • Technique #2: derive timing dynamically from video stream and set /dev/fb0 properties to match • Technique #3: start LCD DMA based on VSYNC start from video stream • Technique #4: add a few video lines’ elastic FIFO buffering to absorb VSYNC interrupt jitter December 29, 2011 28c3 bunnie
  • 27. Chroma Key • Chroma key reserves a specific color and substitutes its value for “transparent” • In this implementation, F0,00,F0 (a shade of pink) is the magic color – A comparator within the FPGA inspects every pixel and switches a mux + = Image copyright © 2008, Blender Foundation / www.bigbuckbunny.org CC-BY-3.0 December 29, 2011 28c3 bunnie
  • 28. HDMI Connector RGB to TMDS Serialize bunnie December 29, 2011 28c3 TMDS to RGB Deserialize HDMI Connector
  • 29. Optimizations • Key caching – Every video source/sink pair has a constant shared secret – Km is cached after first computation to improve system robustness • EDID caching – More important because without EDID caching, users will see a double-blink of the screen • First blink is to measure the TV’s capabilities • Then we compute the intersection of the TV capabilities and NeTV capabilities • Second blink is to override the capabilities we don’t support December 29, 2011 28c3 bunnie
  • 30. The Bigger System Picture HDMI Connector HDMI Connector December 29, 2011 28c3 bunnie
  • 31. A Complete Open Stack Provisioning & update server (EC2) OpenEmbedded/ HTML/javascript widgets (github) buildbot Webkit Angstrom distro (apps/tools) U-boot Linux FPGA (verilog) PCB Plastics December 29, 2011 28c3 bunnie
  • 32. Application Environment • TV overlay apps are web pages – CSS configured to put “magic pink” as background – Apps are javascript/HTML programs – But you can extend to any infrastructure that can write to /dev/fb0 (SDL, Flash, etc.) • Our demo apps are open source and stored in a github repo – Updating apps consists of doing a git pull on the client – Configured to pull every reboot • Firmware updates served from EC2 infrastructure – Public AMI provided so you can make your own – More on this later December 29, 2011 28c3 bunnie
  • 33. HTTP API • Zeroconf solution for networked interaction with TV – API provides method to send events to NeTV • So, a smartphone can: – Discover NeTV with Bonjour – Send events (such as SMS) to the NeTV using HTTP GET – NeTV renders these events on your TV • Also provides a method for file upload to enable photosharing to the TV – Fast, easy integration into “smarthome” environment – Example call: http://10.0.88.1/bridge?cmd=tickerevent&message=Hello%World& title=Hello%20World – Each API call can be restricted to just localhost for security December 29, 2011 28c3 bunnie
  • 34. Turnkey Build System • Public Amazon EC2 instance with pre-built Angstrom distribution – Saves hours of effort downloading & building sources – Instance comes configured with local git repo and buildbot to manage builds – Built images configured to fetch updates from your own instance December 29, 2011 28c3 bunnie
  • 35. Launching an EC2 AMI December 29, 2011 28c3 bunnie
  • 36. Local cgit repo December 29, 2011 28c3 bunnie
  • 37. Auto-build triggers based on commits December 29, 2011 28c3 bunnie
  • 38. Distribute Finished Builds • Image once, auto-update forever December 29, 2011 28c3 bunnie
  • 39. Hardware is Open December 29, 2011 28c3 bunnie
  • 40. Plastics are Open December 29, 2011 28c3 bunnie
  • 41. Pr0n December 29, 2011 28c3 bunnie
  • 43. And PCB Layout December 29, 2011 28c3 bunnie
  • 44. A Complete Open Solution to HDCP MITM • Hardware – Schematics, PCB, industrial design, FPGA • Software – Complete, turn-key cloud-based build environment • Half an hour from start to production-grade deployment • Available at adafruit.com (http://www.adafruit.com/products/609) December 29, 2011 28c3 bunnie
  • 45. Recap: HDCP MITM Implementation • Complete HDCP MITM solution demonstrated – Intercept key exchange on the fly – Derive shared secrets & synchronize Tx ciphers – Multiplex overlay video using chroma key – Avoids decrypting data, therefore DMCA-safe – Modifies EDID records to force compatibility • Enables video compositing functionality – Enables unconnected legacy TVs to now have connected TV capabilities – Enables you to modify your video content (stop/modify ads, show live internet commentary, etc.) • A completely open hardware/software stack December 29, 2011 28c3 bunnie
  • 46. Non-Infringing Use of HDCP Master Key! • Embodiment of a bona-fide, non-infringing and commercially useful application of the HDCP master key • Blurs the association of the HDCP master key with piracy – Prior to this exploit, the only application of the HDCP master key was to circumvent the encryption on copyrighted data – Now, there is a non-circumventing application for the HDCP master key December 29, 2011 28c3 bunnie
  • 47. Q&A December 29, 2011 28c3 bunnie