Towards Automated Dynamic Analysis for Linux-based Embedded Firmware
Size: 10.18 MB
Language: en
Added: Dec 16, 2021
Slides: 43 pages
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
>_ 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
•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
•Extract Firmware Filesystem
---
-Blacklist of filenames
-Improve extraction of JFFS2 and SquashFS filesystems
-Binwalk was insufficient for our purposes
>_ 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
•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