Modern processors adopt some advanced technology, such as out-of-order execution, or the speculative execution, to improve their performance. Nowadays we put, day by day, an increasing amount of our personal data on the Internet, and this must be adequately protected. To succeed in such an objective the first line of defense is to encrypt the data, while they are transferred from one system to another one, and also while they reside on a system. In recent years a big challenge to such a defensive system comes from side-channel attacks, which can extract a secret key from a system by exploiting some weird behavior of the processor. In this thesis, we propose a hardware-based security module capable of detecting a side-channel attack, and signaling it to the Operative System, before the attack can extract anything. We focused our attention on cache-based side-channel attacks, that exploit the access pattern of the cryptographical algorithm to the cache to extract the key. The most famous attacks belonging to this category are Spectre and Meltdown. To assure a high level of precision in the detection, without the requirement to have a database of all the possible existing attacks, we based our system on machine learning, but opting for the algorithms belonging to the One-class classifier category. To test the presence of an attack, we monitor some relevant Hardware Performance Counters, that we narrowly chose among the events made available by the processor. After having conducted an extensive search of the Hardware Performance Counters, and having tested multiple ML algorithms, we find out that the best results are obtained using Isolation Forest which can reach an accuracy of 99% with all the cryptographical algorithms and the attacks we have tested it. In addition, such an algorithm has always less than 1% of false positives and zero false negatives. We have made also a hardware implementation of Isolation Forest, and we tried to compare its dimension with the one of an x86 processor. This last comparison was not easy, due to the lack of information about it, but we obtained an overhead that goes from 6.75% to 25.7%, without any sort of optimization that will be possible when you try to implement our module alongside a CPU.

I moderni processori adottano alcune tecnologie, come l'esecuzione out-of-order o l'esecuzione speculativa, per migliorare le loro prestazioni. Oggigiorno mettiamo su Internet sempre più dati personali, che devono essere adeguatamente protetti. Per raggiungere questo obiettivo, la prima opzione è crittografarli, sia quando vengono trasferiti da un sistema all'altro, sia quando risiedono su un sistema. Negli ultimi anni un'importante minaccia alla crittografia è rappresentata dagli attacchi side-channel, che sono in grado di estrarre una chiave segreta sfruttando un comportamento ambiguo del processore. In questa tesi proponiamo un modulo di sicurezza hardware in grado di rilevare un attacco side-channel e di segnalarlo al sistema operativo, prima che questo sia possa estrarre qualcosa. Noi ci siamo focalizzti sugli attacchi side-channel cache-based, che sfruttano il pattern di accesso alla cache, dell'algoritmo crittografico, per estrarne la chiave. Gli attacchi più noti di questa categoria sono Spectre e Meltdown. Per garantire un elevato livello di precisione nel rilevamento, senza la necessità di avere un database con tutti i possibili attacchi esistenti, abbiamo basato il nostro sistema sul Machine Learning, optando però per gli algoritmi di classificazione di tipo One-class. Per valutare se c'è un attacco, monitoriamo alcuni Hardware Performance Counter, che abbiamo scelto attentamente tra gli eventi resi disponibili dal processore. Dopo aver condotto una ricerca approfondita sugli Hardware Performance Counter, e aver testato diversi algoritmi di ML, abbiamo scoperto che Isolation Forest dà i risultati migliori, raggiungendo un'accuratezza del 99% con tutti gli algoritmi crittografici e gli attacchi che abbiamo testato. Inoltre, questo algoritmo ha sempre meno dell'1% di falsi positivi e zero falsi negativi. Abbiamo realizzato anche un'implementazione hardware di Isolation Forest e abbiamo cercato di confrontare le sue dimensioni con quelle di un processore x86. Tale confronto non è stato facile, a causa della mancanza di informazioni al riguardo, ma abbiamo ottenuto un overhead che va dal 6.75% al 25.7%, questo senza alcun tipo di ottimizzazione che invece sarà possibile quando si vorrà implementare il nostro modulo insieme ad una CPU.

A machine learning-based security architecture to detect microarchitectural side-channel attacks in microprocessors

IAMUNDO, MATTIA
2021/2022

Abstract

