Sandbox emulation of an unknown bare-metal firmware requires the implementation of an ad hoc environment simulating all the necessary peripherals of the firmware's targeted microcontroller. The lack of information about the firmware microcontroller's configuration significantly increases the complexity of the solution, often necessitating the implementation of every possible usable peripheral to approximate the original microcontroller's layout. Identifying potential configuration layouts narrows down the range of peripheral combinations needed for emulation, streamlining the process of setting up a sandbox environment. This work presents an approach for automatically identifying a firmware's targeted microcontroller and its peripheral configuration via static and partial-dynamic analysis, extending the state-of-the-art and introducing a novel method for analyzing bare-metal firmware. We address the current limitations of state-of-the-art approaches by introducing the possibility of analyzing the input binary's memory access to reveal any potential peripherals activation or usage. We then cross-check the gathered information against our database built starting from the datasheets' information to determine the most accurate possible microcontroller's memory layout match for the given binary. We evaluate our approach on a dataset of binaries obtained from real-world firmware and created firmware.
Al fine di performare analisi sandbox su di un firmware bare-metal sconosciuto, è necessario costruire un ambiente ad hoc capace di simulare tutte le periferiche utilizzate dal firmware. La maggior parte dei firmware bare-metal, purtroppo, non contengono informazioni riguardanti il microcontroller per il quale sono stati scritti. Non avere conoscenza del microcontrollore sottostante, e di conseguenza delle possibili periferiche utilizzabili dal firmware, aumenta drasticamente la complessità necessaria per la realizzazione di un ambiente di sandbox. Identificando il possibile microcontrollore del firmware si è in grado di ridurre questa complessità e di costruire un sistema ad hoc basato solo sulle periferiche del microcontrollore sottostante. Questo lavoro presenta un approccio per identificare in maniera automatizzata il microcontrollore di un firmware mediante un'analisi statica e parzialmente-dinamica del binario, ampliando così lo stato dell’arte e introducendo un metodo innovativo per l'analisi dei firmware bare-metal.Affrontiamo le attuali limitazioni dello stato dell'arte introducendo un metodo alternativo per analizzare gli accessi in memoria del firmware in input, al fine di individuare eventuali attivazioni o utilizzi di periferiche. Le informazioni raccolte durante l'analisi vengono quindi confrontate con il nostro database, costruito partendo dai dati contenuti nelle schede tecniche dei singoli microcontrollori fornite dai vendor, per determinare la migliore corrispondenza tra il layout di memoria del microcontrollore e gli accessi in memoria del binario analizzato. L'approccio è valutato su un dataset composto da firmware ottenuti da repository, demo e progetti personali. Il database di microcontrollori presi in cosiderazione è creato a partire dai datasheet raccolti presso il sito di tre diversi vendor.
FIRM-ID: documentation based firmware microcontroller identification
BIANCHINI, MATTEO
2023/2024
Abstract
Sandbox emulation of an unknown bare-metal firmware requires the implementation of an ad hoc environment simulating all the necessary peripherals of the firmware's targeted microcontroller. The lack of information about the firmware microcontroller's configuration significantly increases the complexity of the solution, often necessitating the implementation of every possible usable peripheral to approximate the original microcontroller's layout. Identifying potential configuration layouts narrows down the range of peripheral combinations needed for emulation, streamlining the process of setting up a sandbox environment. This work presents an approach for automatically identifying a firmware's targeted microcontroller and its peripheral configuration via static and partial-dynamic analysis, extending the state-of-the-art and introducing a novel method for analyzing bare-metal firmware. We address the current limitations of state-of-the-art approaches by introducing the possibility of analyzing the input binary's memory access to reveal any potential peripherals activation or usage. We then cross-check the gathered information against our database built starting from the datasheets' information to determine the most accurate possible microcontroller's memory layout match for the given binary. We evaluate our approach on a dataset of binaries obtained from real-world firmware and created firmware.File | Dimensione | Formato | |
---|---|---|---|
Tesi_Bianchini.pdf
accessibile in internet per tutti
Descrizione: Tesi Bianchini Matteo
Dimensione
1.38 MB
Formato
Adobe PDF
|
1.38 MB | Adobe PDF | Visualizza/Apri |
Executive_Summary_Bianchini.pdf
accessibile in internet per tutti
Descrizione: Executive Summary Tesi Bianchini Matteo
Dimensione
792.53 kB
Formato
Adobe PDF
|
792.53 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/236414