Firmadyne

ssuserb15333 293 views 43 slides Dec 16, 2021
Slide 1
Slide 1 of 44
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44

About This Presentation

Towards Automated Dynamic Analysis for Linux-based Embedded Firmware


Slide Content

redhung@SQLab, NYCU
Towards Automated Dynamic Analysis
for Linux-based Embedded Firmware
Daming D. Chen, Manuel Egele, Maverick Woo, and David Brumley, Carnegie Mellon University, NDSS, 2016

>_ CAT ./OVERVIEW
Background
0x00
Architecture &
Concept
0x10
Evaluation
0x20
Conclusion
0x30

Background

>_ Internet of Things
•Problems
---
-IoT devices are controlled by vendor and chipset-specific firmware
-
-Financial burden Q_Q
-interface with the debugging port on the device places strict limits
•How to dump the firmware from the actual hardware?

>_ Internet of Things
---

>_ Internet of Things
---
•Dismantle the DVR

>_ Internet of Things
---
SHOUT OUT TO ATTIFY
•Dismantle the DVR

>_ Internet of Things
---
GND Tx Rx
•Dismantle the DVR

>_ Internet of Things
---
•Dismantle the DVR

>_ Internet of Things
---
•Dumping the firmware

>_ Internet of Things
---
•Dumping the firmware

>_ Internet of Things
---
•Dumping the firmware

>_ Internet of Things
---
•Dumping the firmware

>_ Internet of Things
---

>_ Internet of Things
---
•Done ! But …

>_ Internet of Things
---

>_ Emulator and automated analysis
•FIRMADYNE
---
-Automated dynamic analysis
-Using the QEMU full system emulator
•Challenges of embedded systems
-Presence of hardware-specific peripherals
-Creation of dynamically- generated files
-Usage of non-volatile memory (NVRAM)

Architecture & Concept

>_ Architecture
•Components
---
-Extract Firmware Filesystem
-Initial Emulation
-Dynamic Analysis
-Crawling Firmware

>_ Architecture
•Components
---
-Extract Firmware Filesystem
-Initial Emulation
-Dynamic Analysis
-Crawling Firmware

>_ Architecture
•Components
---
-Extract Firmware Filesystem
-Initial Emulation
-Dynamic Analysis
-Crawling Firmware

>_ Architecture
•Crawling firmware
---
-42 vendors in the dataset
-Multiple geographic locations of each vendor’s website
-Using the Scrapy framework
-Crawling FTP if the webpage is dynamically generated

>_ Architecture
•Components
---
-Extract Firmware Filesystem
-Initial Emulation
-Dynamic Analysis
-Crawling Firmware

>_ Architecture
•Extract Firmware Filesystem
---
-Blacklist of filenames
-Improve extraction of JFFS2 and SquashFS filesystems
-Binwalk was insufficient for our purposes

>_ Architecture
---

>_ Architecture
---

>_ Architecture
•Components
---
-Extract Firmware Filesystem
-Initial Emulation
-Dynamic Analysis
-Crawling Firmware

>_ Architecture
•Components
---
-Extract Firmware Filesystem
-Initial Emulation
-Dynamic Analysis
-Crawling Firmware

>_ Architecture
•Initial Emulation
---
-Process-level
-System-level
-Application-level

>_ Architecture
•Initial Emulation
---
-Process-level
-System-level
-Application-level

>_ Architecture
•NVRAM
---
-52.6% of all extracted firmware images access a hardware NVRAM
-Using a shared library named libnvram.so
-const char* nvram_get (const char* key)
-int nvram_set (const char* key, char *val)
-Init binary to include this library via LD_PRELOAD

>_ Architecture
•Kernel
---
-Hooking 20 system calls using the kprobes framework
-Assigning MAC addresses, creating a network bridge, rebooting the system
-Automatic confirmation of vulnerabilities with poison values
-E.g. 0xDEADBEEF, 0x41414141

>_ Architecture
•Components
---
-Extract Firmware Filesystem
-Initial Emulation
-Dynamic Analysis
-Crawling Firmware

>_ Architecture
•Dynamic analysis
---
-SNMP Information
-Vulnerabilities
-Accessible Webpages

>_ Architecture
•Accessible Webpages
---
-Verifies that it is not a static resource (e.g., *.png, *.css, *.js)
-Attempts to access it directly over the web interface.
-Iterates through each file within the firmware (e.g., located within /www/)
-Determine which URLs were most accessible

>_ Architecture
•Vulnerabilities
---
-The tested vulnerabilities were manually selected
-Manually developed proof-of-concepts exploits for the new vulnerabilities
-Using 60 known exploits, mostly from the Metasploit Framework

Evaluation

>_ Evaluation
---
•Dataset from the crawler

>_ Evaluation
---
•Dataset from the crawler

>_ Evaluation
---

>_ Evaluation
---

Conclusion

>_ Conclusion
---
•FIRMADYNE is an automated approach to analyze the firmware
•OEMs made the most vulnerabilities of the IoT devices
•Emulation with firmware fuzzing

THANK YOU!
[email protected]
r3dhun9@r3dhun9Philip Chen
Tags