SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
Copy Protection Wars:
Analyzing Retro and Modern Schemes
               Nate Lawson
        Cryptography Research, Inc.
         Hackers & Threats II (1450)
             February 6th, 2007
Which copy protection era are you?


                   Disk drive…?




     2006               1996         1986
Which copy protection era are you?


                    Modchip…?




     2006             1996              1986
   (Xbox360)        (Sony PS1)       (Commodore
                                      1541 floppy)
Which copy protection era are you?


                      ANSI…?




     2006             1996           1986
Which copy protection era are you?


                     Monitor…?




     2006              1996          1986
Who am I?

 • Co-designer of the Blu-ray disc content protection layer
  (Cryptography Research)
 • Designer of ISS RealSecure network intrusion detection system
 • FreeBSD committer since 2002
   —   Author/maintainer of power management and ACPI kernel code,
       SCSI and USB

 • Contributor to C64 Preservation Project
   —   Software for imaging original floppies and replicating copy protection
       schemes bit-for-bit
Why does the past matter?

 • Approaches are still the same as for C64
   —   Killer tracks = LaserLock CD/DVD protection
   —   Track-to-track alignment = Xbox1/360 sector skew checks
   —   Custom GCR encoding = ECC tricks, weak sectors

 • Many modern hackers linked to C64 scene
   —   commodore4eva: Xbox360 drive firmware hacks
   —   Michael Steil: Xbox1 MIST PCI hack



                                =                    ?
Legal support for retro-hacking

 • Excluded from DMCA anti-circumvention clause
   —   Library of Congress ruling (every 3 years)

 • Copyright protection still applies so you must have original media
 • Seek legal advice before circumventing any protection
   —   I’m not your lawyer!


            Exemptions:
            2. Computer programs and video games distributed in formats
            that have become obsolete and that require the original media or
            hardware as a condition of access, when circumvention is
            accomplished for the purpose of preservation or archival
            reproduction of published digital works by a library or archive.
                                http://www.copyright.gov/1201/docs/2006_statement.html
Definition: asymmetry

 • Asymmetry
   —   Property where forward operation is cheaper than reverse
   —   Example:
Definition: copy protection

 • Copy protection
   —   Leveraging asymmetry between production and playback
       environment to increase cost of copying
   —   If cost of copying > profit of copying, vendor wins!
         • Note: almost no systems meet this criteria



                                             vs.
Definition: defender advantage

 • Defender advantage
   —   As first mover, defender sets the rules of the game
   —   But defender must use advantage properly!
Asymmetry used for copy protection

  •   Physical media
      —   Meta-data: production equipment can create patterns on media user
          equipment cannot
      —   Cost: pressing discs cheaper than burning recordable media

  •   Software
      —   Obscurity: executing code easier than understanding it
      —   Self-checks: creating integrity checks easier than finding them all
      —   Environment: real hw/sw have behavior different from patched or
          emulated hw/sw

  •   Crypto
      —   Encrypting data with a key easier than decrypting without it
               • Caveat: key is always somewhere in hw/sw attacker controls
Time for a remedial history lesson…



C64 Protection Methods
History: sector errors

   • Checking sector errors (1983)
     —   Asymmetry: firmware in drive cannot create sectors with errors
     —   Protection: create bad sectors during mastering and check for them
     —   Attack: create custom drive routine to detect and replicate error

   • Modern use
     —   Multi-session CD with TOC containing errors
     —   Sony PS1/Suncomm/CactusShield/key2audio (“sharpie” hack)


                    Data

                                                   Bad sector
History: gap bytes

  •   Checking gap bytes (1985)
      —   Asymmetry
             • Drive head requires time to switch from reading to writing
             • Drive finds where it is by reading header data
      —   Protection: store pattern in gap between sectors and check for it
      —   Attack: solder on more drive RAM or parallel cable so entire track can be
          written at once

  •   Modern use
      —   Store key in sub-channel data that is used to decrypt exe (SafeDisc)


                                                    Gap bytes
