SlideShare a Scribd company logo
Hardware hacking on your coach
        Intro to affordable embedded hacking



      Eloi Sanfelix <eloi@riscure.com>
  Javi Moreno <javi.moreno@nruns.com>

                 #rootedHW
The life of a software security guy
                   during the day
The life of a software security guy
                  during the night
Hardware = FUN




    Source: http://www.flickr.com/photos/neimod/
This is NOT about....
... but more ...




       Source: http://dontstuffbeansupyournose.com
Overview
Info
Gathering
Classic Embedded System
Mapping of the device




          10
Open Source Info Gathering
• Search the web
  – Part # / Chip model  Datasheets
  – Similar models
  – Exploits for similar devices
  – ...
Interfacing
Embedded Systems
Interesting interfaces

         Interface                        Typical uses

          RS232                       Shells , debug output

                              Debug output, peripheral management,
         i2c / SPI
                                       serial EEPROM, ...

           JTAG                      Testing and debugging

USB / Ethernet / SATA / Etc            Same as your PC ;-)
Finding interfaces
Bus Pirate v3.x
Openbench Logic Sniffer
DEMO: Interfacing & sniffing
Dumping
Firmware
How to obtain firmware?
• Online firmware updates

• Flash dumping
  – SPI for serial ROMs
  – Via debug access (e.g JTAG)
  – Desoldering + external flash readers
     • Commercial readers
     • Microcontroller-based dumpers
Placa ROMs
Binary Visualization
Firmware Reverse Engineering
Debugging
JTAG interface
Debugging with JTAG
• Boundary Scan only:
  – Reading / Modifying memory
  – Checking control lines (inputs/outputs)
• Using additional aids:
  – Private instructions
  – Debugging logic
     • ARM: EmbeddedICE
     • MIPS: EJTAG
     • Motorola: BDM
Debugging with JTAG (2)
• Provides:
  – Hardware breakpoints
  – Hardware watchpoints
  – Register access




• Example: EJTAG
DEMO: Meet the BUS BLASTER
Locating JTAG

    A




B




                        D
               C
Locating JTAG (2)
Locating JTAG (3)
Locating JTAG (4)
Image source: www.hirox-usa.com
BGA (2)
• Drilling through the PCB

  Balls on CPU:         Balls through PCB:
Can’t  debug?  Emulate!
• You still can use emulators
  – Qemu
  – GXEmul
  – Skyeye
  – ...
Securing
Embedded Systems
Secure Embedded System
Key security features
         Feature                           Description

                              Internal boot code / core must assure
       Secure boot
                                   integrity of loaded firmware
                             Security subsystem must assure integrity
    Runtime integrity
                                         of running code
                             Debug interfaces must either be disabled
   Interface protection
                                     or (securely) protected
                             Sensitive keys must be stored within the
       Key storage               chipset and not readable to the
                                            application
                                Content stored in external memory
                             (RAM) during runtime must be protected
External memory protection
                                          from attackers.
                              (scrambling and maybe authentiaction)
                               Need to withstand SCA/FI attacks in
  Protected crypto cores
                                 order to properly protect keys.
Conclusion
• Embedded hacking = FUN

• Attacker’s  challenges
  – Info gathering often difficult
  – Interfacing trickier than with software


• Defender’s  challenges
  – Device running under hostile environment
Shopping list
                      Item                                 Price

         Arduino / Other dev boards               20-60€ each / 20 to 300€

                   Bus Pirate                               25€

            Bus Blaster / GoodFET                        30€ / DIY

Openbench Logic Sniffer / Saleae Logic Analyzer         40€ / 120€

    Cables, solder, screwdrivers, probes, ...                -

        DSO Oscilloscope Nano / Quad                    70€ / 150€

               USB Microscope                              ~20 €

         OpenVizsla (when available)                   100 – 200 EUR
Some things to look at
•   Routers, modems, STBs, MFPs ...
•   Gaming consoles, modern TVs
•   PC parts
•   (Smart)phones
•   Smart meters, alarms, SCADA/PLCs...
•   Car or vehicle electronics
•   Home appliances, domotics
•   Gadgets
HW Hacking resources
• Hack a day – www.hackaday.com
• /dev/ttyS0 – www.devttys0.com
• Bunnie’s  blog  – www.bunniestudios.com
• Debugmo.de – debugmo.de
• Pagetable – www.pagetable.com
• HW  vendors’  forums:  SeedStudio,  Sparkfun  ,  
  adafruit.com, Dangerous Prototypes , ...
