Firmware re-hosting is a procedure that enables scalable security analysis of embedded systems by executing firmware within an emulator. However, re-hosting bare-metal firmware is fundamentally challenging due to its tight dependency on external peripherals. Emulators lacking accurate Memory-Mapped I/O (MMIO) peripheral models inevitably crash or stall in infinite loops. While existing automated solutions attempt to address this, they often rely on symbolic execution, which is slow and prone to path explosion, or lack modularity. In this thesis, we present PADA (Peripheral-Aware Dynamic Analysis), a standalone, automated tool that synthesizes legitimate peripheral input values without requiring hardware specifications, physical devices, or manual reverse engineering. PADA uses the Avatar2 framework to integrate avatar-qemu, a full-system emulator, with SymQEMU, thereby enabling high-performance concolic execution. We define the MMIO Input Navigation Tree (MINT), a custom data structure that allows us to associate peripheral accesses with firmware execution states. This decision tree is queried and updated by an iterative, feedback-driven exploration algorithm to dynamically infer the minimal set of valid peripheral input values required to advance execution. Through experimental validation across a variety of bare-metal and RTOS firmware, PADA significantly outperforms current standalone baselines, uncovering a wider range of unique peripheral interactions, exploring more firmware states, and achieving higher code coverage.
Il firmware re-hosting è una procedura che consente l'analisi di sicurezza dei sistemi embedded in modo scalabile, eseguendo il firmware all'interno di un emulatore. Tuttavia, il re-hosting di firmware bare-metal è un processo intrinsecamente complesso a causa della sua forte dipendenza dalle periferiche esterne, al punto che gli emulatori privi di modelli accurati di periferiche Memory-Mapped I/O (MMIO) vanno inevitabilmente in crash o si bloccano in loop infiniti. Sebbene vi siano soluzioni esistenti che provano ad affrontare questo problema in modo automatizzato, molte di queste si basano sull'esecuzione simbolica, lenta e soggetta al fenomeno della path explosion, oppure mancano di modularità. In questa tesi presentiamo PADA (Peripheral-Aware Dynamic Analysis), uno strumento standalone in grado di sintetizzare automaticamente input sintatticamente validi inviati da periferiche, senza la necessità di specifiche hardware, dispositivi fisici o attività manuale di reverse engineering. PADA utilizza il framework Avatar2 per integrare avatar-qemu, un emulatore full-system, con SymQEMU, riuscendo quindi ad usufruire della concolic execution ad alte prestazioni. Definiamo inoltre il MMIO Input Navigation Tree (MINT), una struttura dati che consente di associare gli accessi alle periferiche agli stati di esecuzione del firmware. Questo albero decisionale viene interrogato e modificato da un algoritmo di esplorazione iterativo, guidato dal feedback delle esecuzioni precedenti, al fine di riuscire a modellare l'insieme minimo di input validi che la periferica deve ritornare al firmware per avanzare nell'esecuzione. Attraverso una validazione sperimentale condotta su una varietà di firmware bare-metal e RTOS, PADA supera l'attuale baseline, individuando un numero maggiore di interazioni con le periferiche ed esplorando nuovi stati dei firmware, raggiungendo una maggiore copertura del codice.
A concolic execution approach for peripheral input modeling in firmware re-hosting
Padalino, Luca
2024/2025
Abstract
Firmware re-hosting is a procedure that enables scalable security analysis of embedded systems by executing firmware within an emulator. However, re-hosting bare-metal firmware is fundamentally challenging due to its tight dependency on external peripherals. Emulators lacking accurate Memory-Mapped I/O (MMIO) peripheral models inevitably crash or stall in infinite loops. While existing automated solutions attempt to address this, they often rely on symbolic execution, which is slow and prone to path explosion, or lack modularity. In this thesis, we present PADA (Peripheral-Aware Dynamic Analysis), a standalone, automated tool that synthesizes legitimate peripheral input values without requiring hardware specifications, physical devices, or manual reverse engineering. PADA uses the Avatar2 framework to integrate avatar-qemu, a full-system emulator, with SymQEMU, thereby enabling high-performance concolic execution. We define the MMIO Input Navigation Tree (MINT), a custom data structure that allows us to associate peripheral accesses with firmware execution states. This decision tree is queried and updated by an iterative, feedback-driven exploration algorithm to dynamically infer the minimal set of valid peripheral input values required to advance execution. Through experimental validation across a variety of bare-metal and RTOS firmware, PADA significantly outperforms current standalone baselines, uncovering a wider range of unique peripheral interactions, exploring more firmware states, and achieving higher code coverage.| File | Dimensione | Formato | |
|---|---|---|---|
|
2026_03_Padalino_Executive_Summary.pdf
solo utenti autorizzati a partire dal 01/03/2029
Descrizione: Executive Summary
Dimensione
1.79 MB
Formato
Adobe PDF
|
1.79 MB | Adobe PDF | Visualizza/Apri |
|
2026_03_Padalino_Tesi.pdf
solo utenti autorizzati a partire dal 01/03/2029
Descrizione: Thesis
Dimensione
5.59 MB
Formato
Adobe PDF
|
5.59 MB | 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/252488