Modern processors adopt some advanced technology, such as out-of-order execution, or the speculative execution, to improve their performance. Nowadays we put, day by day, an increasing amount of our personal data on the Internet, and this must be adequately protected. To succeed in such an objective the first line of defense is to encrypt the data, while they are transferred from one system to another one, and also while they reside on a system. In recent years a big challenge to such a defensive system comes from side-channel attacks, which can extract a secret key from a system by exploiting some weird behavior of the processor. In this thesis, we propose a hardware-based security module capable of detecting a side-channel attack, and signaling it to the Operative System, before the attack can extract anything. We focused our attention on cache-based side-channel attacks, that exploit the access pattern of the cryptographical algorithm to the cache to extract the key. The most famous attacks belonging to this category are Spectre and Meltdown. To assure a high level of precision in the detection, without the requirement to have a database of all the possible existing attacks, we based our system on machine learning, but opting for the algorithms belonging to the One-class classifier category. To test the presence of an attack, we monitor some relevant Hardware Performance Counters, that we narrowly chose among the events made available by the processor. After having conducted an extensive search of the Hardware Performance Counters, and having tested multiple ML algorithms, we find out that the best results are obtained using Isolation Forest which can reach an accuracy of 99% with all the cryptographical algorithms and the attacks we have tested it. In addition, such an algorithm has always less than 1% of false positives and zero false negatives. We have made also a hardware implementation of Isolation Forest, and we tried to compare its dimension with the one of an x86 processor. This last comparison was not easy, due to the lack of information about it, but we obtained an overhead that goes from 6.75% to 25.7%, without any sort of optimization that will be possible when you try to implement our module alongside a CPU.
PALUMBO, ALESSANDRO
ING - Scuola di Ingegneria Industriale e dell'Informazione
22-lug-2022
2021/2022
I moderni processori adottano alcune tecnologie, come l'esecuzione out-of-order o l'esecuzione speculativa, per migliorare le loro prestazioni. Oggigiorno mettiamo su Internet sempre più dati personali, che devono essere adeguatamente protetti. Per raggiungere questo obiettivo, la prima opzione è crittografarli, sia quando vengono trasferiti da un sistema all'altro, sia quando risiedono su un sistema. Negli ultimi anni un'importante minaccia alla crittografia è rappresentata dagli attacchi side-channel, che sono in grado di estrarre una chiave segreta sfruttando un comportamento ambiguo del processore. In questa tesi proponiamo un modulo di sicurezza hardware in grado di rilevare un attacco side-channel e di segnalarlo al sistema operativo, prima che questo sia possa estrarre qualcosa. Noi ci siamo focalizzti sugli attacchi side-channel cache-based, che sfruttano il pattern di accesso alla cache, dell'algoritmo crittografico, per estrarne la chiave. Gli attacchi più noti di questa categoria sono Spectre e Meltdown. Per garantire un elevato livello di precisione nel rilevamento, senza la necessità di avere un database con tutti i possibili attacchi esistenti, abbiamo basato il nostro sistema sul Machine Learning, optando però per gli algoritmi di classificazione di tipo One-class. Per valutare se c'è un attacco, monitoriamo alcuni Hardware Performance Counter, che abbiamo scelto attentamente tra gli eventi resi disponibili dal processore. Dopo aver condotto una ricerca approfondita sugli Hardware Performance Counter, e aver testato diversi algoritmi di ML, abbiamo scoperto che Isolation Forest dà i risultati migliori, raggiungendo un'accuratezza del 99% con tutti gli algoritmi crittografici e gli attacchi che abbiamo testato. Inoltre, questo algoritmo ha sempre meno dell'1% di falsi positivi e zero falsi negativi. Abbiamo realizzato anche un'implementazione hardware di Isolation Forest e abbiamo cercato di confrontare le sue dimensioni con quelle di un processore x86. Tale confronto non è stato facile, a causa della mancanza di informazioni al riguardo, ma abbiamo ottenuto un overhead che va dal 6.75% al 25.7%, questo senza alcun tipo di ottimizzazione che invece sarà possibile quando si vorrà implementare il nostro modulo insieme ad una CPU.
File allegati
File Dimensione Formato  
2022_07_Iamundo_Executive_Summary.pdf

accessibile in internet solo dagli utenti autorizzati

Descrizione: This is the Executive Summary
Dimensione 491.9 kB
Formato Adobe PDF
491.9 kB Adobe PDF   Visualizza/Apri
2022_07_Iamundo_Thesis.pdf

accessibile in internet per tutti

Descrizione: This is the Master Thesis
Dimensione 1.34 MB
Formato Adobe PDF
1.34 MB Adobe PDF Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/190001