Analisi del traffico di rete, dalle CTF alla realtà
Author
Iannello, Roberto Pio <2002>
Date
2025-02-13Data available
2025-03-06Abstract
La tesi esplora l'importanza dell'analisi del traffico di rete sia in contesti di Capture The Flag (CTF) che in scenari reali di cybersecurity. Partendo da una panoramica sulle CTF e le loro analogie con il mondo reale, il lavoro si concentra sull'analisi del traffico di rete come strumento fondamentale per identificare attacchi, comprenderne la provenienza e implementare contromisure efficaci. Viene presentato un caso di studio basato su una vulnerabilità di SQL Injection presente in un servizio web utilizzato nella finale di CyberChallenge.IT 2024. Attraverso la simulazione di un attacco e l'analisi del traffico di rete con Wireshark, si dimostra come sia possibile individuare la sequenza delle operazioni malevole. Successivamente, la tesi introduce il concetto di virtual patching come tecnica per mitigare le vulnerabilità senza alterare direttamente il codice sorgente del servizio. Viene utilizzato mitmproxy, un reverse proxy, per intercettare e analizzare le richieste in ingresso, bloccando quelle contenenti payload dannosi. L'implementazione del virtual patching tramite mitmproxy e iptables permette di proteggere il servizio da attacchi SQL Injection senza interruzioni di servizio. La tesi conclude evidenziando i vantaggi del virtual patching, in particolare la sua applicabilità in contesti di codice legacy o proprietario, dove rappresenta una soluzione rapida ed efficace per proteggere i sistemi in attesa di aggiornamenti definitivi. This thesis explores the importance of network traffic analysis in both Capture The Flag (CTF) contests and real-world cybersecurity scenarios. Starting with an overview of CTFs and their similarities to real-world situations, the work focuses on network traffic analysis as a fundamental tool for identifying attacks, understanding their origins, and implementing effective countermeasures. A case study is presented, based on a SQL Injection vulnerability found in a web service used in the CyberChallenge.IT 2024 finals. Through simulating an attack and analyzing the network traffic with Wireshark, it is demonstrated how to identify the sequence of malicious operations. Subsequently, the thesis introduces the concept of virtual patching as a technique to mitigate vulnerabilities without directly altering the service's source code. mitmproxy, a reverse proxy, is used to intercept and analyze incoming requests, blocking those containing malicious payloads. Implementing virtual patching through mitmproxy and iptables allows for the protection of the service against SQL Injection attacks without service interruptions. The thesis concludes by highlighting the benefits of virtual patching, particularly its applicability in legacy or proprietary code contexts, where it represents a quick and effective solution for protecting systems while awaiting definitive updates.
Type
info:eu-repo/semantics/bachelorThesisCollections
- Laurea Triennale [2697]