• Fritzing – www.fritzing.org
• [... The list goes on ...]
Thanks!

Eloi Sanfelix (@esanfelix)    Javi Moreno (@vierito5)
     eloi@riscure.com        javi.moreno@nruns.com

More Related Content

PPTX
Hardware Hacking Primer
PDF
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
PDF
Taking the hard out of hardware
PDF
Hardware hacking
PDF
Internet of things - with routers
PDF
Building Trojan Hardware at Home
PPTX
Nodemcu - introduction
PPTX
Programming esp8266
Hardware Hacking Primer
Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to s...
Taking the hard out of hardware
Hardware hacking
Internet of things - with routers
Building Trojan Hardware at Home
Nodemcu - introduction
Programming esp8266

What's hot (20)

PDF
Cigarette VS Bubble Gum
PPTX
IoT Hands-On-Lab, KINGS, 2019
PPTX
Intel Edison: Beyond the Breadboard
PDF
Introduction to ESP32 Programming [Road to RIoT 2017]
PDF
How to Make an Eight Bit Computer and Save the World!
PDF
Linux Kernel Exploitation
PPT
Arduino Meetup with Sonar and 433Mhz Radios
PDF
How to Install ESP8266 WiFi Web Server using Arduino IDE
PDF
Controlling USB Flash Drive Controllers: Expose of Hidden Features
PDF
Kernel entrance to-geek-
PPTX
Esp8266 - Intro for dummies
PDF
lesson2 - Nodemcu course - NodeMCU dev Board
PDF
Republic of IoT - Hackathon Hardware Kits Hands-on Labs
PPTX
Esp8266 Workshop
PPTX
Everything you wanted to know about Internet of Things & Galileo
PPTX
[5]投影片 futurewad樹莓派研習會 141218
PDF
Is there an EFI monster inside your apple? by Pedro Vilaça - CODE BLUE 2015
PDF
Let's begin io t with $10
PDF
Espresso Lite v2 - ESP8266 Overview
PDF
Making wearables with NodeMCU - FOSDEM 2017
Cigarette VS Bubble Gum
IoT Hands-On-Lab, KINGS, 2019
Intel Edison: Beyond the Breadboard
Introduction to ESP32 Programming [Road to RIoT 2017]
How to Make an Eight Bit Computer and Save the World!
Linux Kernel Exploitation
Arduino Meetup with Sonar and 433Mhz Radios
How to Install ESP8266 WiFi Web Server using Arduino IDE
Controlling USB Flash Drive Controllers: Expose of Hidden Features
Kernel entrance to-geek-
Esp8266 - Intro for dummies
lesson2 - Nodemcu course - NodeMCU dev Board
Republic of IoT - Hackathon Hardware Kits Hands-on Labs
Esp8266 Workshop
Everything you wanted to know about Internet of Things & Galileo
[5]投影片 futurewad樹莓派研習會 141218
Is there an EFI monster inside your apple? by Pedro Vilaça - CODE BLUE 2015
Let's begin io t with $10
Espresso Lite v2 - ESP8266 Overview
Making wearables with NodeMCU - FOSDEM 2017

Viewers also liked (12)