History: track alignment

  • Track-to-track alignment (1986)
     —   Asymmetry: “soft sector” locator method means overall physical layout
         unknown
     —   Protection: seek from track to track and immediately check first data found
     —   Attack
           • Write entire track at once (addl. RAM or parallel cable)
           • Custom drive routine to recreate alignment of original
  • Modern use
     —   CD Cops PC game protection
     —   Xbox1/360 security sector alignment
                                                                        Rotational
                                                                          delay
Who watches the watcher?

  • If you were listening, you said…
    —   “All the above schemes can be subverted if code not intact.”

  • Self-checks, obfuscation, crypto, environment checks…
    —   Would be another whole talk
    —   Asymmetries
          • Difficult for human to understand arbitrary code
          • Protection can occur anywhere within the code
          • Nearly all methods of observing/modifying code execution cause
            observable side effects
                Profound impact on detecting modern virtualization techniques
And now the main event…



C64 vs. Xbox 360
C64 drive interface

  • Serial I/O port provides command/response channel
  • Parallel I/O port added to tap data directly


           Parallel I/O
                                    Serial I/O
C64 drive interface



  Parallel port




                  Parallel I/O   Serial I/O
                                     Drive head




                   Direct taps
                                                  Index hole
                                                    sensor
Demo: C64 disk imaging process

  • PC writes to drive RAM directly via serial port
  • Custom code reads raw track data
  • PC scans raw bytes from parallel port
  • PC loads disk image into emulator for analysis
                       _flop_main:
                               SEI
                               LDA   #$ee
                               STA   $1c0c
                               LDA   #$0b
                               STA   $180c
                               LDA   $1c00
                               AND   #$f3
                               STA   $1c00
                               LDA   #$24
                               STA   $c2




                                             TRACK DATA
                                             ……#………………#……………………
                                             ………………………………………………
                                             ……………#…#.………………………
                                             ……………………………##……………
                                             ………………………………………………
                                             …#########……………………
                                             ………##………………###……..
Xbox360 drive hardware hack

  • Desolder flash chip and dump/replace using socket
  • Disassemble firmware (MN103 microcontroller)
Demo: cracking C64 disk in emulator

  • Disk image fails to boot in emulator
  • Watch command channel in emulated drive
  • Identify protection sequence in drive
    —   Vorpal (Epyx): checks gap bytes

  • Subvert protection check by patching drive RAM
Xbox 360 drive software hack

  • Unlocking drive (mode B)
    —   Send a sequence of ATA commands
    —   Ground pin on SATA connector while powering up

  • Accessing firmware
    —   Read/write a few bytes in drive RAM using cmd 0xE7
    —   Upload and execute custom trampoline code
    —   Read/write entire drive RAM using custom code
                                      // Hitachi   read memory   command (Kevin East – 7thSon)
                                      cgc.cmd[0]   = 0xE7;
                                      cgc.cmd[1]   = 0x48;
                                      cgc.cmd[2]   = 0x49;
                                      cgc.cmd[3]   = 0x54;
                                      cgc.cmd[4]   = 0x01;
                                      cgc.cmd[6]   = (unsigned   char)((addr & 0xFF000000) >> 24);
                                      cgc.cmd[7]   = (unsigned   char)((addr & 0x00FF0000) >> 16);
                                      cgc.cmd[8]   = (unsigned   char)((addr & 0x0000FF00) >> 8);
                                      cgc.cmd[9]   = (unsigned   char)(addr & 0x000000FF);
Xbox 360
Security Analysis
Xbox 360 status

  • Drive totally compromised
    —   Fully custom firmware in use
    —   Copies run from DVD-R media

  • Host completely uncompromised
    —   No Linux, user-created games, etc.
    —   All crypto keys and kernel code still secret

  • Current hacks good enough to support copied games
    —   Attacker winning this battle

  • Much still unknown about overall security
    —   Advantage: defender, but how well will they use this?
