a large scale analysis of the security of embedded
play

A Large Scale Analysis of the Security of Embedded Firmwares A. - PowerPoint PPT Presentation

A Large Scale Analysis of the Security of Embedded Firmwares A. Costin , J. Zaddach, A. Francillon, D. Balzarotti EURECOM, France 20th August 2014 USENIX Security '14 San Diego, USA Embedded Systems Are Everywhere Andrei Costin 2 By


  1. A Large Scale Analysis of the Security of Embedded Firmwares A. Costin , J. Zaddach, A. Francillon, D. Balzarotti EURECOM, France 20th August 2014 USENIX Security '14 – San Diego, USA

  2. Embedded Systems Are Everywhere Andrei Costin 2 By Wilgengebroed on Flickr [CC-BY-2.0]

  3. Smarter & More Complex Andrei Costin 3 By Wilgengebroed on Flickr [CC-BY-2.0]

  4. Heavily Interconnected Andrei Costin 4 By Wilgengebroed on Flickr [CC-BY-2.0]

  5. Many Examples of Insecure Embedded Systems ● Routers Andrei Costin 5

  6. Many Examples of Insecure Embedded Systems ● Routers ● Printers Andrei Costin 6

  7. Many Examples of Insecure Embedded Systems ● Routers ● Printers ● VoIP Andrei Costin 7

  8. Many Examples of Insecure Embedded Systems ● Routers ● Printers ● VoIP ● Cars Andrei Costin 8

  9. Many Examples of Insecure Embedded Systems ● Routers ● Printers ● VoIP ● Cars ● Drones Andrei Costin 9

  10. Many Examples of Insecure Embedded Systems ● Routers ● Printers ● VoIP ● Cars ● Drones ● ... Andrei Costin 10

  11. Many Examples of Insecure Embedded Systems ● Routers ● Printers ● VoIP ● Cars ● Drones ● ... ● Each of above is a result of an individual analysis ● Manual and tedious efforts, Does not scale Andrei Costin 11

  12. The Goal Perform a large scale analysis to provide a better undestanding of the problem Andrei Costin 12

  13. The Problem With Large Scale Analysis ● Heterogeneity of ● Hardware, architectures, OSes ● Users, requirements ● Security goals Andrei Costin 13

  14. The Problem With Large Scale Analysis ● Heterogeneity of ● Hardware, architectures, OSes ● Users, requirements ● Security goals ● Manual analysis does not scale, it requires ● Finding and downloading the firmwares ● Unpacking and performing initial analysis ● Re -discovering the same or similar bug in other firmwares Andrei Costin 14

  15. Previous Approaches ● Test on real devices [Bojinov09CCS] ● Accurate results ● Does not scale well Andrei Costin 15

  16. Previous Approaches ● Test on real devices [Bojinov09CCS] ● Accurate results ● Does not scale well ● Scan devices on the Internet ● Large scale testing [Cui10ACSAC] – Can only test for known vulnerabilities – Blackbox approach ● More is too intrusive [Census2012] Andrei Costin 16

  17. Our Approach to The Large Scale Analysis ● Collect a large number of firmware images Andrei Costin 17

  18. Our Approach to The Large Scale Analysis ● Collect a large number of firmware images ● Perform broad but simple static analysis Andrei Costin 18

  19. Our Approach to The Large Scale Analysis ● Collect a large number of firmware images ● Perform broad but simple static analysis ● Correlate across firmwares Andrei Costin 19

  20. Our Approach to The Large Scale Analysis ● Collect a large number of firmware images ● Perform broad but simple static analysis ● Correlate across firmwares ● Advantages ● No intrusive online testing, no devices involved ● Scalable Andrei Costin 20

  21. Our Approach to The Large Scale Analysis ● Collect a large number of firmware images ● Perform broad but simple static analysis ● Correlate across firmwares ● Advantages ● No intrusive online testing, no devices involved ● Scalable ● But many challenges Andrei Costin 21

  22. Mainstream Systems Have Centralized Updates Andrei Costin 22

  23. Challenge: Embedded Systems Have No Centralized Updates Andrei Costin 23

  24. Collecting a Dataset ● No large scale firmware dataset yet ● As opposed to existing datasets in security or other CS research areas Andrei Costin 24

  25. Collecting a Dataset ● No large scale firmware dataset yet ● As opposed to existing datasets in security or other CS research areas ● We collected a subset of the firmwares available for download Andrei Costin 25

  26. Collecting a Dataset ● No large scale firmware dataset yet ● As opposed to existing datasets in security or other CS research areas ● We collected a subset of the firmwares available for download ● Many firmwares are not publicly available ● Not intended to have an upgrade ● Require product purchase and registration Andrei Costin 26

  27. Collecting a Dataset ● No large scale firmware dataset yet ● As opposed to existing datasets in security or other CS research areas ● We collected a subset of the firmwares available for download ● Many firmwares are not publicly available ● Not intended to have an upgrade ● Require product purchase and registration ● www.firmware.re project Andrei Costin 27

  28. Challenge: Firmware Identification Clearly a Firmware Andrei Costin 28

  29. Challenge: Firmware Identification Clearly a Firmware Clearly not a Firmware Andrei Costin 29

  30. Challenge: Firmware Identification Clearly a Firmware Clearly not a Firmware Uncertain Andrei Costin 30

  31. Challenge: Firmware Identification ● E.g., upgrade by printing a PS document Andrei Costin 31

  32. Challenge: Unpacking & Custom Formats ● How to reliably unpack and learn formats? Andrei Costin 32

  33. Challenge: Unpacking & Custom Formats ● How to reliably unpack and learn formats? ● E.g., vendor provides a .ZIP 'firmware package' ● .ZIP→.EXE+.PS – .EXE→self-extracting archive ● Extract more or not? ● Turns out to contain a printer driver inside Andrei Costin 33

  34. Challenge: Unpacking & Custom Formats ● How to reliably unpack and learn formats? ● E.g., vendor provides a .ZIP 'firmware package' ● .ZIP→.EXE+.PS – .EXE→self-extracting archive ● Extract more or not? ● Turns out to contain a printer driver inside – .PS→ASCII85 stream→ELF file that could be: ● A complete embedded system software ● An executable performing the firmware upgrade ● A firmware patch Andrei Costin 34

  35. Challenge: Unpacking & Custom Formats ● How to reliably unpack and learn formats? ● E.g., vendor provides a .ZIP 'firmware package' ● .ZIP→.EXE+.PS – .EXE→self-extracting archive ● Extract more or not? ● Turns out to contain a printer driver inside – .PS→ASCII85 stream→ELF file that could be: ● A complete embedded system software ● An executable performing the firmware upgrade ● A firmware patch ● Often, a firmware image→just 'data' binary blob Andrei Costin 35

  36. Our Approach to Unpacking & Custom Formats ● We compared existing tools ● Used BAT (Binary Analysis Toolkit) ● Extended it with multiple custom unpackers ● Continuous development effort Andrei Costin 36

  37. Our Approach to Unpacking & Custom Formats ● We compared existing tools ● Used BAT (Binary Analysis Toolkit) ● Extended it with multiple custom unpackers ● Continuous development effort ● Often, a firmware image→just 'data' binary blob ● File carving required ● Bruteforce at every offset with all known unpackers Andrei Costin 37

  38. Our Approach to Unpacking & Custom Formats ● We compared existing tools ● Used BAT (Binary Analysis Toolkit) ● Extended it with multiple custom unpackers ● Continuous development effort ● Often, a firmware image→just 'data' binary blob ● File carving required ● Bruteforce at every offset with all known unpackers ● Heuristics for detecting when to stop Andrei Costin 38

  39. Challenge: Scalability & Computational Limits ● Unpacking and file carving is very CPU intensive Andrei Costin 39

  40. Challenge: Scalability & Computational Limits ● Unpacking and file carving is very CPU intensive ● Results in millions of unpacked files ● Manual analysis infeasible ● One-to-one fuzzy hash comparison is CPU intensive Andrei Costin 40

  41. Challenge: Results Confirmation ● An issue found statically ● May not apply to a real-device ● Cannot guarantee exploitability ● E.g., vulnerable daemon present but never started Andrei Costin 41

  42. Challenge: Results Confirmation ● An issue found statically ● May not apply to a real-device ● Cannot guarantee exploitability ● E.g., vulnerable daemon present but never started ● Issue confirmation is difficult ● Requires advanced analysis (static & dynamic) ● Often requires real embedded devices ● Does not scale well in heterogeneous environments Andrei Costin 42

  43. Architecture Firmware Datastore Internet Crawl Andrei Costin 43

  44. Architecture Firmware Datastore Internet Public Web Interface Crawl Submit Andrei Costin 44

  45. Architecture Firmware Datastore Internet Public Web Interface Crawl Submit Firmware Analysis Cloud Andrei Costin 45

  46. Architecture Firmware Datastore Internet Public Web Interface Crawl Submit Firmware Analysis Cloud Master Andrei Costin 46

  47. Architecture Firmware Datastore Internet Public Web Interface Crawl Submit Firmware Analysis Cloud Master Distribute Password Hash Cracker Unpacking Static Analysis Fuzzy Hashing Workers Andrei Costin 47

  48. Architecture Firmware Datastore Internet Public Web Interface Crawl Submit Firmware Analysis Cloud Master Distribute Firmware Password Analysis & Hash Cracker Reports DB Unpacking Static Analysis Fuzzy Hashing Workers Andrei Costin 48

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend