Software applications are increasingly covering every aspect of our lives. As a consequence, the security of these applications is of the utmost importance to protect users’ data and privacy. Despite significant advancements in identifying software vulnerabilities, the security analysis of these applications remains a challenging task due to their complexity. In this dissertation, we present novel approaches and techniques for the security analysis of software applications. Our research primarily focuses on improving the reverse engineering process as it can facilitate the manual analysis of software applications and lead to the discovery of vulnerabilities. To this end, we propose three approaches to assist the analyst in the identification of C++ objects and their methods in optimized binaries, where these methods are often inline. Namely, we design BINO, Highliner, and BOBI, each addressing specific challenges in the reverse engineering domain. BINO aims to recognize inline methods of C++ template classes through a fingerprint generation and matching approach. Highliner leverages Natural Language Processing (NLP) techniques to identify inline instances at the instruction-level, while BOBI matches object structures on the stack by analyzing function memory accesses. In addition, to automatically detect vulnerabilities, we propose Rainfuzz, a fuzzer built on top of AFL++ that leverages Reinforcement Learning (RL) to guide the fuzzing process. Rainfuzz’s Recurrent Neural Network (RNN) generates a heatmap for each input seed, representing the probability of each byte being mutated. The RL agent then uses this heatmap to guide the mutation process, choosing the bytes to mutate that are more likely to trigger new paths. Even with the most advanced mitigations like Intel Control-Flow Enforcement Technology (CET), vulnerabilities can still lead to exploitation. To identify the remaining attack surfaces in software applications, we develop Untangle, a static analysis tool that identifies all the global function pointers in a library and, through symbolic execution, evaluates whether these global function pointers can be called by the library’s functions. Finally, we conduct a detailed evaluation of Address Space Layout Randomization (ASLR) implementations across the most widely used Operating Systems (OSs): Linux, Windows, and macOS. We evaluate several characteristics of all memory objects available in the address space of a process, such as the allocation range, the entropy, and the probability distribution. Our findings demonstrate that the entropies of relevant objects, such as the binary and libraries, are relatively low across all the operating systems considered, leading to possible bypasses of ASLR.
Le applicazioni software stanno sempre più coprendo ogni aspetto della nostra vita. Di conseguenza, la sicurezza di queste applicazioni è di fondamentale importanza per proteggere i dati e la privacy degli utenti. Nonostante i significativi progressi nell'identificazione delle vulnerabilità software, l'analisi della sicurezza di queste applicazioni rimane un compito difficile a causa della loro complessità. In questa tesi, presentiamo nuovi approcci e tecniche per l'analisi della sicurezza delle applicazioni software. La nostra ricerca si concentra principalmente sul miglioramento del processo di reverse engineering, in quanto può facilitare l'analisi manuale delle applicazioni software e portare alla scoperta di vulnerabilità. A tal fine, proponiamo tre approcci per assistere l'analista nell'identificazione degli oggetti C++ e dei loro metodi nei binari ottimizzati, dove questi metodi sono spesso inline. In particolare, progettiamo BINO, Highliner e BOBI, ciascuno dei quali affronta sfide specifiche nel campo del reverse engineering. BINO mira a riconoscere i metodi inline delle classi template C++ attraverso un approccio di generazione e confronto di impronte digitali. Highliner sfrutta le tecniche di elaborazione del linguaggio naturale (NLP) per identificare le istanze inline a livello di istruzioni, mentre BOBI confronta le strutture degli oggetti nello stack analizzando gli accessi alla memoria delle funzioni. Inoltre, per rilevare automaticamente le vulnerabilità, proponiamo Rainfuzz, un fuzzer basato su AFL++ che utilizza il Reinforcement Learning (RL) per guidare il processo di fuzzing. La rete neurale ricorrente (RNN) di Rainfuzz genera una mappa di calore per ogni seme di input, rappresentando la probabilità che ogni byte venga mutato. L'agente RL utilizza quindi questa mappa di calore per guidare il processo di mutazione, scegliendo i byte da mutare che hanno maggiori probabilità di attivare nuovi percorsi. Anche con le mitigazioni più avanzate come la Intel Control-Flow Enforcement Technology (CET), le vulnerabilità possono ancora portare a sfruttamenti. Per identificare le superfici di attacco rimanenti nelle applicazioni software, sviluppiamo Untangle, uno strumento di analisi statica che identifica tutti i puntatori a funzione globali in una libreria e, tramite esecuzione simbolica, valuta se questi puntatori a funzione globali possono essere chiamati dalle funzioni della libreria. Infine, conduciamo una valutazione dettagliata delle implementazioni di Address Space Layout Randomization (ASLR) nei sistemi operativi (OS) più diffusi: Linux, Windows e macOS. Valutiamo diverse caratteristiche di tutti gli oggetti di memoria disponibili nello spazio degli indirizzi di un processo, come l'intervallo di allocazione, l'entropia e la distribuzione di probabilità. I nostri risultati dimostrano che le entropie degli oggetti rilevanti, come i binari e le librerie, sono relativamente basse in tutti i sistemi operativi considerati, portando a possibili aggiramenti dell'ASLR.
New approaches and new techniques for the security of software applications
Binosi, Lorenzo
2023/2024
Abstract
Software applications are increasingly covering every aspect of our lives. As a consequence, the security of these applications is of the utmost importance to protect users’ data and privacy. Despite significant advancements in identifying software vulnerabilities, the security analysis of these applications remains a challenging task due to their complexity. In this dissertation, we present novel approaches and techniques for the security analysis of software applications. Our research primarily focuses on improving the reverse engineering process as it can facilitate the manual analysis of software applications and lead to the discovery of vulnerabilities. To this end, we propose three approaches to assist the analyst in the identification of C++ objects and their methods in optimized binaries, where these methods are often inline. Namely, we design BINO, Highliner, and BOBI, each addressing specific challenges in the reverse engineering domain. BINO aims to recognize inline methods of C++ template classes through a fingerprint generation and matching approach. Highliner leverages Natural Language Processing (NLP) techniques to identify inline instances at the instruction-level, while BOBI matches object structures on the stack by analyzing function memory accesses. In addition, to automatically detect vulnerabilities, we propose Rainfuzz, a fuzzer built on top of AFL++ that leverages Reinforcement Learning (RL) to guide the fuzzing process. Rainfuzz’s Recurrent Neural Network (RNN) generates a heatmap for each input seed, representing the probability of each byte being mutated. The RL agent then uses this heatmap to guide the mutation process, choosing the bytes to mutate that are more likely to trigger new paths. Even with the most advanced mitigations like Intel Control-Flow Enforcement Technology (CET), vulnerabilities can still lead to exploitation. To identify the remaining attack surfaces in software applications, we develop Untangle, a static analysis tool that identifies all the global function pointers in a library and, through symbolic execution, evaluates whether these global function pointers can be called by the library’s functions. Finally, we conduct a detailed evaluation of Address Space Layout Randomization (ASLR) implementations across the most widely used Operating Systems (OSs): Linux, Windows, and macOS. We evaluate several characteristics of all memory objects available in the address space of a process, such as the allocation range, the entropy, and the probability distribution. Our findings demonstrate that the entropies of relevant objects, such as the binary and libraries, are relatively low across all the operating systems considered, leading to possible bypasses of ASLR.File | Dimensione | Formato | |
---|---|---|---|
thesis.pdf
accessibile in internet per tutti a partire dal 04/09/2025
Descrizione: PhD Thesis
Dimensione
4.01 MB
Formato
Adobe PDF
|
4.01 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/225413