Challenge/response scheme

   1. Drive reads security sector from lead-out
   2. Drive sends encrypted data to host
   3. Host decrypts table
   4. Host chooses various challenges and sends to drive
     —   Type 0: static value from DRT table
     —   Type 1, 3: measurements of length of security sectors
     —   Type 5, 7: skew between sector locations on disc

     —   Type E0: account of all previous challenges seen

   5. Drive calculates response and replies
   6. Host checks if response matches value decrypted from table
Challenge/response attack analysis

  • Security sector stored in lead-out
    —   Asymmetry: stock firmware won’t read this data for the user
    —   Attack: read drive memory after it reads lead-out

  • C/R table is encrypted
    —   Asymmetry: only Xbox has key to decrypt table
    —   Attack: none yet, but table can be sent to host without decrypting

  • Responses to challenges derived from physical media
    —   Asymmetry: real media has strict physical layout, recorded won’t
    —   Attack: query drive from PC while real media in drive, replay values
        from patched firmware
Repairing the hole

  • Attackers only have a tenuous hold on drive and no host
    compromise
  • Examining asymmetries gives new defenses
    —   Asymmetry: real media analysis will be slightly different each time
          • Defense: check that responses vary appropriately between
            challenges of the same type
    —   Asymmetry: patched firmware can’t disable loader methods
          • Defense: use same debug commands to load disc-specific
            hashing code into drive, check for patched firmware
    —   Asymmetry: response table must be somewhere on copied media
          • Defense: look for SS.bin file via host or code loading into drive
Conclusion

  • Asymmetry is a useful concept for analyzing schemes
    —   Defender only has to increase cost of attack enough (effort/$) to
        force attackers to look elsewhere
    —   Defender starts with inherent advantage but must use it properly

  • A lot can be learned from the past
    —   Attacks and defenses still same as 1986!
    —   Retro-hacking is fun, cheap, and informative

                  Copies of the slides or comments?

                           Nate Lawson
                           nate@root.org
                           http://root.org/

Contenu connexe

Tendances

Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by stepsudakarman
 
IoT and IIOT at QuBit Prague 2018
IoT and IIOT at QuBit Prague 2018 IoT and IIOT at QuBit Prague 2018
IoT and IIOT at QuBit Prague 2018 Avast
 
The <$100 Cyber Sensor, You Can Build It!
The  <$100 Cyber Sensor, You Can Build It!The  <$100 Cyber Sensor, You Can Build It!
The <$100 Cyber Sensor, You Can Build It!Ludwig Goon
 
FreeBSD on Cavium ThunderX System on a Chip
FreeBSD on Cavium ThunderX System on a ChipFreeBSD on Cavium ThunderX System on a Chip
FreeBSD on Cavium ThunderX System on a ChipSemihalf
 
CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?DefCamp
 
دورة الصيانة
دورة الصيانة دورة الصيانة
دورة الصيانة Moamen Ayyad
 
License protections & software cracking
License protections & software crackingLicense protections & software cracking
License protections & software crackingblaufish
 
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...44CON
 
GPU/VGA Thermal Design Power
GPU/VGA Thermal Design PowerGPU/VGA Thermal Design Power
GPU/VGA Thermal Design PowerDen Ronggo
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software peopleDobrica Pavlinušić
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereumBuild your own private blockchain based on ethereum
Build your own private blockchain based on ethereumMehran Pourvahab
 
Honeypots: Visão Geral
Honeypots: Visão GeralHoneypots: Visão Geral
Honeypots: Visão Geralbernardo_mr
 
Playing CTFs for Fun & Profit
Playing CTFs for Fun & ProfitPlaying CTFs for Fun & Profit
Playing CTFs for Fun & Profitimpdefined
 