PDF
Manu Quintans y Frank Ruiz - All Your Crimeware Are Belong To Us! [RootedCON ...
PDF
Modulo 5
PDF
José Miguel Esparza y Mikel Gastesi - Social Engineering in Banking Trojans: ...
PDF
Yago Jesús - Applied Cryptography FAILs [RootedCON 2012]
PDF
Guillermo Grande y Alberto Ortega - Building an IP reputation engine, trackin...
PDF
Pedro Sánchez - Hospital Central. Historia de una extorsión [RootedCON 2012]
PDF
Jaime Peñalba y Javier Rodríguez - Live Free or Die Hacking [RootedCON 2012]
PPTX
Chema Alonso y Manu "The Sur" - Owning “bad” guys {and mafia} with Javascript...
PDF
Lorenzo Martínez - Welcome to your secure /home, $user [Rooted CON 2012]
PDF
Juan Garrido - Corporate Forensics: Saca partido a tu arquitectura[RootedCON ...
PDF
BSides DFW2016-Hack Mode Enabled
PDF
Carlos Díaz y Fco. Jesús Gómez - CMD: Look who's talking too [RootedCON 2012]
Manu Quintans y Frank Ruiz - All Your Crimeware Are Belong To Us! [RootedCON ...
Modulo 5
José Miguel Esparza y Mikel Gastesi - Social Engineering in Banking Trojans: ...
Yago Jesús - Applied Cryptography FAILs [RootedCON 2012]
Guillermo Grande y Alberto Ortega - Building an IP reputation engine, trackin...
Pedro Sánchez - Hospital Central. Historia de una extorsión [RootedCON 2012]
Jaime Peñalba y Javier Rodríguez - Live Free or Die Hacking [RootedCON 2012]
Chema Alonso y Manu "The Sur" - Owning “bad” guys {and mafia} with Javascript...
Lorenzo Martínez - Welcome to your secure /home, $user [Rooted CON 2012]
Juan Garrido - Corporate Forensics: Saca partido a tu arquitectura[RootedCON ...
BSides DFW2016-Hack Mode Enabled
Carlos Díaz y Fco. Jesús Gómez - CMD: Look who's talking too [RootedCON 2012]

Similar to Eloi Sanfélix y Javier Moreno - Hardware hacking on your couch [RootedCON 2012] (20)

PDF
DEF CON 27 - PHILIPPE LAULHERET - introduction to hardware hacking extended v...
PDF
Hardware Reverse Engineering: From Boot to Root
PPTX
Pentesting embedded
PDF
Tools Of The Hardware Hacking Trade Final
PPTX
Making and breaking security in embedded devices
PPTX
Armadillos - or how to bypass code readout protection on microcontrollers
PDF
Bsides Puerto Rico-2017
PDF
BlackHat 2009 - Hacking Zigbee Chips (slides)
PPTX
RTOS based Confidential Area Security System
PPTX
Project_updated
PDF
A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKING
PPTX
1334420 634648164164717500
PPT
KEY
Jailbreaking iOS
PDF
Your Peripheral Has Planted Malware—An Exploit of NXP SOCs Vulnerability
PDF
From Silicon to Software - IIT Madras
PDF
Thesis Donato Slides EN
PPTX
ROM Hacking for Fun, Profit & Infinite Lives
PDF
FPGA Camp - Intellitech Presentation
PDF
BSides Indy 2017 - Hardware Hacking - Abusing the Things
DEF CON 27 - PHILIPPE LAULHERET - introduction to hardware hacking extended v...
Hardware Reverse Engineering: From Boot to Root
Pentesting embedded
Tools Of The Hardware Hacking Trade Final
Making and breaking security in embedded devices
Armadillos - or how to bypass code readout protection on microcontrollers
Bsides Puerto Rico-2017
BlackHat 2009 - Hacking Zigbee Chips (slides)
RTOS based Confidential Area Security System
Project_updated
A BEGINNER’S JOURNEY INTO THE WORLD OF HARDWARE HACKING
1334420 634648164164717500
Jailbreaking iOS
Your Peripheral Has Planted Malware—An Exploit of NXP SOCs Vulnerability
From Silicon to Software - IIT Madras
Thesis Donato Slides EN
ROM Hacking for Fun, Profit & Infinite Lives
FPGA Camp - Intellitech Presentation
BSides Indy 2017 - Hardware Hacking - Abusing the Things

More from RootedCON (20)

PDF
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
PDF
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
PDF
Rooted2020 hunting malware-using_process_behavior-roberto_amado
PPSX
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
PDF
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
PPTX
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
PPTX
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
PPTX
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
PDF
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
PDF
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemy
PPTX
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
PPTX
Rooted2020 virtual pwned-network_-_manel_molina
PDF
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
PDF
Rooted2020 todo a-siem_-_marta_lopez
PPTX
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
PDF
Rooted2020 live coding--_jesus_jara
PDF
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
PDF
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
PDF
Rooted2020 evading deep-learning_malware_detectors_-_javier_yuste
PDF
Rooted2020 encontrando 0days-en_2020_-_antonio_morales
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
Rooted2020 hunting malware-using_process_behavior-roberto_amado
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemy
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
Rooted2020 virtual pwned-network_-_manel_molina
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
Rooted2020 todo a-siem_-_marta_lopez
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
Rooted2020 live coding--_jesus_jara
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
Rooted2020 evading deep-learning_malware_detectors_-_javier_yuste
Rooted2020 encontrando 0days-en_2020_-_antonio_morales

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Advanced methodologies resolving dimensionality complications for autism neur...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
NewMind AI Weekly Chronicles - August'25 Week I
The Rise and Fall of 3GPP – Time for a Sabbatical?
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
Unlocking AI with Model Context Protocol (MCP)
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Eloi Sanfélix y Javier Moreno - Hardware hacking on your couch [RootedCON 2012]

  • 1. Hardware hacking on your coach Intro to affordable embedded hacking Eloi Sanfelix <eloi@riscure.com> Javi Moreno <javi.moreno@nruns.com> #rootedHW
  • 2. The life of a software security guy during the day
  • 3. The life of a software security guy during the night
  • 4. Hardware = FUN Source: http://www.flickr.com/photos/neimod/
  • 5. This is NOT about....
  • 6. ... but more ... Source: http://dontstuffbeansupyournose.com
  • 10. Mapping of the device 10
  • 11. Open Source Info Gathering • Search the web – Part # / Chip model  Datasheets – Similar models – Exploits for similar devices – ...
  • 13. Interesting interfaces Interface Typical uses RS232 Shells , debug output Debug output, peripheral management, i2c / SPI serial EEPROM, ... JTAG Testing and debugging USB / Ethernet / SATA / Etc Same as your PC ;-)
  • 19. How to obtain firmware? • Online firmware updates • Flash dumping – SPI for serial ROMs – Via debug access (e.g JTAG) – Desoldering + external flash readers • Commercial readers • Microcontroller-based dumpers
  • 25. Debugging with JTAG • Boundary Scan only: – Reading / Modifying memory – Checking control lines (inputs/outputs) • Using additional aids: – Private instructions – Debugging logic • ARM: EmbeddedICE • MIPS: EJTAG • Motorola: BDM
  • 26. Debugging with JTAG (2) • Provides: – Hardware breakpoints – Hardware watchpoints – Register access • Example: EJTAG
  • 27. DEMO: Meet the BUS BLASTER
  • 28. Locating JTAG A B D C
  • 33. BGA (2) • Drilling through the PCB Balls on CPU: Balls through PCB:
  • 34. Can’t  debug?  Emulate! • You still can use emulators – Qemu – GXEmul – Skyeye – ...
  • 37. Key security features Feature Description Internal boot code / core must assure Secure boot integrity of loaded firmware Security subsystem must assure integrity Runtime integrity of running code Debug interfaces must either be disabled Interface protection or (securely) protected Sensitive keys must be stored within the Key storage chipset and not readable to the application Content stored in external memory (RAM) during runtime must be protected External memory protection from attackers. (scrambling and maybe authentiaction) Need to withstand SCA/FI attacks in Protected crypto cores order to properly protect keys.
  • 38. Conclusion • Embedded hacking = FUN • Attacker’s  challenges – Info gathering often difficult – Interfacing trickier than with software • Defender’s  challenges – Device running under hostile environment
  • 39. Shopping list Item Price Arduino / Other dev boards 20-60€ each / 20 to 300€ Bus Pirate 25€ Bus Blaster / GoodFET 30€ / DIY Openbench Logic Sniffer / Saleae Logic Analyzer 40€ / 120€ Cables, solder, screwdrivers, probes, ... - DSO Oscilloscope Nano / Quad 70€ / 150€ USB Microscope ~20 € OpenVizsla (when available) 100 – 200 EUR
  • 40. Some things to look at • Routers, modems, STBs, MFPs ... • Gaming consoles, modern TVs • PC parts • (Smart)phones • Smart meters, alarms, SCADA/PLCs... • Car or vehicle electronics • Home appliances, domotics • Gadgets
  • 41. HW Hacking resources • Hack a day – www.hackaday.com • /dev/ttyS0 – www.devttys0.com • Bunnie’s  blog  – www.bunniestudios.com • Debugmo.de – debugmo.de • Pagetable – www.pagetable.com • HW  vendors’  forums:  SeedStudio,  Sparkfun  ,   adafruit.com, Dangerous Prototypes , ... • Fritzing – www.fritzing.org • [... The list goes on ...]
  • 42. Thanks! Eloi Sanfelix (@esanfelix) Javi Moreno (@vierito5) eloi@riscure.com javi.moreno@nruns.com