WebAssembly (Wasm) is rapidly transforming the landscape of web application development by enabling near-native performance within the browser through a portable and secure execution model. However, despite its built-in sandboxing and type-safety mechanisms, WebAssembly still lacks several essential runtime protection techniques available in native environments, such as stack canaries and address space layout randomization (ASLR). This absence leaves Wasm applications exposed to traditional attacks, such as buffer overflows and cross-site scripting (XSS), posing a growing security concern as the technology becomes increasingly adopted for performance-critical and security-sensitive use cases. This thesis addresses these challenges by introducing WADE (WebAssembly Anomaly Detection Engine), a novel system for detecting anomalous behaviors in WebAssembly applications executed in the browser. WADE operates as an additional security layer that monitors the runtime behavior of Wasm modules. It collects function-level execution traces under benign conditions and transforms them into sequences used to train an online Long Short-Term Memory (LSTM) neural network. The model learns the normal execution patterns of a specific application and subsequently detects anomalies at runtime by identifying significant deviations in the model’s prediction error. The proposed method does not rely on predefined attack signatures but instead learns application-specific behavioral profiles, making it effective against both known and previously unseen attacks. To evaluate our approach, we developed a dedicated dataset comprising 67 WebAssembly applications. Experimental results demonstrated excellent detection performance, achieving zero false negatives and a very low false positive rate. Overall, this research contributes to advancing runtime anomaly detection and browser security, supporting the development of more resilient WebAssembly ecosystems.
WebAssembly (Wasm) sta trasformando rapidamente lo sviluppo delle applicazioni web, offrendo prestazioni vicine a quelle native direttamente all’interno del browser grazie a un modello di esecuzione portabile e sicuro. Tuttavia, nonostante i meccanismi di protezione integrati, come il sandboxing e il type safety, WebAssembly non dispone ancora di alcune tecniche fondamentali di sicurezza a runtime tipiche degli ambienti nativi, come gli stack canaries e la randomizzazione degli indirizzi (ASLR). Queste carenze espongono le applicazioni Wasm ad attacchi classici, quali buffer overflow e cross-site scripting (XSS). Questo rischio aumenta poi con il diffondersi di questa tecnologia in contesti critici dal punto di vista delle prestazioni e della sicurezza. Questa tesi affronta tali sfide introducendo WADE (WebAssembly Anomaly Detection Engine), un innovativo sistema di anomaly detection per applicazioni WebAssembly eseguite nel browser. WADE opera come un ulteriore livello di sicurezza, monitorando il comportamento delle applicazioni durante l’esecuzione. Il sistema raccoglie tracce di esecuzione a livello di funzione in condizioni normali e le converte in sequenze utilizzate per addestrare una rete neurale di tipo Long Short-Term Memory (LSTM). In questo modo, il modello apprende i pattern di esecuzione caratteristici di ciascuna applicazione e, in fase operativa, è in grado di individuare eventuali anomalie rilevando deviazioni significative nell’errore di previsione del modello. L’approccio proposto non si basa su attacchi predefiniti, ma apprende dinamicamente i pattern specifici di ogni applicazione, risultando efficace sia contro minacce note sia contro attacchi sconosciuti. Per la valutazione sperimentale, è stato sviluppato un dataset composto da 67 applicazioni WebAssembly. I risultati ottenuti hanno evidenziato prestazioni eccellenti, senza falsi negativi e con una percentuale di falsi positivi estremamente bassa. Nel complesso, questa ricerca contribuisce ad avanzare lo stato dell’arte nel campo dell'anomaly detection e della sicurezza del browser, favorendo lo sviluppo di applicazioni WebAssembly più robuste e resistenti agli attacchi.
WADE: a deep learning anomaly detection engine for webassembly applications
CAMPESTRINI, ILARIA
2024/2025
Abstract
WebAssembly (Wasm) is rapidly transforming the landscape of web application development by enabling near-native performance within the browser through a portable and secure execution model. However, despite its built-in sandboxing and type-safety mechanisms, WebAssembly still lacks several essential runtime protection techniques available in native environments, such as stack canaries and address space layout randomization (ASLR). This absence leaves Wasm applications exposed to traditional attacks, such as buffer overflows and cross-site scripting (XSS), posing a growing security concern as the technology becomes increasingly adopted for performance-critical and security-sensitive use cases. This thesis addresses these challenges by introducing WADE (WebAssembly Anomaly Detection Engine), a novel system for detecting anomalous behaviors in WebAssembly applications executed in the browser. WADE operates as an additional security layer that monitors the runtime behavior of Wasm modules. It collects function-level execution traces under benign conditions and transforms them into sequences used to train an online Long Short-Term Memory (LSTM) neural network. The model learns the normal execution patterns of a specific application and subsequently detects anomalies at runtime by identifying significant deviations in the model’s prediction error. The proposed method does not rely on predefined attack signatures but instead learns application-specific behavioral profiles, making it effective against both known and previously unseen attacks. To evaluate our approach, we developed a dedicated dataset comprising 67 WebAssembly applications. Experimental results demonstrated excellent detection performance, achieving zero false negatives and a very low false positive rate. Overall, this research contributes to advancing runtime anomaly detection and browser security, supporting the development of more resilient WebAssembly ecosystems.| File | Dimensione | Formato | |
|---|---|---|---|
|
2025_12_Campestrini_Executive Summary.pdf
accessibile in internet solo dagli utenti autorizzati
Descrizione: Executive Summary
Dimensione
454.07 kB
Formato
Adobe PDF
|
454.07 kB | Adobe PDF | Visualizza/Apri |
|
2025_12_Campestrini_Thesis.pdf
accessibile in internet solo dagli utenti autorizzati
Descrizione: Thesis
Dimensione
820.49 kB
Formato
Adobe PDF
|
820.49 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/246857