CORSAIR VENGEANCE A4100 GAMING PC REVIEW
CORSAIR VENGEANCE A4100 GAMING PC REVIEWCORSAIR VENGEANCE A4100 GAMING PC REVIEW
CORSAIR VENGEANCE A4100 GAMING PC REVIEWDharmendra Rama
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicJoseph Lu
 
How to hide your browser 0-day @ Disobey
How to hide your browser 0-day @ DisobeyHow to hide your browser 0-day @ Disobey
How to hide your browser 0-day @ DisobeyZoltan Balazs
 

Tendances (20)

Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by step
 
Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100Gnu linux on arm for $50 - $100
Gnu linux on arm for $50 - $100
 
IoT and IIOT at QuBit Prague 2018
IoT and IIOT at QuBit Prague 2018 IoT and IIOT at QuBit Prague 2018
IoT and IIOT at QuBit Prague 2018
 
The <$100 Cyber Sensor, You Can Build It!
The  <$100 Cyber Sensor, You Can Build It!The  <$100 Cyber Sensor, You Can Build It!
The <$100 Cyber Sensor, You Can Build It!
 
UDOO IoT Platform
UDOO IoT PlatformUDOO IoT Platform
UDOO IoT Platform
 
FreeBSD on Cavium ThunderX System on a Chip
FreeBSD on Cavium ThunderX System on a ChipFreeBSD on Cavium ThunderX System on a Chip
FreeBSD on Cavium ThunderX System on a Chip
 
CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?CPU vulnerabilities - where are we now?
CPU vulnerabilities - where are we now?
 
دورة الصيانة
دورة الصيانة دورة الصيانة
دورة الصيانة
 
License protections & software cracking
License protections & software crackingLicense protections & software cracking
License protections & software cracking
 
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
44CON 2014 - Simple Hardware Sidechannel Attacks for 10 GBP or Less, Joe Fitz...
 
Universal Userland
Universal UserlandUniversal Userland
Universal Userland
 
Proxy arp
Proxy arpProxy arp
Proxy arp
 
GPU/VGA Thermal Design Power
GPU/VGA Thermal Design PowerGPU/VGA Thermal Design Power
GPU/VGA Thermal Design Power
 
Hardware hacking for software people
Hardware hacking for software peopleHardware hacking for software people
Hardware hacking for software people
 
Build your own private blockchain based on ethereum
Build your own private blockchain based on ethereumBuild your own private blockchain based on ethereum
Build your own private blockchain based on ethereum
 
Honeypots: Visão Geral
Honeypots: Visão GeralHoneypots: Visão Geral
Honeypots: Visão Geral
 
Playing CTFs for Fun & Profit
Playing CTFs for Fun & ProfitPlaying CTFs for Fun & Profit
Playing CTFs for Fun & Profit
 
CORSAIR VENGEANCE A4100 GAMING PC REVIEW
CORSAIR VENGEANCE A4100 GAMING PC REVIEWCORSAIR VENGEANCE A4100 GAMING PC REVIEW
CORSAIR VENGEANCE A4100 GAMING PC REVIEW
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
 
How to hide your browser 0-day @ Disobey
How to hide your browser 0-day @ DisobeyHow to hide your browser 0-day @ Disobey
How to hide your browser 0-day @ Disobey
 

En vedette

When Crypto Attacks! (Yahoo 2009)
When Crypto Attacks! (Yahoo 2009)When Crypto Attacks! (Yahoo 2009)
When Crypto Attacks! (Yahoo 2009)Nate Lawson
 
ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)Nate Lawson
 
ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)Nate Lawson
 
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Nate Lawson
 
Foundations of Platform Security
Foundations of Platform SecurityFoundations of Platform Security
Foundations of Platform SecurityNate Lawson
 
Crypto Strikes Back! (Google 2009)
Crypto Strikes Back! (Google 2009)Crypto Strikes Back! (Google 2009)
Crypto Strikes Back! (Google 2009)Nate Lawson
 
Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Nate Lawson
 
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Nate Lawson
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Nate Lawson
 
TLS Optimization
TLS OptimizationTLS Optimization
TLS OptimizationNate Lawson
 
TLS/SSL MAC security flaw
TLS/SSL MAC security flawTLS/SSL MAC security flaw
TLS/SSL MAC security flawNate Lawson
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006Nate Lawson
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol DesignNate Lawson
 

En vedette (13)

When Crypto Attacks! (Yahoo 2009)
When Crypto Attacks! (Yahoo 2009)When Crypto Attacks! (Yahoo 2009)
When Crypto Attacks! (Yahoo 2009)
 
ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)ACPI and FreeBSD (Part 1)
ACPI and FreeBSD (Part 1)
 
ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)ACPI and FreeBSD (Part 2)
ACPI and FreeBSD (Part 2)
 
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
Using FreeBSD to Design a Secure Digital Cinema Server (Usenix 2004)
 
Foundations of Platform Security
Foundations of Platform SecurityFoundations of Platform Security
Foundations of Platform Security
 
Crypto Strikes Back! (Google 2009)
Crypto Strikes Back! (Google 2009)Crypto Strikes Back! (Google 2009)
Crypto Strikes Back! (Google 2009)
 
Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)Highway to Hell: Hacking Toll Systems (Blackhat 2008)
Highway to Hell: Hacking Toll Systems (Blackhat 2008)
 
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
Don't Tell Joanna the Virtualized Rootkit is Dead (Blackhat 2007)
 
Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)Designing and Attacking DRM (RSA 2008)
Designing and Attacking DRM (RSA 2008)
 
TLS Optimization
TLS OptimizationTLS Optimization
TLS Optimization
 
TLS/SSL MAC security flaw
TLS/SSL MAC security flawTLS/SSL MAC security flaw
TLS/SSL MAC security flaw
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol Design
 

Similaire à Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)

Feasibility of Security in Micro-Controllers
Feasibility of Security in Micro-ControllersFeasibility of Security in Micro-Controllers
Feasibility of Security in Micro-Controllersardiri
 
Challenges Building Secure Mobile Applications
Challenges Building Secure Mobile ApplicationsChallenges Building Secure Mobile Applications
Challenges Building Secure Mobile ApplicationsMasabi
 
got HW crypto-slides_hardwear
got HW crypto-slides_hardweargot HW crypto-slides_hardwear
got HW crypto-slides_hardwearGunnar Alendal
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON
 
Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Luis Grangeia
 
New School Man-in-the-Middle
New School Man-in-the-MiddleNew School Man-in-the-Middle
New School Man-in-the-MiddleTom Eston
 
DefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataDefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataMichael Smith
 
Encryption Deep Dive
Encryption Deep DiveEncryption Deep Dive
Encryption Deep DiveDiego Pacheco
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Appsadunne
 
Basics_of_Kernel_Panic_Hang_and_ Kdump.pdf
Basics_of_Kernel_Panic_Hang_and_ Kdump.pdfBasics_of_Kernel_Panic_Hang_and_ Kdump.pdf
Basics_of_Kernel_Panic_Hang_and_ Kdump.pdfstroganovboris
 
Android Mind Reading: Android Live Memory Analysis with LiME and Volatility
Android Mind Reading: Android Live Memory Analysis with LiME and VolatilityAndroid Mind Reading: Android Live Memory Analysis with LiME and Volatility
Android Mind Reading: Android Live Memory Analysis with LiME and VolatilityJoe Sylve
 
Matrix glitcher tutorial
Matrix glitcher tutorialMatrix glitcher tutorial
Matrix glitcher tutorialJosé Mota
 
Scrambling For Video Surveillance
Scrambling For Video SurveillanceScrambling For Video Surveillance
Scrambling For Video SurveillanceKobi Magnezi
 
Basic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsBasic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsMarian Marinov
 
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...MongoDB
 

Similaire à Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007) (20)

Emulating With JavaScript
Emulating With JavaScriptEmulating With JavaScript
Emulating With JavaScript
 
You suck at Memory Analysis
You suck at Memory AnalysisYou suck at Memory Analysis
You suck at Memory Analysis
 
Feasibility of Security in Micro-Controllers
Feasibility of Security in Micro-ControllersFeasibility of Security in Micro-Controllers
Feasibility of Security in Micro-Controllers
 
Challenges Building Secure Mobile Applications
Challenges Building Secure Mobile ApplicationsChallenges Building Secure Mobile Applications
Challenges Building Secure Mobile Applications
 
All The Little Pieces
All The Little PiecesAll The Little Pieces
All The Little Pieces
 
got HW crypto-slides_hardwear
got HW crypto-slides_hardweargot HW crypto-slides_hardwear
got HW crypto-slides_hardwear
 
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
44CON 2014 - Stupid PCIe Tricks, Joe Fitzpatrick
 
1. hardware basics
1. hardware basics1. hardware basics
1. hardware basics
 
Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1 Reverse Engineering the TomTom Runner pt. 1
Reverse Engineering the TomTom Runner pt. 1
 
New School Man-in-the-Middle
New School Man-in-the-MiddleNew School Man-in-the-Middle
New School Man-in-the-Middle
 
DefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android DataDefCon 2012 - Gaining Access to User Android Data
DefCon 2012 - Gaining Access to User Android Data
 
Encryption Deep Dive
Encryption Deep DiveEncryption Deep Dive
Encryption Deep Dive
 
Web 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web AppsWeb 2.0 Performance and Reliability: How to Run Large Web Apps
Web 2.0 Performance and Reliability: How to Run Large Web Apps
 
Basics_of_Kernel_Panic_Hang_and_ Kdump.pdf
Basics_of_Kernel_Panic_Hang_and_ Kdump.pdfBasics_of_Kernel_Panic_Hang_and_ Kdump.pdf
Basics_of_Kernel_Panic_Hang_and_ Kdump.pdf
 
Android Mind Reading: Android Live Memory Analysis with LiME and Volatility
Android Mind Reading: Android Live Memory Analysis with LiME and VolatilityAndroid Mind Reading: Android Live Memory Analysis with LiME and Volatility
Android Mind Reading: Android Live Memory Analysis with LiME and Volatility
 
Becoming a Power User
Becoming a Power UserBecoming a Power User
Becoming a Power User
 
Matrix glitcher tutorial
Matrix glitcher tutorialMatrix glitcher tutorial
Matrix glitcher tutorial
 
Scrambling For Video Surveillance
Scrambling For Video SurveillanceScrambling For Video Surveillance
Scrambling For Video Surveillance
 
Basic presentation of cryptography mechanisms
Basic presentation of cryptography mechanismsBasic presentation of cryptography mechanisms
Basic presentation of cryptography mechanisms
 
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
Ensuring High Availability for Real-time Analytics featuring Boxed Ice / Serv...
 

Dernier

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Dernier (20)

Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Copy Protection Wars: Analyzing Retro and Modern Schemes (RSA 2007)

  • 1. Copy Protection Wars: Analyzing Retro and Modern Schemes Nate Lawson Cryptography Research, Inc. Hackers & Threats II (1450) February 6th, 2007
  • 2. Which copy protection era are you? Disk drive…? 2006 1996 1986
  • 3. Which copy protection era are you? Modchip…? 2006 1996 1986 (Xbox360) (Sony PS1) (Commodore 1541 floppy)
  • 4. Which copy protection era are you? ANSI…? 2006 1996 1986
  • 5. Which copy protection era are you? Monitor…? 2006 1996 1986
  • 6. Who am I? • Co-designer of the Blu-ray disc content protection layer (Cryptography Research) • Designer of ISS RealSecure network intrusion detection system • FreeBSD committer since 2002 — Author/maintainer of power management and ACPI kernel code, SCSI and USB • Contributor to C64 Preservation Project — Software for imaging original floppies and replicating copy protection schemes bit-for-bit
  • 7. Why does the past matter? • Approaches are still the same as for C64 — Killer tracks = LaserLock CD/DVD protection — Track-to-track alignment = Xbox1/360 sector skew checks — Custom GCR encoding = ECC tricks, weak sectors • Many modern hackers linked to C64 scene — commodore4eva: Xbox360 drive firmware hacks — Michael Steil: Xbox1 MIST PCI hack = ?
  • 8. Legal support for retro-hacking • Excluded from DMCA anti-circumvention clause — Library of Congress ruling (every 3 years) • Copyright protection still applies so you must have original media • Seek legal advice before circumventing any protection — I’m not your lawyer! Exemptions: 2. Computer programs and video games distributed in formats that have become obsolete and that require the original media or hardware as a condition of access, when circumvention is accomplished for the purpose of preservation or archival reproduction of published digital works by a library or archive. http://www.copyright.gov/1201/docs/2006_statement.html
  • 9. Definition: asymmetry • Asymmetry — Property where forward operation is cheaper than reverse — Example:
  • 10. Definition: copy protection • Copy protection — Leveraging asymmetry between production and playback environment to increase cost of copying — If cost of copying > profit of copying, vendor wins! • Note: almost no systems meet this criteria vs.
  • 11. Definition: defender advantage • Defender advantage — As first mover, defender sets the rules of the game — But defender must use advantage properly!
  • 12. Asymmetry used for copy protection • Physical media — Meta-data: production equipment can create patterns on media user equipment cannot — Cost: pressing discs cheaper than burning recordable media • Software — Obscurity: executing code easier than understanding it — Self-checks: creating integrity checks easier than finding them all — Environment: real hw/sw have behavior different from patched or emulated hw/sw • Crypto — Encrypting data with a key easier than decrypting without it • Caveat: key is always somewhere in hw/sw attacker controls
  • 13. Time for a remedial history lesson… C64 Protection Methods
  • 14. History: sector errors • Checking sector errors (1983) — Asymmetry: firmware in drive cannot create sectors with errors — Protection: create bad sectors during mastering and check for them — Attack: create custom drive routine to detect and replicate error • Modern use — Multi-session CD with TOC containing errors — Sony PS1/Suncomm/CactusShield/key2audio (“sharpie” hack) Data Bad sector
  • 15. History: gap bytes • Checking gap bytes (1985) — Asymmetry • Drive head requires time to switch from reading to writing • Drive finds where it is by reading header data — Protection: store pattern in gap between sectors and check for it — Attack: solder on more drive RAM or parallel cable so entire track can be written at once • Modern use — Store key in sub-channel data that is used to decrypt exe (SafeDisc) Gap bytes
  • 16. History: track alignment • Track-to-track alignment (1986) — Asymmetry: “soft sector” locator method means overall physical layout unknown — Protection: seek from track to track and immediately check first data found — Attack • Write entire track at once (addl. RAM or parallel cable) • Custom drive routine to recreate alignment of original • Modern use — CD Cops PC game protection — Xbox1/360 security sector alignment Rotational delay
  • 17. Who watches the watcher? • If you were listening, you said… — “All the above schemes can be subverted if code not intact.” • Self-checks, obfuscation, crypto, environment checks… — Would be another whole talk — Asymmetries • Difficult for human to understand arbitrary code • Protection can occur anywhere within the code • Nearly all methods of observing/modifying code execution cause observable side effects Profound impact on detecting modern virtualization techniques
  • 18. And now the main event… C64 vs. Xbox 360
  • 19. C64 drive interface • Serial I/O port provides command/response channel • Parallel I/O port added to tap data directly Parallel I/O Serial I/O
  • 20. C64 drive interface Parallel port Parallel I/O Serial I/O Drive head Direct taps Index hole sensor
  • 21. Demo: C64 disk imaging process • PC writes to drive RAM directly via serial port • Custom code reads raw track data • PC scans raw bytes from parallel port • PC loads disk image into emulator for analysis _flop_main: SEI LDA #$ee STA $1c0c LDA #$0b STA $180c LDA $1c00 AND #$f3 STA $1c00 LDA #$24 STA $c2 TRACK DATA ……#………………#…………………… ……………………………………………… ……………#…#.……………………… ……………………………##…………… ……………………………………………… …#########…………………… ………##………………###……..
  • 22. Xbox360 drive hardware hack • Desolder flash chip and dump/replace using socket • Disassemble firmware (MN103 microcontroller)
  • 23. Demo: cracking C64 disk in emulator • Disk image fails to boot in emulator • Watch command channel in emulated drive • Identify protection sequence in drive — Vorpal (Epyx): checks gap bytes • Subvert protection check by patching drive RAM
  • 24. Xbox 360 drive software hack • Unlocking drive (mode B) — Send a sequence of ATA commands — Ground pin on SATA connector while powering up • Accessing firmware — Read/write a few bytes in drive RAM using cmd 0xE7 — Upload and execute custom trampoline code — Read/write entire drive RAM using custom code // Hitachi read memory command (Kevin East – 7thSon) cgc.cmd[0] = 0xE7; cgc.cmd[1] = 0x48; cgc.cmd[2] = 0x49; cgc.cmd[3] = 0x54; cgc.cmd[4] = 0x01; cgc.cmd[6] = (unsigned char)((addr & 0xFF000000) >> 24); cgc.cmd[7] = (unsigned char)((addr & 0x00FF0000) >> 16); cgc.cmd[8] = (unsigned char)((addr & 0x0000FF00) >> 8); cgc.cmd[9] = (unsigned char)(addr & 0x000000FF);
  • 26. Xbox 360 status • Drive totally compromised — Fully custom firmware in use — Copies run from DVD-R media • Host completely uncompromised — No Linux, user-created games, etc. — All crypto keys and kernel code still secret • Current hacks good enough to support copied games — Attacker winning this battle • Much still unknown about overall security — Advantage: defender, but how well will they use this?
  • 27. Challenge/response scheme 1. Drive reads security sector from lead-out 2. Drive sends encrypted data to host 3. Host decrypts table 4. Host chooses various challenges and sends to drive — Type 0: static value from DRT table — Type 1, 3: measurements of length of security sectors — Type 5, 7: skew between sector locations on disc — Type E0: account of all previous challenges seen 5. Drive calculates response and replies 6. Host checks if response matches value decrypted from table
  • 28. Challenge/response attack analysis • Security sector stored in lead-out — Asymmetry: stock firmware won’t read this data for the user — Attack: read drive memory after it reads lead-out • C/R table is encrypted — Asymmetry: only Xbox has key to decrypt table — Attack: none yet, but table can be sent to host without decrypting • Responses to challenges derived from physical media — Asymmetry: real media has strict physical layout, recorded won’t — Attack: query drive from PC while real media in drive, replay values from patched firmware
  • 29. Repairing the hole • Attackers only have a tenuous hold on drive and no host compromise • Examining asymmetries gives new defenses — Asymmetry: real media analysis will be slightly different each time • Defense: check that responses vary appropriately between challenges of the same type — Asymmetry: patched firmware can’t disable loader methods • Defense: use same debug commands to load disc-specific hashing code into drive, check for patched firmware — Asymmetry: response table must be somewhere on copied media • Defense: look for SS.bin file via host or code loading into drive
  • 30. Conclusion • Asymmetry is a useful concept for analyzing schemes — Defender only has to increase cost of attack enough (effort/$) to force attackers to look elsewhere — Defender starts with inherent advantage but must use it properly • A lot can be learned from the past — Attacks and defenses still same as 1986! — Retro-hacking is fun, cheap, and informative Copies of the slides or comments? Nate Lawson nate@root.org http://root.org/